boot v2 progress: disks, ssh, success...
This commit is contained in:
19
lvm/lv.go
Normal file
19
lvm/lv.go
Normal file
@ -0,0 +1,19 @@
|
||||
package lvm
|
||||
|
||||
type LVSReport struct {
|
||||
Report []struct {
|
||||
LV []LV `json:"lv"`
|
||||
} `json:"report"`
|
||||
}
|
||||
|
||||
type LV struct {
|
||||
Name string `json:"lv_name"`
|
||||
VGName string `json:"vg_name"`
|
||||
}
|
||||
|
||||
func (r LVSReport) LVs() (ret []LV) {
|
||||
for _, rep := range r.Report {
|
||||
ret = append(ret, rep.LV...)
|
||||
}
|
||||
return
|
||||
}
|
19
lvm/pv.go
Normal file
19
lvm/pv.go
Normal file
@ -0,0 +1,19 @@
|
||||
package lvm
|
||||
|
||||
type PVSReport struct {
|
||||
Report []struct {
|
||||
PV []PV `json:"pv"`
|
||||
} `json:"report"`
|
||||
}
|
||||
|
||||
type PV struct {
|
||||
Name string `json:"pv_name"`
|
||||
VGName string `json:"vg_name"`
|
||||
}
|
||||
|
||||
func (r PVSReport) PVs() (ret []PV) {
|
||||
for _, rep := range r.Report {
|
||||
ret = append(ret, rep.PV...)
|
||||
}
|
||||
return
|
||||
}
|
Reference in New Issue
Block a user