vsphere-automation-sdk-go
所属分类:操作系统开发
开发工具:GO
文件大小:10310KB
下载次数:0
上传日期:2023-04-18 08:13:43
上 传 者:
sh-1993
说明: VMC的Go编程语言SDK(Beta)。NSX-T和vSphere服务将很快添加。
(Go programming language SDK (Beta) for VMC. NSX-T and vSphere services will be added soon.)
文件列表:
CODE-OF-CONDUCT.md (3376, 2023-04-18)
CONTRIBUTING.md (487, 2023-04-18)
LICENSE.txt (1527, 2023-04-18)
NOTICE.txt (475, 2023-04-18)
lib (0, 2023-04-18)
lib\cis (0, 2023-04-18)
lib\cis\CisPackageTypes.go (372, 2023-04-18)
lib\cis\SessionApiInterface.go (17464, 2023-04-18)
lib\cis\SessionClient.go (11498, 2023-04-18)
lib\cis\SessionProvider.go (6284, 2023-04-18)
lib\cis\SessionTypes.go (6847, 2023-04-18)
lib\cis\TasksApiInterface.go (26247, 2023-04-18)
lib\cis\TasksClient.go (9521, 2023-04-18)
lib\cis\TasksProvider.go (3951, 2023-04-18)
lib\cis\TasksTypes.go (13427, 2023-04-18)
lib\cis\task (0, 2023-04-18)
lib\cis\task\TaskPackageTypes.go (11895, 2023-04-18)
lib\go.mod (455, 2023-04-18)
lib\go.sum (4972, 2023-04-18)
lib\tasks (0, 2023-04-18)
lib\tasks\manager.go (20147, 2023-04-18)
lib\vapi (0, 2023-04-18)
lib\vapi\VapiPackageTypes.go (5096, 2023-04-18)
lib\vapi\metadata (0, 2023-04-18)
lib\vapi\metadata\MetadataPackageTypes.go (7146, 2023-04-18)
lib\vapi\metadata\authentication (0, 2023-04-18)
lib\vapi\metadata\authentication\AuthenticationPackageTypes.go (14533, 2023-04-18)
lib\vapi\metadata\authentication\ComponentClient.go (8506, 2023-04-18)
lib\vapi\metadata\authentication\ComponentTypes.go (5761, 2023-04-18)
lib\vapi\metadata\authentication\PackageClient.go (5870, 2023-04-18)
lib\vapi\metadata\authentication\PackageTypes.go (3851, 2023-04-18)
lib\vapi\metadata\authentication\ServiceClient.go (5873, 2023-04-18)
lib\vapi\metadata\authentication\ServiceTypes.go (3851, 2023-04-18)
lib\vapi\metadata\authentication\SourceClient.go (14784, 2023-04-18)
lib\vapi\metadata\authentication\SourceTypes.go (16263, 2023-04-18)
... ...
# vsphere-automation-sdk-go (Beta)
vSphere Automation SDK Beta for GO language.
[![License](https://img.shields.io/static/v1?&label=License&message=BSD-2-Clause&color=red&style=for-the-badge)](LICENSE.txt)
![Supported VMware Products](https://img.shields.io/static/v1?&label=Supported%20VMware%20Products&message=%20VMC%2C%20NSX-T%20&color=blue&style=for-the-badge)
# VMware vSphere Automation SDK for GO Language
## Table of Contents
- [Overview](#overview)
- [Table of Contents](#table-of-contents)
- [Quick Start Guide](#quick-start-guide)
- [API Documentation](#api-documentation)
- [Resource Maintenance](#resource-maintenance)
- [Repository Administrator Resources](#repository-administrator-resources)
- [Board Members](#board-members)
- [VMware Resources](#vmware-resources)
- [License](#license)
## 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.17
- Recommneded use of [Go Modules](https://blog.golang.org/using-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
```shell
go mod init sample
```
Executing this command will create go.mod file in current directory, as shown below
```golang
module sample
go 1.17
```
> 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.
```golang
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
```golang
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
```shell
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](https://godoc.org/github.com/vmware/vsphere-automation-sdk-go/services/vmc).
[NSX-T APIs](https://godoc.org/github.com/vmware/vsphere-automation-sdk-go/services/nsxt).
## Resource Maintenance
### Filing Issues
Any bugs or other issues should be filed with appropriate tags, within GitHub by way of the repositorys 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:
- Deyan Popov (VMware)
- Ankit Agrawal (VMware)
- Kunal Singh (VMware)
## VMware Resources
- [vSphere Automation SDK Overview](http://pubs.vmware.com/vsphere-65/index.jsp#com.vmware.vapi.progguide.doc/GUID-AF73991C-FC1C-47DF-8362-184B6544CFDE.html)
- [VMware Code](https://code.vmware.com/home)
- [VMware Developer Community](https://communities.vmware.com/community/vmtn/developer)
- [VMware VMC Go API Reference documentation](https://godoc.org/github.com/vmware/vsphere-automation-sdk-go/services/vmc).
## License
vsphere-automation-sdk-go is available under the [BSD-2 license](LICENSE.txt).
近期下载者:
相关文件:
收藏者: