feat: Docs (#15)

* feat: Docs

- Add docs for GCP Dynamic Host Plugin
- Remove references of instances group since we do not currently support this
This commit is contained in:
Elim Tsiagbey authored and GitHub committed 2024-10-29 12:52:56 -04:00
1 parent 779d383a24
commit a75b9bd310
7 files changed
+143 -98

No files matched your search

+2 -5
View File
@@ -452,7 +452,7 @@ func (p *HostPlugin) OnDeleteSet(ctx context.Context, req *pb.OnDeleteSetRequest
return &pb.OnDeleteSetResponse{}, nil
}
// ListHosts returns the list of instances based on filter or instance group name.
// ListHosts returns the list of instances based on instance filter.
func (p *HostPlugin) ListHosts(ctx context.Context, req *pb.ListHostsRequest) (*pb.ListHostsResponse, error) {
catalog := req.GetCatalog()
if catalog == nil {
@@ -588,11 +588,8 @@ func validateSet(s *hostsets.HostSet) error {
badFields := make(map[string]string)
_, filterSet := attrMap[ConstListInstancesFilter]
_, instanceGroupSet := attrMap[ConstInstanceGroup]
if instanceGroupSet && filterSet {
badFields["attributes"] = "must set instance group or filter, cannot set both"
} else if filterSet && len(attrs.Filters) == 0 {
if filterSet && len(attrs.Filters) == 0 {
badFields[fmt.Sprintf("attributes.%s", ConstListInstancesFilter)] = "must not be empty"
}