Skip to content

claranet/agilec-go-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Huawei Agile Controller DCN Go Client

This repository contains the golang client SDK to interact with HUAWEI Agile Controller using REST API calls. This SDK is used by terraform-provider-agilec.

Installation

Use go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies.

$go get github.com/claranet/agilec-go-client

Overview

  • client :- This package contains the HTTP Client configuration as well as service methods which serves the CRUD operations on the Model Objects in Huawei Agile Controller.

  • models :- This package contains all the models structs and utility methods for the same.

  • tests :- This package contains the unit tests for the CRUD operations that can be performed on the Model Objects.

How to Use

import the client in your go application and retrieve the client object by calling client.GetClient() method.

import github.com/claranet/agilec-go-client/client
client.GetClient("HOST", "Username", "Password", client.Insecure(true/false))

Use that client object to call the service methods to perform the CRUD operations on the model objects.

Example,

client.CreateTenant(id, name, TenantAttributes)
# TenantAttributes is struct present in models/tenant.go

About

Huawei Agile Controller DCN Go Client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published