Author: aschnell
Date: Tue Aug 5 15:50:38 2008
New Revision: 49715
URL: http://svn.opensuse.org/viewcvs/yast?rev=49715&view=rev
Log:
- more evms removal
Removed:
trunk/storage/libstorage/src/Evms.cc
trunk/storage/libstorage/src/Evms.h
trunk/storage/libstorage/src/EvmsCo.cc
trunk/storage/libstorage/src/EvmsCo.h
Modified:
trunk/storage/libstorage/examples/TestStorage.cc
trunk/storage/libstorage/src/Makefile.am
trunk/storage/libstorage/src/Storage.h
trunk/storage/libstorage/src/StorageInterface.h
trunk/storage/storage/src/modules/Storage.ycp
Modified: trunk/storage/libstorage/examples/TestStorage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/examples/TestStorage.cc?rev=49715&r1=49714&r2=49715&view=diff
==============================================================================
--- trunk/storage/libstorage/examples/TestStorage.cc (original)
+++ trunk/storage/libstorage/examples/TestStorage.cc Tue Aug 5 15:50:38 2008
@@ -27,16 +27,10 @@
struct PVG1 { bool operator()(const LvmVg&d) const {return(d.numPv()>1);}};
struct LVG1 { bool operator()(const LvmVg&d) const {return(d.numLv()>1);}};
struct NoLv { bool operator()(const LvmVg&d) const {return(d.numLv()==0);}};
-struct PVG1E { bool operator()(const EvmsCo&d) const {return(d.numPv()>1);}};
-struct LVG1E { bool operator()(const EvmsCo&d) const {return(d.numVol()>1);}};
-struct NoLvE { bool operator()(const EvmsCo&d) const {return(d.numVol()==0);}};
struct StripeG1 { bool operator()(const LvmLv&d) const {return(d.stripes()>1);}};
-struct StripeG1E { bool operator()(const Evms&d) const {return(d.stripes()>1);}};
struct TestHaveA { bool operator()(const LvmLv&d) const
{ return( d.name().find( "a" )!=string::npos); }};
-struct TestHaveAE { bool operator()(const Evms&d) const
- { return( d.name().find( "a" )!=string::npos); }};
template <class C> bool TestIsA( const C& d )
{ return( d.name().find( "a" )!=string::npos); };
@@ -45,7 +39,6 @@
template <class C> bool TestFalse( const C& d ) { return( false ); };
template <class C> bool TestTrue( const C& d ) { return( true ); };
bool TestLvG1( const LvmVg& d ) { return( d.numLv()>1 ); };
-bool TestVolG1( const EvmsCo& d ) { return( d.numVol()>1 ); };
template <class pair>
void PrintPair( ostream& s, const pair& p, const string& txt )
@@ -60,7 +53,7 @@
int
main( int argc_iv, char** argv_ppcv )
- {
+{
Storage::initDefaultLogger();
Storage Sto( true, false, true );
for( Storage::ConstContIterator i=Sto.contBegin(); i!=Sto.contEnd(); ++i )
@@ -354,60 +347,4 @@
Storage::LvmLvCondIPair<TestHaveA>::type p = Sto.lvmLvCondPair<TestHaveA>( TestHaveA() );
PrintPair( cout, p, "LvmLv 'a' " );
}
- {
- Storage::ConstEvmsCoPair p = Sto.evmsCoPair();
- PrintPairStorage::ConstEvmsCoPair( cout, p, "Evms " );
- struct tmp {
- static bool TestPvGt1( const EvmsCo& d )
- { return( d.numPv()>1 ); };
- static bool TestLvGt1( const EvmsCo& d )
- { return( d.numVol()>1 ); };
- static bool TestEmpty( const EvmsCo& d )
- { return( d.numVol()==0 ); };
- };
- p = Sto.evmsCoPair(tmp::TestPvGt1);
- PrintPairStorage::ConstEvmsCoPair( cout, p, "Evms PV>1 " );
- p = Sto.evmsCoPair(tmp::TestLvGt1);
- PrintPairStorage::ConstEvmsCoPair( cout, p, "Evms LV>1 " );
- p = Sto.evmsCoPair(tmp::TestEmpty);
- PrintPairStorage::ConstEvmsCoPair( cout, p, "Evms No LV " );
- }
- {
- Storage::EvmsCoCondIPair<PVG1E>::type p = Sto.evmsCoCondPair<PVG1E>( PVG1E() );
- PrintPair( cout, p, "Evms PV>1 " );
- }
- {
- Storage::EvmsCoCondIPair<LVG1E>::type p = Sto.evmsCoCondPair<LVG1E>( LVG1E() );
- PrintPair( cout, p, "Evms LV>1 " );
- }
- {
- Storage::EvmsCoCondIPair<NoLvE>::type p = Sto.evmsCoCondPair<NoLvE>( NoLvE() );
- PrintPair( cout, p, "Evms LV==0 " );
- }
- {
- Storage::ConstEvmsPair p = Sto.evmsPair();
- PrintPairStorage::ConstEvmsPair( cout, p, "EvmsVol " );
- struct tmp {
- static bool TestNameA( const Evms& d )
- { return( d.name().find("a")!=string::npos ); };
- static bool TestStripeG1( const Evms& d )
- { return( d.stripes()>1 ); };
- };
- p = Sto.evmsPair(tmp::TestNameA);
- PrintPairStorage::ConstEvmsPair( cout, p, "EvmsVol 'a' " );
- p = Sto.evmsPair(tmp::TestStripeG1);
- PrintPairStorage::ConstEvmsPair( cout, p, "EvmsVol S>1 " );
- p = Sto.evmsPair( tmp::TestNameA, TestVolG1 );
- PrintPairStorage::ConstEvmsPair( cout, p, "EvmsVol 'a' LV>1 " );
- p = Sto.evmsPair( TestFalse<Evms>, TestTrue<EvmsCo> );
- PrintPairStorage::ConstEvmsPair( cout, p, "EvmsVol impossible " );
- }
- {
- Storage::EvmsCondIPair<StripeG1E>::type p = Sto.evmsCondPair<StripeG1E>( StripeG1E() );
- PrintPair( cout, p, "EvmsVol S>1 " );
- }
- {
- Storage::EvmsCondIPair<TestHaveAE>::type p = Sto.evmsCondPair<TestHaveAE>( TestHaveAE() );
- PrintPair( cout, p, "EvmsVol 'a' " );
- }
- }
+}
Modified: trunk/storage/libstorage/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Makefile.am?rev=49715&r1=49714&r2=49715&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Makefile.am (original)
+++ trunk/storage/libstorage/src/Makefile.am Tue Aug 5 15:50:38 2008
@@ -29,7 +29,6 @@
Dasd.cc Dasd.h \
PeContainer.cc PeContainer.h \
LvmVg.cc LvmVg.h \
- EvmsCo.cc EvmsCo.h \
DmPartCo.cc DmPartCo.h \
DmraidCo.cc DmraidCo.h \
DmCo.cc DmCo.h \
@@ -40,7 +39,6 @@
Partition.cc Partition.h \
Dm.cc Dm.h \
LvmLv.cc LvmLv.h \
- Evms.cc Evms.h \
DmPart.cc DmPart.h \
Dmraid.cc Dmraid.h \
Md.cc Md.h \
Modified: trunk/storage/libstorage/src/Storage.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.h?rev=49715&r1=49714&r2=49715&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.h (original)
+++ trunk/storage/libstorage/src/Storage.h Tue Aug 5 15:50:38 2008
@@ -14,8 +14,6 @@
#include "y2storage/Partition.h"
#include "y2storage/LvmVg.h"
#include "y2storage/LvmLv.h"
-#include "y2storage/EvmsCo.h"
-#include "y2storage/Evms.h"
#include "y2storage/DmraidCo.h"
#include "y2storage/Dmraid.h"
#include "y2storage/MdCo.h"
@@ -737,88 +735,6 @@
return( LvmVgIterator( LvmVgPIterator( p, CheckFnc, true )) );
}
-// iterators over EVMS container
- protected:
- // protected typedefs for iterators over EVMS container
- typedef CastCheckIterator ContainerCEvmsIter;
- template< class Pred >
- struct ConstEvmsCoPI { typedef ContainerIter type; };
- typedef CastCheckIterator ContainerEvmsIter;
- template< class Pred >
- struct EvmsCoPI { typedef ContainerIter type; };
- template< class Pred >
- struct EvmsCoI { typedef ContainerDerIter type; };
- typedef CheckFnc<const EvmsCo> CheckFncEvmsCo;
- typedef CheckerIterator< CheckFncEvmsCo, ConstEvmsCoPI<CheckFncEvmsCo>::type,
- ContainerCEvmsIter, EvmsCo > ConstEvmsCoPIterator;
- typedef CheckerIterator< CheckFncEvmsCo, EvmsCoPI<CheckFncEvmsCo>::type,
- ContainerEvmsIter, EvmsCo > EvmsCoPIterator;
- typedef DerefIterator EvmsCoIterator;
- typedef IterPair<EvmsCoIterator> EvmsCoPair;
-
- public:
- // public typedefs for iterators over EVMS container
- typedef DerefIterator ConstEvmsCoIterator;
- template< class Pred >
- struct ConstEvmsCoI
- { typedef ContainerDerIter type; };
- template< class Pred >
- struct EvmsCoCondIPair { typedef MakeCondIterPair type; };
- typedef IterPair<ConstEvmsCoIterator> ConstEvmsCoPair;
-
- // public member functions for iterators over EVMS container
- ConstEvmsCoPair evmsCoPair( bool (* CheckFnc)( const EvmsCo& )=NULL ) const
- {
- return( ConstEvmsCoPair( evmsCoBegin( CheckFnc ), evmsCoEnd( CheckFnc ) ));
- }
- ConstEvmsCoIterator evmsCoBegin( bool (* CheckFnc)( const EvmsCo& )=NULL ) const
- {
- IterPair<ContainerCEvmsIter> p( ContainerCEvmsIter( cont.begin(), cont.end() ),
- ContainerCEvmsIter( cont.begin(), cont.end(), true ));
- return( ConstEvmsCoIterator( ConstEvmsCoPIterator( p, CheckFnc )) );
- }
- ConstEvmsCoIterator evmsCoEnd( bool (* CheckFnc)( const EvmsCo& )=NULL ) const
- {
- IterPair<ContainerCEvmsIter> p( ContainerCEvmsIter( cont.begin(), cont.end() ),
- ContainerCEvmsIter( cont.begin(), cont.end(), true ));
- return( ConstEvmsCoIterator( ConstEvmsCoPIterator( p, CheckFnc, true )) );
- }
- template< class Pred > typename EvmsCoCondIPair<Pred>::type evmsCoCondPair( const Pred& p ) const
- {
- return( typename EvmsCoCondIPair<Pred>::type( evmsCoCondBegin( p ), evmsCoCondEnd( p ) ) );
- }
- template< class Pred > typename ConstEvmsCoI<Pred>::type evmsCoCondBegin( const Pred& p ) const
- {
- IterPair<ContainerCEvmsIter> pair( ContainerCEvmsIter( cont.begin(), cont.end() ),
- ContainerCEvmsIter( cont.begin(), cont.end(), true ));
- return( typename ConstEvmsCoI<Pred>::type( typename ConstEvmsCoPI<Pred>::type( pair, p )) );
- }
- template< class Pred > typename ConstEvmsCoI<Pred>::type evmsCoCondEnd( const Pred& p ) const
- {
- IterPair<ContainerCEvmsIter> pair( ContainerCEvmsIter( cont.begin(), cont.end() ),
- ContainerCEvmsIter( cont.begin(), cont.end(), true ));
- return( typename ConstEvmsCoI<Pred>::type( typename ConstEvmsCoPI<Pred>::type( pair, p, true )) );
- }
- protected:
- // protected member functions for iterators over EVMS container
- EvmsCoPair evCoPair( bool (* CheckFnc)( const EvmsCo& )=NULL )
- {
- return( EvmsCoPair( evCoBegin( CheckFnc ), evCoEnd( CheckFnc ) ));
- }
- EvmsCoIterator evCoBegin( bool (* CheckFnc)( const EvmsCo& )=NULL )
- {
- IterPair<ContainerEvmsIter> p( ContainerEvmsIter( cont.begin(), cont.end() ),
- ContainerEvmsIter( cont.begin(), cont.end(), true ));
- return( EvmsCoIterator( EvmsCoPIterator( p, CheckFnc )) );
- }
- EvmsCoIterator evCoEnd( bool (* CheckFnc)( const EvmsCo& )=NULL )
- {
- IterPair<ContainerEvmsIter> p( ContainerEvmsIter( cont.begin(), cont.end() ),
- ContainerEvmsIter( cont.begin(), cont.end(), true ));
- return( EvmsCoIterator( EvmsCoPIterator( p, CheckFnc, true )) );
- }
-
// iterators over DmPart container
protected:
// protected typedefs for iterators over DmPart container
@@ -1238,78 +1154,6 @@
return( typename ConstLvmLvI<Pred>::type( typename ConstLvmLvPI<Pred>::type(pair, p, true )) );
}
-// iterators over EVMS volumes
- protected:
- // protected typedefs for iterators over EVMS volumes
- typedef ListListIterator ConstEvmsInter;
- typedef CastIterator ConstEvmsInter2;
- template< class Pred >
- struct ConstEvmsPI { typedef ContainerIter type; };
- typedef CheckFnc<const Evms> CheckFncEvms;
- typedef CheckerIterator< CheckFncEvms, ConstEvmsPI<CheckFncEvms>::type,
- ConstEvmsInter2, Evms > ConstEvmsPIterator;
- public:
- // public typedefs for iterators over EVMS volumes
- template< class Pred >
- struct ConstEvmsI
- { typedef ContainerDerIter type; };
- template< class Pred >
- struct EvmsCondIPair
- { typedef MakeCondIterPair type;};
- typedef DerefIterator ConstEvmsIterator;
- typedef IterPair<ConstEvmsIterator> ConstEvmsPair;
-
- // public member functions for iterators over EVMS volumes
- ConstEvmsPair evmsPair( bool (* CheckEvmsCo)( const EvmsCo& )) const
- {
- return( ConstEvmsPair( evmsBegin( CheckEvmsCo ), evmsEnd( CheckEvmsCo ) ));
- }
- ConstEvmsPair evmsPair( bool (* CheckEvms)( const Evms& )=NULL,
- bool (* CheckEvmsCo)( const EvmsCo& )=NULL) const
- {
- return( ConstEvmsPair( evmsBegin( CheckEvms, CheckEvmsCo ),
- evmsEnd( CheckEvms, CheckEvmsCo ) ));
- }
- ConstEvmsIterator evmsBegin( bool (* CheckEvmsCo)( const EvmsCo& )) const
- {
- return( evmsBegin( NULL, CheckEvmsCo ) );
- }
- ConstEvmsIterator evmsBegin( bool (* CheckEvms)( const Evms& )=NULL,
- bool (* CheckEvmsCo)( const EvmsCo& )=NULL) const
- {
- IterPair<ConstEvmsInter2> p( (ConstEvmsInter(evmsCoPair( CheckEvmsCo ))),
- (ConstEvmsInter(evmsCoPair( CheckEvmsCo ), true )));
- return( ConstEvmsIterator( ConstEvmsPIterator(p, CheckEvms )));
- }
- ConstEvmsIterator evmsEnd( bool (* CheckEvmsCo)( const EvmsCo& )) const
- {
- return( evmsEnd( NULL, CheckEvmsCo ) );
- }
- ConstEvmsIterator evmsEnd( bool (* CheckEvms)( const Evms& )=NULL,
- bool (* CheckEvmsCo)( const EvmsCo& )=NULL) const
- {
- IterPair<ConstEvmsInter2> p( (ConstEvmsInter(evmsCoPair( CheckEvmsCo ))),
- (ConstEvmsInter(evmsCoPair( CheckEvmsCo ), true )));
- return( ConstEvmsIterator( ConstEvmsPIterator(p, CheckEvms, true )));
- }
- template< class Pred > typename EvmsCondIPair<Pred>::type evmsCondPair( const Pred& p ) const
- {
- return( typename EvmsCondIPair<Pred>::type( evmsCondBegin( p ), evmsCondEnd( p ) ) );
- }
- template< class Pred > typename ConstEvmsI<Pred>::type evmsCondBegin( const Pred& p ) const
- {
- IterPair<ConstEvmsInter2> pair( (ConstEvmsInter( evmsCoPair())),
- (ConstEvmsInter( evmsCoPair(), true )));
- return( typename ConstEvmsI<Pred>::type( typename ConstEvmsPI<Pred>::type(pair, p) ) );
- }
- template< class Pred > typename ConstEvmsI<Pred>::type evmsCondEnd( const Pred& p ) const
- {
- IterPair<ConstEvmsInter2> pair( (ConstEvmsInter( evmsCoPair())),
- (ConstEvmsInter( evmsCoPair(), true )));
- return( typename ConstEvmsI<Pred>::type( typename ConstEvmsPI<Pred>::type(pair, p, true )) );
- }
-
// iterators over software raid devices
protected:
// protected typedefs for iterators over software raid devices
Modified: trunk/storage/libstorage/src/StorageInterface.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageInterface.h?rev=49715&r1=49714&r2=49715&view=diff
==============================================================================
--- trunk/storage/libstorage/src/StorageInterface.h (original)
+++ trunk/storage/libstorage/src/StorageInterface.h Tue Aug 5 15:50:38 2008
@@ -112,7 +112,7 @@
enum MdParity { PAR_NONE, LEFT_ASYMMETRIC, LEFT_SYMMETRIC,
RIGHT_ASYMMETRIC, RIGHT_SYMMETRIC };
- enum UsedByType { UB_NONE, UB_LVM, UB_MD, UB_EVMS, UB_DM, UB_DMRAID };
+ enum UsedByType { UB_NONE, UB_LVM, UB_MD, UB_DM, UB_DMRAID };
enum CType { CUNKNOWN, DISK, MD, LOOP, LVM, DM, EVMS, DMRAID, NFSC,
COTYPE_LAST_ENTRY };
Modified: trunk/storage/storage/src/modules/Storage.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=49715&r1=49714&r2=49715&view=diff
==============================================================================
--- trunk/storage/storage/src/modules/Storage.ycp (original)
+++ trunk/storage/storage/src/modules/Storage.ycp Tue Aug 5 15:50:38 2008
@@ -84,7 +84,6 @@
"def_int" : LibStorage::UB_NONE(),
"m" : $[ LibStorage::UB_LVM() : `UB_LVM,
LibStorage::UB_MD() : `UB_MD,
- LibStorage::UB_EVMS() : `UB_EVMS,
LibStorage::UB_DMRAID() : `UB_DMRAID,
LibStorage::UB_DM() : `UB_DM
]
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org