diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-29 10:51:41 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-29 10:51:41 -0500 |
commit | 7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64 (patch) | |
tree | 007870da7872a8828d4bc4babfc49f9e01557992 /hscript/disk.hh | |
parent | 84b7e98b805b86e4d63e2ce38a490e86541ed0da (diff) | |
download | horizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.tar.gz horizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.tar.bz2 horizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.tar.xz horizon-7fbaf52dbd9a9afb406d4a631ff5a1625c90ef64.zip |
hscript: Implement lvm_vg, add tests
Diffstat (limited to 'hscript/disk.hh')
-rw-r--r-- | hscript/disk.hh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/hscript/disk.hh b/hscript/disk.hh index 53527f3..a9adba4 100644 --- a/hscript/disk.hh +++ b/hscript/disk.hh @@ -125,6 +125,23 @@ public: }; class LVMGroup : public Key { +private: + const std::string _pv; + const std::string _vgname; + + LVMGroup(int _line, const std::string &_p, const std::string &_v) : + Key(_line), _pv(_p), _vgname(_v) {} +public: + /*! Retrieve the physical volume where this volume group will reside. */ + const std::string pv() const { return this->_pv; } + /*! Retrieve the name of this volume group. */ + const std::string name() const { return this->_vgname; } + + static Key *parseFromData(const std::string &, int, int*, int*); + bool validate(ScriptOptions) const override; + /*! Determine if the PV passed is a real one. */ + bool test_pv(ScriptOptions) const; + bool execute(ScriptOptions) const override; }; class LVMVolume : public Key { |