hpegl-vmaas-cmp-go-sdk

module
v0.1.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2024 License: MPL-2.0

README

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

Directories

Path Synopsis
pkg
models
This file contains struct models related to terraform, but not the API
This file contains struct models related to terraform, but not the API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL