GithubHelp home page GithubHelp logo

vanditsmehta / vsphere-automation-sdk-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vmware/vsphere-automation-sdk-go

0.0 0.0 0.0 6.59 MB

Go programming language SDK (Beta) for VMC. NSX-T and vSphere services will be added soon.

License: Other

Go 100.00%

vsphere-automation-sdk-go's Introduction

vsphere-automation-sdk-go (Beta)

vSphere Automation SDK Beta for GO language.

License

Supported VMware Products

VMware vSphere Automation SDK for GO Language

Table of Contents

Overview

This document describes the vSphere Automation GO SDK services(client-bindings), that use the vSphere Automation GO client library. Currently, vSphere Automation Go SDK supports VMC and NSX-T. Support for vSphere(vCenter) will be added soon.

Quick Start Guide

This document will walk you through setting up the SDK to start writing your Sample.

Environment Set Up

Pre-Requisites

  • golang 1.13
  • Recommneded use of Go Modules for development, as it will be very convenient and easy to upgrade to major version releases.

Go Environment Variables

  • GO111MODULE environment variable is recommended to be set as

    auto: if all the Go projects in your development environment are not compatible with Go Modules.

    on: if all your projects are compatible with Go Modules.

  • GOPATH environment variable is required to be set only if "GO111MODULE" is set to "auto".

Start Writing your Sample

Create Go Module

Start with creating Go Module by executing the command

go mod init sample

Executing this command will create go.mod file in current directory, as shown below

module sample

go 1.13

Note

  • If "GOPATH" is set in your development environment, use directory outside "GOPATH" as workspace for writing your sample.
  • If the Go Module, you are developing, is to be stored on any public or private Code repository, use fully qualified URL as the module name like for module vsphere-automation-sdk-go on github.com has module name "github.com/vmware/vsphere-automation-sdk-go".

Writing your Sample

You can directly start writing your sample.go file by importing the required Go Modules. For VMC services import

github.com/vmware/vsphere-automation-sdk-go/services/vmc

For NSX-T services import

github.com/vmware/vsphere-automation-sdk-go/services/nsxt

You can refer to the below code excerpt.

package main

import (
	"fmt"
	"os"

	vmc "github.com/vmware/vsphere-automation-sdk-go/services/vmc"
.
.
.

Note

  • If you are using IDE to develop and want to use auto-completion, navigation and other such features for fast and easy development, just write all your imports with "_" (underscore) as alias as shown below

    package main
    
    import (
        _ "github.com/vmware/vsphere-automation-sdk-go/services/vmc"
    )

    and then execute below command in the directory with the go.mod file

    go test

    OR

    go build
    

This will fetch all the dependency modules and your IDE code-related features will start working.

API Documentation

The API documentation can be accessed from here:

VMC APIs. NSX-T APIs.

Resource Maintenance

Filing Issues

Any bugs or other issues should be filed with appropriate tags, within GitHub by way of the repository’s Issue Tracker.

Resolving Issues

This project contains auto-generated code, therefore code contributions will not be accepted. However, vsphere-automation-sdk-go team welcomes issue reports and we will do our best to ensure that future population of repository will contain a fix.

Repository Administrator Resources

Board Members

Board members are volunteers from the SDK community and VMware staff members.

Members:

  • Vandit Mehta (VMware)
  • Sreenidhi Sreesha (VMware)
  • Tianhao He (VMware)

VMware Resources

License

vsphere-automation-sdk-go is available under the BSD-2 license.

vsphere-automation-sdk-go's People

Contributors

vanditsmehta avatar vmwsrpbot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.