From 975db42dd50e24c8d4228e3233d8bc895314a962 Mon Sep 17 00:00:00 2001 From: Lintong Jiang Date: Fri, 20 Dec 2019 12:20:49 -0800 Subject: [PATCH 1/2] Exposed the missing RetrieveSnapshotDetails API which is necessary for the backup --- vslm/global_object_manager.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/vslm/global_object_manager.go b/vslm/global_object_manager.go index 60cb208fb..f3f7a75bb 100644 --- a/vslm/global_object_manager.go +++ b/vslm/global_object_manager.go @@ -530,6 +530,22 @@ func (this *GlobalObjectManager) Revert(ctx context.Context, id vim.ID, snapshot return NewTask(this.c, res.Returnval), nil } +func(this *GlobalObjectManager) RetrieveSnapshotDetails(ctx context.Context, id vim.ID, snapshotId vim.ID) ( + *vim.VStorageObjectSnapshotDetails, error) { + req := types.VslmRetrieveSnapshotDetails{ + This: this.Reference(), + Id: id, + SnapshotId: snapshotId, + } + + res, err := methods.VslmRetrieveSnapshotDetails(ctx, this.c, &req) + if err != nil { + return nil, err + } + + return &res.Returnval, nil +} + func (this *GlobalObjectManager) QueryChangedDiskAreas(ctx context.Context, id vim.ID, snapshotId vim.ID, startOffset int64, changeId string) (*vim.DiskChangeInfo, error) { req := types.VslmQueryChangedDiskAreas{ From e866a93be606ddad4677743e390c9063ba89f2fd Mon Sep 17 00:00:00 2001 From: Lintong Jiang Date: Mon, 23 Dec 2019 11:46:34 -0800 Subject: [PATCH 2/2] Fixed the go format issues --- vslm/global_object_manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vslm/global_object_manager.go b/vslm/global_object_manager.go index f3f7a75bb..29c8f4f38 100644 --- a/vslm/global_object_manager.go +++ b/vslm/global_object_manager.go @@ -530,12 +530,12 @@ func (this *GlobalObjectManager) Revert(ctx context.Context, id vim.ID, snapshot return NewTask(this.c, res.Returnval), nil } -func(this *GlobalObjectManager) RetrieveSnapshotDetails(ctx context.Context, id vim.ID, snapshotId vim.ID) ( +func (this *GlobalObjectManager) RetrieveSnapshotDetails(ctx context.Context, id vim.ID, snapshotId vim.ID) ( *vim.VStorageObjectSnapshotDetails, error) { req := types.VslmRetrieveSnapshotDetails{ - This: this.Reference(), - Id: id, - SnapshotId: snapshotId, + This: this.Reference(), + Id: id, + SnapshotId: snapshotId, } res, err := methods.VslmRetrieveSnapshotDetails(ctx, this.c, &req)