Skip to content

Commit

Permalink
MOC sdk API change to include VM structure
Browse files Browse the repository at this point in the history
  • Loading branch information
neerajdixit-msft2 committed Aug 13, 2024
1 parent 05b8e88 commit cd60bd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions services/compute/virtualmachine/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
type Service interface {
Get(context.Context, string, string) (*[]compute.VirtualMachine, error)
CreateOrUpdate(context.Context, string, string, *compute.VirtualMachine) (*compute.VirtualMachine, error)
Hydrate(context.Context, string, string) (*compute.VirtualMachine, error)
Hydrate(context.Context, string, string, *compute.VirtualMachine) (*compute.VirtualMachine, error)
Delete(context.Context, string, string) error
Query(context.Context, string, string) (*[]compute.VirtualMachine, error)
Start(context.Context, string, string) error
Expand Down Expand Up @@ -61,8 +61,8 @@ func (c *VirtualMachineClient) CreateOrUpdate(ctx context.Context, group, name s
}

// Hydrate methods creates MOC representation of the VM resource
func (c *VirtualMachineClient) Hydrate(ctx context.Context, group, name string) (*compute.VirtualMachine, error) {
return c.internal.Hydrate(ctx, group, name)
func (c *VirtualMachineClient) Hydrate(ctx context.Context, group, name string, compute *compute.VirtualMachine) (*compute.VirtualMachine, error) {
return c.internal.Hydrate(ctx, group, name, compute)
}

// Delete methods invokes delete of the compute resource
Expand Down
4 changes: 2 additions & 2 deletions services/compute/virtualmachine/wssd.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ func (c *client) CreateOrUpdate(ctx context.Context, group, name string, sg *com
}

// Hydrate
func (c *client) Hydrate(ctx context.Context, group, name string) (*compute.VirtualMachine, error) {
request, err := c.getVirtualMachineRequest(wssdcloudproto.Operation_HYDRATE, group, name, nil)
func (c *client) Hydrate(ctx context.Context, group, name string, sg *compute.VirtualMachine) (*compute.VirtualMachine, error) {
request, err := c.getVirtualMachineRequest(wssdcloudproto.Operation_HYDRATE, group, name, sg)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit cd60bd2

Please sign in to comment.