This package provides the official Go library for the CMP API.
This is being developed in conjunction with the VMaaS Terraform Provider.
package main
import (
"fmt"
"github.com/HewlettPackard/hpegl-vmaas-cmp-go-sdk/pkg/client"
"golang.org/x/net/context"
"os"
)
func main(){
ctx := context.Background()
headers := map[string]string{
"location": "<location_name>",
"space": "<space_name>",
"Authorization": "<iam_token>",
}
config := client.Configuration{
Host: "https://vmaas-cmp.intg.hpedevops.net",
DefaultHeader: headers,
}
apiClient := client.NewAPIClient(&config)
groupsClient := client.GroupsApiService{
apiClient,
config,
}
resp, err := groupsClient.GetASpecificGroup(ctx, 1)
if err != nil {
fmt.Printf("Get Group Error %v", err)
os.Exit(1)
}
fmt.Printf("Group Name: %v | Group Location: %v", resp.Group.Name, resp.Group.Location)
}