Skip to content

Commit

Permalink
Add additional PBM methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rikatz authored and dougm committed Oct 30, 2023
1 parent f3c1fca commit 6de69ad
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions pbm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,31 @@ func (c *Client) GetProfileNameByID(ctx context.Context, profileID string) (stri
}
return "", fmt.Errorf("no pbm profile found with id: %q", profileID)
}

func (c *Client) QueryAssociatedProfile(ctx context.Context, entity types.PbmServerObjectRef) ([]types.PbmProfileId, error) {
req := types.PbmQueryAssociatedProfile{
This: c.ServiceContent.ProfileManager,
Entity: entity,
}

res, err := methods.PbmQueryAssociatedProfile(ctx, c, &req)
if err != nil {
return nil, err
}

return res.Returnval, nil
}

func (c *Client) QueryAssociatedProfiles(ctx context.Context, entities []types.PbmServerObjectRef) ([]types.PbmQueryProfileResult, error) {
req := types.PbmQueryAssociatedProfiles{
This: c.ServiceContent.ProfileManager,
Entities: entities,
}

res, err := methods.PbmQueryAssociatedProfiles(ctx, c, &req)
if err != nil {
return nil, err
}

return res.Returnval, nil
}

0 comments on commit 6de69ad

Please sign in to comment.