Documentation
¶
Overview ¶
Copyright (c) 2019 The OpenSDS Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2019 The OpenSDS Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type Cli
- func (c *Cli) ActivateLv(name, vg string) error
- func (c *Cli) CopyVolume(src, dest string, size int64) error
- func (c *Cli) CreateLvSnapshot(name, sourceLvName, vg string, size int64) error
- func (c *Cli) CreateVolume(name string, vg string, size int64) error
- func (c *Cli) DeactivateLv(name, vg string) error
- func (c *Cli) Delete(name, vg string) error
- func (c *Cli) Exists(name string) bool
- func (c *Cli) ExtendVolume(name, vg string, newSize int64) error
- func (c *Cli) ListVgs() (*[]VolumeGroup, error)
- func (c *Cli) LvHasSnapshot(name, vg string) bool
- func (c *Cli) LvIsActivate(name, vg string) bool
- type Config
- type Configs
- type Driver
- func (d *Driver) AttachSnapshot(snapshotId string, lvsPath string) (string, *model.ConnectionInfo, error)
- func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (snap *model.VolumeSnapshotSpec, err error)
- func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (vol *model.VolumeSpec, err error)
- func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
- func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error
- func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error
- func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error
- func (d *Driver) DetachSnapshot(snapshotId string, info *model.ConnectionInfo) error
- func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)
- func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)
- func (d *Driver) PullSnapshot(snapIdentifier string) (*model.VolumeSnapshotSpec, error)
- func (d *Driver) PullVolume(volIdentifier string) (*model.VolumeSpec, error)
- func (d *Driver) Setup() error
- func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error
- func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error
- func (*Driver) Unset() error
- func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
- type LVMConfig
- type MetricCli
- type MetricDriver
- func (d *MetricDriver) CollectMetrics(metricsList []string, instanceID string) ([]*model.MetricSpec, error)
- func (d *MetricDriver) Setup() error
- func (*MetricDriver) Teardown() error
- func (d *MetricDriver) ValidateMetricsSupportList(metricList []string, resourceType string) (supportedMetrics []string, err error)
- type VolumeGroup
Constants ¶
const ( KLvPath = "lvPath" KLvsPath = "lvsPath" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cli ¶ added in v0.5.2
type Cli struct { // Command executer BaseExecuter exec.Executer // Command Root executer RootExecuter exec.Executer }
func (*Cli) CopyVolume ¶ added in v0.5.2
func (*Cli) CreateLvSnapshot ¶ added in v0.5.2
func (*Cli) CreateVolume ¶ added in v0.5.2
func (*Cli) Delete ¶ added in v0.5.2
delete volume or snapshot
func (*Cli) ExtendVolume ¶ added in v0.5.2
func (*Cli) ListVgs ¶ added in v0.5.2
func (c *Cli) ListVgs() (*[]VolumeGroup, error)
type Config ¶ added in v0.5.2
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) AttachSnapshot ¶ added in v0.3.2
func (*Driver) CreateSnapshot ¶
func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (snap *model.VolumeSnapshotSpec, err error)
func (*Driver) CreateVolume ¶
func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (vol *model.VolumeSpec, err error)
func (*Driver) CreateVolumeGroup ¶ added in v0.1.8
func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
func (*Driver) DeleteSnapshot ¶
func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error
func (*Driver) DeleteVolume ¶
func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error
func (*Driver) DeleteVolumeGroup ¶ added in v0.1.8
func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error
func (*Driver) DetachSnapshot ¶ added in v0.3.2
func (d *Driver) DetachSnapshot(snapshotId string, info *model.ConnectionInfo) error
func (*Driver) ExtendVolume ¶
func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)
ExtendVolume ...
func (*Driver) InitializeConnection ¶
func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
func (*Driver) InitializeSnapshotConnection ¶ added in v0.3.2
func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error)
func (*Driver) ListPools ¶
func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)
func (*Driver) PullSnapshot ¶
func (d *Driver) PullSnapshot(snapIdentifier string) (*model.VolumeSnapshotSpec, error)
func (*Driver) PullVolume ¶
func (d *Driver) PullVolume(volIdentifier string) (*model.VolumeSpec, error)
func (*Driver) TerminateConnection ¶
func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error
func (*Driver) TerminateSnapshotConnection ¶ added in v0.3.2
func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error
func (*Driver) UpdateVolumeGroup ¶ added in v0.1.8
func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
type LVMConfig ¶
type MetricCli ¶ added in v0.5.2
type MetricCli struct { // Command executer BaseExecuter exec.Executer // Command Root executer RootExecuter exec.Executer }
func (*MetricCli) CollectMetrics ¶ added in v0.5.2
func (cli *MetricCli) CollectMetrics(metricList []string, instanceID string) (map[string]string, error)
CollectMetrics function is to call the cli for metrics collection. This will be invoked by lvm metric driver metricList -> metrics to be collected instanceID -> for which instance to be collected returnMap -> metrics to value map
type MetricDriver ¶ added in v0.5.2
type MetricDriver struct {
// contains filtered or unexported fields
}
func (*MetricDriver) CollectMetrics ¶ added in v0.5.2
func (d *MetricDriver) CollectMetrics(metricsList []string, instanceID string) ([]*model.MetricSpec, error)
CollectMetrics: Driver entry point to collect metrics. This will be invoked by the dock metricsList-> posted metric list instanceID -> posted instanceID metricArray -> the array of metrics to be returned
func (*MetricDriver) Setup ¶ added in v0.5.2
func (d *MetricDriver) Setup() error
func (*MetricDriver) Teardown ¶ added in v0.5.2
func (*MetricDriver) Teardown() error
func (*MetricDriver) ValidateMetricsSupportList ¶ added in v0.5.2
func (d *MetricDriver) ValidateMetricsSupportList(metricList []string, resourceType string) (supportedMetrics []string, err error)
ValidateMetricsSupportList:- is to check whether the posted metric list is in the uspport list of this driver metricList-> Posted metric list supportedMetrics -> list of supported metrics
Source Files
¶
- cli.go
- lvm.go
- lvm_metrics.go
- metrics_cli.go