Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Apiserver decouple] Second part #614

Merged
merged 35 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9d04ae9
Add model protobuf definition
leonwanghui Feb 14, 2019
5efb6b2
Merge branch 'second-part' of https://github.com/leonwanghui/opensds …
leonwanghui Feb 14, 2019
56af655
Merge branch 'development' of https://github.com/opensds/opensds into…
leonwanghui Feb 14, 2019
9cccd46
Merge branch 'development' of https://github.com/opensds/opensds into…
leonwanghui Feb 14, 2019
464fb72
Merge branch 'development' of https://github.com/opensds/opensds into…
leonwanghui Feb 14, 2019
d1ab18b
Update model proto file
leonwanghui Feb 14, 2019
af2e57b
Merge branch 'second-part' of https://github.com/leonwanghui/opensds …
leonwanghui Feb 14, 2019
9800d65
Fix some bugs
leonwanghui Feb 14, 2019
3fe12a3
Update model protobuf file
leonwanghui Feb 15, 2019
75a6e04
Update model protobuf
leonwanghui Feb 15, 2019
d5a3b36
Fix some conflicts
leonwanghui Feb 15, 2019
8c529dc
Fix some bugs
leonwanghui Feb 15, 2019
d3b29aa
Generate new fake grpc client
leonwanghui Feb 15, 2019
de4bc1e
Debug the code
leonwanghui Feb 15, 2019
330e360
Fix some bugs
leonwanghui Feb 15, 2019
808ddf8
Fix some ci bugs
leonwanghui Feb 18, 2019
2d496d1
Add some test cases
leonwanghui Feb 19, 2019
a65f00f
Recheck the ci
leonwanghui Feb 19, 2019
589ad2a
Fix a ci error
leonwanghui Feb 20, 2019
78b0502
Restart the ci check
leonwanghui Feb 21, 2019
7766f67
Fix some conflict errors
leonwanghui Feb 22, 2019
4382851
Remove some redundant code
leonwanghui Feb 22, 2019
cac50b9
Fix some conflict errors
leonwanghui Feb 27, 2019
9e13b95
Fix some conflict errors
leonwanghui Feb 27, 2019
91f2a2b
Fix some bugs
leonwanghui Feb 28, 2019
580b507
Update mock drivers
leonwanghui Feb 28, 2019
5848dd9
Fix some bugs
leonwanghui Feb 28, 2019
902307b
Fix some errors
leonwanghui Mar 1, 2019
c06232d
Improve some tests in e2e test
leonwanghui Mar 1, 2019
3b2321e
Fix some errors
leonwanghui Mar 1, 2019
aa33515
Merge branch 'development' of https://github.com/opensds/opensds into…
leonwanghui Mar 1, 2019
a484444
Merge branch 'development' of https://github.com/opensds/opensds into…
leonwanghui Mar 13, 2019
e1a9c4a
Address some comments from reviewers
leonwanghui Mar 13, 2019
ad93f69
Fix some conflict errors
leonwanghui Mar 14, 2019
398148f
Fix some conflict errors
leonwanghui Mar 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ test: build
script/CI/test

protoc:
cd pkg/dock/proto && protoc --go_out=plugins=grpc:. dock.proto
cd pkg/controller/proto && protoc --go_out=plugins=grpc:. controller.proto
cd pkg/model/proto && protoc --go_out=plugins=grpc:. model.proto

clean:
rm -rf $(BUILD_DIR) ./cmd/osdsapiserver/osdsapiserver ./cmd/osdslet/osdslet ./cmd/osdsdock/osdsdock
Expand Down
5 changes: 1 addition & 4 deletions cmd/osdslet/osdslet.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ func main() {
// Set up database session.
db.Init(&CONF.Database)

// Initialize Controller object.
c.Brain = c.NewController()

// Construct controller module grpc server struct and run controller server process.
if err := c.NewCtlServer(CONF.OsdsLet.ApiEndpoint).Run(); err != nil {
if err := c.NewController(CONF.OsdsLet.ApiEndpoint).Run(); err != nil {
panic(err)
}
}
18 changes: 9 additions & 9 deletions contrib/drivers/ceph/ceph.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/ceph/go-ceph/rbd"
log "github.com/golang/glog"
. "github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
"github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/pkg/utils/config"
"github.com/satori/go.uuid"
)
Expand Down Expand Up @@ -294,7 +294,7 @@ func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error {
return nil
}

func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*model.ConnectionInfo, error) {
func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error) {
poolName, ok := opt.GetMetadata()[KPoolName]
if !ok {
err := errors.New("Failed to find poolName in volume metadata!")
Expand All @@ -315,7 +315,7 @@ func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*model.Conn
}, nil
}

