All Projects → vmware → Vsphere Automation Sdk Java

vmware / Vsphere Automation Sdk Java

Licence: mit
Java samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Vsphere Automation Sdk Java

Vsphere Automation Sdk Rest
REST (Postman and JavaScript) samples and API reference documentation for vSphere using the VMware REST API
Stars: ✭ 182 (+37.88%)
Mutual labels:  api-client, restful-api, samples, documentation, bindings
Vsphere Automation Sdk Python
Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Stars: ✭ 451 (+241.67%)
Mutual labels:  api-client, restful-api, samples, documentation, bindings
vsphere-automation-sdk-.net
[DEPRECATED] Please see README. C# samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Stars: ✭ 67 (-49.24%)
Mutual labels:  api-client, samples, bindings, restful-api
vsphere-automation-sdk-rest
REST (Postman and JavaScript) samples and API reference documentation for vSphere using the VMware REST API
Stars: ✭ 194 (+46.97%)
Mutual labels:  api-client, samples, bindings, restful-api
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+7956.06%)
Mutual labels:  api-client, restful-api
Express Typescript Boilerplate
A delightful way to building a RESTful API with NodeJs & TypeScript by @w3tecch
Stars: ✭ 2,293 (+1637.12%)
Mutual labels:  restful-api, documentation
YuiAPI
一个浏览器API测试客户端,API文档生成器,支持chrome/firefox/新版edge
Stars: ✭ 25 (-81.06%)
Mutual labels:  api-client, restful-api
Woocommerce.net
A .NET Wrapper for WooCommerce/WordPress REST API
Stars: ✭ 247 (+87.12%)
Mutual labels:  api-client, restful-api
Datafire
A framework for building integrations and APIs
Stars: ✭ 487 (+268.94%)
Mutual labels:  api-client, restful-api
Awesome Docs With Static Site Generators
Pointers to all templates and implementations based on static site generators
Stars: ✭ 44 (-66.67%)
Mutual labels:  samples, documentation
Restful Api Guidelines
A model set of guidelines for RESTful APIs and Events, created by Zalando
Stars: ✭ 1,397 (+958.33%)
Mutual labels:  restful-api, documentation
Handbook
📖 Complete documentation for WP-CLI
Stars: ✭ 129 (-2.27%)
Mutual labels:  documentation
Anyapi
AnyAPI is a library that helps you to write any API wrappers with ease and in pythonic way.
Stars: ✭ 126 (-4.55%)
Mutual labels:  api-client
Scala Samples
There are pieces of scala code that explain Scala syntax and related things - like what you can do with all this
Stars: ✭ 125 (-5.3%)
Mutual labels:  samples
Rust Gsl
A GSL (the GNU Scientific Library) binding for Rust
Stars: ✭ 125 (-5.3%)
Mutual labels:  bindings
Typescript Vs Flowtype
Differences between Flowtype and TypeScript -- syntax and usability
Stars: ✭ 1,671 (+1165.91%)
Mutual labels:  documentation
Bigcommerce Api Php
Connect PHP applications with the Bigcommerce Platform
Stars: ✭ 128 (-3.03%)
Mutual labels:  api-client
Grpc Gateway
The gRPC-Gateway is a plugin of the Google protocol buffers compiler protoc. It reads protobuf service definitions and generates a reverse-proxy server which translates a RESTful HTTP API into gRPC. This server is generated according to the google.api.http annotations in your service definitions.
Stars: ✭ 12,223 (+9159.85%)
Mutual labels:  restful-api
Gir
Tool to generate rust bindings and user API for glib-based libraries
Stars: ✭ 124 (-6.06%)
Mutual labels:  bindings
Pw Pwnage Cfworker
Deploy a Cloudflare Worker to sanely score users' new passwords with zxcvbn AND check for matches against haveibeenpwned's 7.8+ billion breached accounts
Stars: ✭ 125 (-5.3%)
Mutual labels:  restful-api

VMware vSphere Automation SDK for Java

Table of Contents

Abstract

