Skip to content

Latest commit

 

History

History
44 lines (37 loc) · 1.32 KB

README.md

File metadata and controls

44 lines (37 loc) · 1.32 KB

CircleCI

hpegl-vmaas-cmp-go-sdk

This package provides the official Go library for the CMP API.

This is being developed in conjunction with the VMaaS Terraform Provider.

Sample Usage

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)
}