Skip to content

Commit

Permalink
vcsim: Add PbmCheckCompatibility method in pbm simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
vdkotkar authored and dougm committed May 7, 2024
1 parent 37269b6 commit 6a0d7e7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pbm/simulator/simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,26 @@ func (m *PlacementSolver) PbmCheckRequirements(req *types.PbmCheckRequirements)

return body
}

func (m *PlacementSolver) PbmCheckCompatibility(req *types.PbmCheckCompatibility) soap.HasFault {
body := new(methods.PbmCheckCompatibilityBody)
body.Res = new(types.PbmCheckCompatibilityResponse)

for _, ds := range simulator.Map.All("Datastore") {
// TODO: filter
ref := ds.Reference()
body.Res.Returnval = append(body.Res.Returnval, types.PbmPlacementCompatibilityResult{
Hub: types.PbmPlacementHub{
HubType: ref.Type,
HubId: ref.Value,
},
MatchingResources: nil,
HowMany: 0,
Utilization: nil,
Warning: nil,
Error: nil,
})
}

return body
}

0 comments on commit 6a0d7e7

Please sign in to comment.