This document describes the vSphere Automation Java SDK samples that use the vSphere Automation java client library. Additionally, some of the samples demonstrate the combined use of the vSphere Automation and vSphere Web Service APIs. The samples have been developed to work with JDK 1.8.

Supported OnPrem vCenter Releases:

vCenter 6.0, 6.5, 6.7, 6.7U1, 6.7U2, 6.7U3, 7.0, 7.0U1, 7.0U2

Please refer to the notes in each sample for detailed compatibility information.

VMware Cloud on AWS Support:

The VMware Cloud on AWS API and samples are currently available as a preview and are subject to change in the future.

Quick Start Guide

This document will walk you through getting up and running with the Java SDK Samples. Prior to running the samples you will need to setup a vCenter test environment and install maven, the following steps will take you through this process. Before you can run the SDK samples we'll need to walk you through the following steps:

  1. Setting up maven
  2. Setting up a vSphere test environment

Setting up maven

The SDK requires maven to build the samples.

  1. Download the latest maven from https://maven.apache.org/download.cgi and extract it to your machine.
  2. Install JDK8 and set JAVA_HOME to the directory where JDK is installed.
    export JAVA_HOME=<jdk-install-dir>
    
  3. Update PATH environment variable to include the maven and jdk "bin" directories.
    export PATH=<maven-bin-dir>:$JAVA_HOME/bin:$PATH
    

Setting up a vSphere Test Environment

NOTE: The samples are intended to be run against a freshly installed non-Production vSphere setup as the scripts may make changes to the test environment and in some cases can destroy items when needed.

To run the samples a vSphere test environment is required with the following minimum configuration

  • 1 vCenter Server
  • 2 ESX hosts
  • 1 NFS Datastore with at least 3GB of free capacity

Apart from the above, each individual sample may require additional setup. Please refer to the sample parameters for more information on that.

Building the Samples

In the root directory of your folder after cloning the repository, run the below maven commands -

mvn initialize

mvn clean install

Running the Samples

When running the samples, parameters can be provided either on the command line, in a configuration file (using the --config-file parameter), or a combination of both. The parameter values specified on the command line will override those specified in the configuration file. When using a configuration file, each required parameter for the sample must be specified either in the configuration file or as a command line parameter. Each parameter specified in the configuration file should be in the "key=value" format. For example:

vmname=TestVM

cluster=Cluster1

Note: Please specify the fully qualified “hostname” of the server for running the samples to avoid hostname verification errors.

Use a command like the following to display usage information for a particular sample.

$java -ea -cp target/vsphere-samples-7.0.2.0.jar vmware.samples.vcenter.vm.list.ListVMs

java -cp target/vsphere-samples-7.0.2.0.jar vmware.samples.vcenter.vm.list.ListVMs [--config-file <CONFIGURATION FILE>]
       --server <SERVER> --username <USERNAME> --password <PASSWORD> --cluster <CLUSTER> [--truststorepath <ABSOLUTE PATH OF JAVA TRUSTSTORE FILE>]
       [--truststorepassword <JAVA TRUSTSTORE PASSWORD>] [--cleardata] [--skip-server-verification]

Sample Options:
    --config-file <CONFIGURATION FILE>                         OPTIONAL: Absolute path to  the configuration file containing the sample options.
                                                               NOTE: Parameters can be specified either in the configuration file or on the command
                                                               line. Command line parameters will override values specified in the configuration file.
    --server <SERVER>                                          hostname of vCenter Server
    --username <USERNAME>                                      username to login to the vCenter Server
    --password <PASSWORD>                                      password to login to the vCenter Server
    --truststorepath <ABSOLUTE PATH OF JAVA TRUSTSTORE FILE>   Specify the absolute path to the file containing the trusted server certificates. This
                                                               option can be skipped if the parameter skip-server-verification is specified.
    --truststorepassword <JAVA TRUSTSTORE PASSWORD>            Specify the password for the java truststore. This option can be skipped if the
                                                               parameter skip-server-verification is specified.
    --cleardata                                                OPTIONAL: Specify this option to undo all persistent results of running the sample.
    --skip-server-verification                                 OPTIONAL: Specify this option if you do not want to perform SSL certificate
                                                               verification.
                                                               NOTE: Circumventing SSL trust in this manner is unsafe and should not be used with
                                                               production code. This is ONLY FOR THE PURPOSE OF DEVELOPMENT ENVIRONMENT.