func (d *Driver) TerminateConnection(opt *pb.DeleteAttachmentOpts) error { return nil }
func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error { return nil }

func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error) {
mgr := NewSrcMgr(d.conf)
Expand Down Expand Up @@ -475,14 +475,14 @@ func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpt
return nil
}

func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts, vg *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"Method CreateVolumeGroup has not been implemented yet"}
func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"method CreateVolumeGroup has not been implemented yet"}
}

func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts, vg *model.VolumeGroupSpec, addVolumesRef []*model.VolumeSpec, removeVolumesRef []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, []*model.VolumeSpec, error) {
return nil, nil, nil, &model.NotImplementError{"Method UpdateVolumeGroup has not been implemented yet"}
func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"method UpdateVolumeGroup has not been implemented yet"}
}

func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts, vg *model.VolumeGroupSpec, volumes []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, error) {
return nil, nil, &model.NotImplementError{"Method UpdateVolumeGroup has not been implemented yet"}
func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error {
return &model.NotImplementError{"method DeleteVolumeGroup has not been implemented yet"}
}
2 changes: 1 addition & 1 deletion contrib/drivers/drbd/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"github.com/LINBIT/godrbdutils"
log "github.com/golang/glog"
"github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
"github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
)

// ReplicationDriver
Expand Down
12 changes: 6 additions & 6 deletions contrib/drivers/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"github.com/opensds/opensds/contrib/drivers/lvm"
"github.com/opensds/opensds/contrib/drivers/openstack/cinder"
"github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
"github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/testutils/driver"
)

Expand All @@ -50,9 +50,9 @@ type VolumeDriver interface {

ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)

InitializeConnection(opt *pb.CreateAttachmentOpts) (*model.ConnectionInfo, error)
InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)

TerminateConnection(opt *pb.DeleteAttachmentOpts) error
TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error

CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error)

Expand All @@ -66,17 +66,17 @@ type VolumeDriver interface {

// NOTE Parameter vg means complete volume group information, because driver
// may use it to do something and return volume group status.
CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts, vg *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error)
CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)

// NOTE Parameter addVolumesRef or removeVolumesRef means complete volume
// information that will be added or removed from group. Driver may use
// them to do some related operations and return their status.
UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts, vg *model.VolumeGroupSpec, addVolumesRef []*model.VolumeSpec, removeVolumesRef []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, []*model.VolumeSpec, error)
UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)

// NOTE Parameter volumes means volumes deleted from group, driver may use
// their compelete information to do some related operations and return
// their status.
DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts, vg *model.VolumeGroupSpec, volumes []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, error)
DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error

ListPools() ([]*model.StoragePoolSpec, error)
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/drivers/huawei/dorado/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/astaxie/beego/httplib"
log "github.com/golang/glog"
pb "github.com/opensds/opensds/pkg/dock/proto"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/pkg/utils/pwd"
)

Expand Down
34 changes: 17 additions & 17 deletions contrib/drivers/huawei/dorado/dorado.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

log "github.com/golang/glog"
. "github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
"github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/pkg/utils"
"github.com/opensds/opensds/pkg/utils/config"
"github.com/satori/go.uuid"
Expand Down Expand Up @@ -255,7 +255,7 @@ func (d *Driver) getTargetInfo() (string, string, error) {
return "", "", errors.New(msg)
}

func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*model.ConnectionInfo, error) {
func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error) {
if opt.GetAccessProtocol() == ISCSIProtocol {
return d.InitializeConnectionIscsi(opt)
}
Expand All @@ -265,7 +265,7 @@ func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*model.Conn
return nil, errors.New("No supported protocol for dorado driver.")
}