Use a command like the following to run a sample using only command line parameters:

$java -ea -cp target/vsphere-samples-7.0.2.0.jar vmware.samples.vcenter.vm.list.ListVMs --server servername --username [email protected] --password password --skip-server-verification

Use a command like the following to run a sample using only a configuration file:

$java -ea -cp target/vsphere-samples-7.0.2.0.jar vmware.samples.vcenter.vm.list.ListVMs --config-file sample.properties

Use the following command to run the sample using a combination of configuration file and command line parameters:

$java -ea -cp target/vsphere-samples-7.0.2.0.jar vmware.samples.vcenter.vm.list.ListVMs --config-file sample.properties --server servername

Importing the samples to eclipse

To generate the eclipse project files for the samples run the below command

mvn eclipse:clean eclipse:eclipse

Once generated, follow below steps to import the project to eclipse:

  1. Go to File -> Import.
  2. Select Existing Projects into Workspace.
  3. Select the root directory as the directory where the samples are located.
  4. Click Finish

Adding a new sample

Once the eclipse project is imported, follow below steps to add a new sample using the sample template:

  1. Right click on the project and select New -> Package. Specify a package name in the wizard and click Finish.
  2. Right click on the newly created package and click Import -> General -> File System. In the dialog box, click "Browse" and select the "sample-template" folder in the root directory.
  3. Select the "SampleClass" in the dialog box and click finish.

This will import a basic sample class to your package, which you can then customize according to your needs.

API Documentation

vSphere API Documentation

VMware Cloud on AWS API Documentation

NSX API Documentation

Submitting samples

Developer Certificate of Origin

Before you start working with this project, please read our Developer Certificate of Origin. All contributions to this repository must be signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on as an open-source patch.

Required Information

The following information must be included in the README.md for the sample.

  • Author Name
    • This can include full name, email address or other identifiable piece of information that would allow interested parties to contact author with questions.
  • Date
    • Date the sample was originally written
  • Minimal/High Level Description
    • What does the sample do ?
  • Any KNOWN limitations or dependencies

Suggested Information

The following information should be included when possible. Inclusion of information provides valuable information to consumers of the resource.

  • vSphere version against which the sample was developed/tested
  • SDK version against which the sample was developed/tested
  • Java version against which the sample was developed/tested

Contribution Process

  • Follow the GitHub process
    • Please use one branch per sample or change-set
    • Please use one commit and pull request per sample
    • Please post the sample output along with the pull request
    • If you include a license with your sample, use the project license

Code Style

Please conform to oracle java coding standards. http://www.oracle.com/technetwork/articles/javase/codeconvtoc-136057.html

Resource Maintenance

Maintenance Ownership

Ownership of any and all submitted samples are maintained by the submitter.

Filing Issues

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

Resolving Issues

Any community member can resolve issues within the repository, however only the board member can approve the update. Once approved, assuming the resolution involves a pull request, only a board member will be able to merge and close the request.

VMware Sample Exchange

It is highly recommended to add any and all submitted samples to the VMware Sample Exchange: https://code.vmware.com/samples

Sample Exchange can be allowed to access your GitHub resources, by way of a linking process, where they can be indexed and searched by the community. There are VMware social media accounts which will advertise resources posted to the site and there's no additional accounts needed, as the VMware Sample Exchange uses MyVMware credentials.

Repository Administrator Resources

Board Members

Board members are volunteers from the SDK community and VMware staff members, board members are not held responsible for any issues which may occur from running of samples from this repository.

Members:

  • Sumit Agrawal (VMware)
  • Shyla Srinivas (VMware)

Approval of Additions

Items added to the repository, including items from the Board members, require 2 votes from the board members before being added to the repository. The approving members will have ideally downloaded and tested the item. When two “Approved for Merge” comments are added from board members, the pull can then be committed to the repository.

VMware Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].