func (d *Driver) InitializeConnectionIscsi(opt *pb.CreateAttachmentOpts) (*model.ConnectionInfo, error) {
func (d *Driver) InitializeConnectionIscsi(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error) {

lunId := opt.GetMetadata()[KLunId]
hostInfo := opt.GetHostInfo()
Expand Down Expand Up @@ -319,7 +319,7 @@ func (d *Driver) InitializeConnectionIscsi(opt *pb.CreateAttachmentOpts) (*model
return connInfo, nil
}

func (d *Driver) TerminateConnection(opt *pb.DeleteAttachmentOpts) error {
func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error {
if opt.GetAccessProtocol() == ISCSIProtocol {
return d.TerminateConnectionIscsi(opt)
}
Expand All @@ -329,7 +329,7 @@ func (d *Driver) TerminateConnection(opt *pb.DeleteAttachmentOpts) error {
return nil
}

func (d *Driver) TerminateConnectionIscsi(opt *pb.DeleteAttachmentOpts) error {
func (d *Driver) TerminateConnectionIscsi(opt *pb.DeleteVolumeAttachmentOpts) error {
lunId := opt.GetMetadata()[KLunId]
hostId, err := d.client.GetHostIdByName(opt.GetHostInfo().GetHost())
if err != nil {
Expand Down Expand Up @@ -438,7 +438,7 @@ func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error) {
return pols, nil
}

func (d *Driver) InitializeConnectionFC(opt *pb.CreateAttachmentOpts) (*model.ConnectionInfo, error) {
func (d *Driver) InitializeConnectionFC(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error) {
lunId := opt.GetMetadata()[KLunId]
hostInfo := opt.GetHostInfo()
// Create host if not exist.
Expand Down Expand Up @@ -489,7 +489,7 @@ func (d *Driver) InitializeConnectionFC(opt *pb.CreateAttachmentOpts) (*model.Co
return fcInfo, nil
}

func (d *Driver) connectFCUseNoSwitch(opt *pb.CreateAttachmentOpts, wwpns string, hostId string) ([]string, map[string][]string, error) {
func (d *Driver) connectFCUseNoSwitch(opt *pb.CreateVolumeAttachmentOpts, wwpns string, hostId string) ([]string, map[string][]string, error) {
wwns := strings.Split(wwpns, ",")

onlineWWNsInHost, err := d.client.GetHostOnlineFCInitiators(hostId)
Expand Down Expand Up @@ -570,7 +570,7 @@ func (d *Driver) isInStringArray(s string, source []string) bool {
return false
}

func (d *Driver) TerminateConnectionFC(opt *pb.DeleteAttachmentOpts) error {
func (d *Driver) TerminateConnectionFC(opt *pb.DeleteVolumeAttachmentOpts) error {
// Detach lun
fcInfo, err := d.detachVolumeFC(opt)
if err != nil {
Expand All @@ -580,7 +580,7 @@ func (d *Driver) TerminateConnectionFC(opt *pb.DeleteAttachmentOpts) error {
return nil
}

func (d *Driver) detachVolumeFC(opt *pb.DeleteAttachmentOpts) (string, error) {
func (d *Driver) detachVolumeFC(opt *pb.DeleteVolumeAttachmentOpts) (string, error) {
wwns := strings.Split(opt.GetHostInfo().GetInitiator(), ",")
lunId := opt.GetMetadata()[KLunId]

Expand Down Expand Up @@ -728,21 +728,21 @@ func (d *Driver) clearHostRelatedResource(lunGrpId, viewId, hostId, hostGrpId st
}

func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error) {
return nil, &model.NotImplementError{S: "Method InitializeSnapshotConnection has not been implemented yet."}
return nil, &model.NotImplementError{S: "method InitializeSnapshotConnection has not been implemented yet."}
}

func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error {
return &model.NotImplementError{S: "Method TerminateSnapshotConnection has not been implemented yet."}
return &model.NotImplementError{S: "method TerminateSnapshotConnection has not been implemented yet."}
}

func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts, vg *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"Method CreateVolumeGroup did not implement."}
func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"method CreateVolumeGroup has not been implemented yet"}
}

func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts, vg *model.VolumeGroupSpec, addVolumesRef []*model.VolumeSpec, removeVolumesRef []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, []*model.VolumeSpec, error) {
return nil, nil, nil, &model.NotImplementError{"Method UpdateVolumeGroup did not implement."}
func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"method UpdateVolumeGroup has not been implemented yet"}
}

func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts, vg *model.VolumeGroupSpec, volumes []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, error) {
return nil, nil, &model.NotImplementError{"Method UpdateVolumeGroup did not implement."}
func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error {
return &model.NotImplementError{"method DeleteVolumeGroup has not been implemented yet"}
}
2 changes: 1 addition & 1 deletion contrib/drivers/huawei/dorado/replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

log "github.com/golang/glog"
. "github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
"github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/pkg/utils"
"github.com/opensds/opensds/pkg/utils/config"
)
Expand Down
31 changes: 11 additions & 20 deletions contrib/drivers/huawei/fusionstorage/dsware.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

log "github.com/golang/glog"
. "github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
. "github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/satori/go.uuid"
)

Expand Down Expand Up @@ -164,7 +164,7 @@ func (d *Driver) ListPools() ([]*StoragePoolSpec, error) {
return pols, nil
}

func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*ConnectionInfo, error) {
func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*ConnectionInfo, error) {
lunId := opt.GetMetadata()[LunId]
if lunId == "" {
return nil, fmt.Errorf("Lun id is empty.")
Expand Down Expand Up @@ -274,7 +274,7 @@ func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*Connection
return connInfo, nil
}

func (d *Driver) TerminateConnection(opt *pb.DeleteAttachmentOpts) error {
func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error {
lunId := opt.GetMetadata()[LunId]
if lunId == "" {
return fmt.Errorf("Lun id is empty.")
Expand Down Expand Up @@ -397,30 +397,21 @@ func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error {
}

func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*ConnectionInfo, error) {
return nil, &NotImplementError{S: "Method InitializeSnapshotConnection has not been implemented yet."}
return nil, &NotImplementError{S: "method InitializeSnapshotConnection has not been implemented yet."}
}

func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error {
return &NotImplementError{S: "Method TerminateSnapshotConnection has not been implemented yet."}
return &NotImplementError{S: "method TerminateSnapshotConnection has not been implemented yet."}
}

func (d *Driver) CreateVolumeGroup(
opt *pb.CreateVolumeGroupOpts,
vg *VolumeGroupSpec) (*VolumeGroupSpec, error) {
return nil, &NotImplementError{S: "Method CreateVolumeGroup has not been implemented yet."}
func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*VolumeGroupSpec, error) {
return nil, &NotImplementError{"method CreateVolumeGroup has not been implemented yet"}
}

func (d *Driver) UpdateVolumeGroup(
opt *pb.UpdateVolumeGroupOpts,
vg *VolumeGroupSpec,
addVolumesRef []*VolumeSpec,
removeVolumesRef []*VolumeSpec) (*VolumeGroupSpec, []*VolumeSpec, []*VolumeSpec, error) {
return nil, nil, nil, &NotImplementError{"Method UpdateVolumeGroup has not been implemented yet"}
func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*VolumeGroupSpec, error) {
return nil, &NotImplementError{"method UpdateVolumeGroup has not been implemented yet"}
}

func (d *Driver) DeleteVolumeGroup(
opt *pb.DeleteVolumeGroupOpts,
vg *VolumeGroupSpec,
volumes []*VolumeSpec) (*VolumeGroupSpec, []*VolumeSpec, error) {
return nil, nil, &NotImplementError{S: "Method DeleteVolumeGroup has not been implemented yet."}
func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error {
return &NotImplementError{"method DeleteVolumeGroup has not been implemented yet"}
}
2 changes: 1 addition & 1 deletion contrib/drivers/huawei/fusionstorage/fsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"time"

log "github.com/golang/glog"
pb "github.com/opensds/opensds/pkg/dock/proto"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/pkg/utils/exec"
)

Expand Down
18 changes: 9 additions & 9 deletions contrib/drivers/lvm/lvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/opensds/opensds/contrib/connector"
"github.com/opensds/opensds/contrib/drivers/lvm/targets"
. "github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
"github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/pkg/utils"
"github.com/opensds/opensds/pkg/utils/config"
"github.com/satori/go.uuid"
Expand Down Expand Up @@ -228,7 +228,7 @@ func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, erro
}, nil
}

func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*model.ConnectionInfo, error) {
func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error) {
initiator := opt.HostInfo.GetInitiator()
if initiator == "" {
initiator = "ALL"
Expand Down Expand Up @@ -262,7 +262,7 @@ func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*model.Conn
}, nil
}

func (d *Driver) TerminateConnection(opt *pb.DeleteAttachmentOpts) error {
func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error {
t := targets.NewTarget(d.conf.TgtBindIp, d.conf.TgtConfDir)
if err := t.RemoveExport(opt.GetVolumeId()); err != nil {
log.Error("Failed to initialize connection of logic volume:", err)
Expand Down Expand Up @@ -547,14 +547,14 @@ func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpt

}

func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts, vg *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"Method CreateVolumeGroup did not implement."}
func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"method CreateVolumeGroup has not been implemented yet"}
}

func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts, vg *model.VolumeGroupSpec, addVolumesRef []*model.VolumeSpec, removeVolumesRef []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, []*model.VolumeSpec, error) {
return nil, nil, nil, &model.NotImplementError{"Method UpdateVolumeGroup did not implement."}
func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error) {
return nil, &model.NotImplementError{"method UpdateVolumeGroup has not been implemented yet"}
}

func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts, vg *model.VolumeGroupSpec, volumes []*model.VolumeSpec) (*model.VolumeGroupSpec, []*model.VolumeSpec, error) {
return nil, nil, &model.NotImplementError{"Method UpdateVolumeGroup did not implement."}
func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error {
return &model.NotImplementError{"method DeleteVolumeGroup has not been implemented yet"}
}
2 changes: 1 addition & 1 deletion contrib/drivers/lvm/lvm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"testing"

. "github.com/opensds/opensds/contrib/drivers/utils/config"
pb "github.com/opensds/opensds/pkg/dock/proto"
"github.com/opensds/opensds/pkg/model"
pb "github.com/opensds/opensds/pkg/model/proto"
"github.com/opensds/opensds/pkg/utils/config"
"github.com/opensds/opensds/pkg/utils/exec"
)
Expand Down
Loading