Giter VIP home page Giter VIP logo

vsphere-automation-sdk-java's Introduction

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 7.0, 7.0U1, 7.0U2, 7.0U3, 8.0, 8.0U1 and 8.0U2

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

Supported NSX-T Releases

NSX-T 2.2, 2.3, 3.0, 4.0.0.0, 4.0.1

Latest VMware Cloud on AWS Release:

VMC M24 (1.24) (Release Notes)

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 JDK 8 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-8.0.2.1.jar vmware.samples.vcenter.vm.list.ListVMs

java -cp target/vsphere-samples-8.0.2.1.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-8.0.2.1.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-8.0.2.1.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-8.0.2.1.jar vmware.samples.vcenter.vm.list.ListVMs --config-file sample.properties --server servername

Connect to VMware Cloud on AWS

using csp api_token (also called refresh_token)

import com.vmware.vmc.Orgs;
import com.vmware.vmc.model.Organization;
import com.vmware.vapi.vmc.client.VmcClients;

ApiClient apiClient = VmcClients.createDefault("<refresh_token>");
Orgs orgsStub = apiClient.createStub(Orgs.class);
Organization orgDetails = orgsStub.get("<org_id>");
System.out.println(orgDetails);

Output in console:

Organization (com.vmware.vmc.model.organization) => {
    updated = 8/18/22 20:41:34 +0000,
    userId = xxxx-xxxx-xxxx,
    updatedByUserId = xxxx-xxxx-xxxx,
    created = 10/3/17 22:19:31 +0000,
    version = 4,
    updatedByUserName = xxxx-xxxx-xxxx,
    userName = xxxx-xxxx-xxxx,
    id = xxxx-xxxx-xxxx,
    orgType = INTERNAL_NON_CORE,
    displayName = xxxx/xxxx/xxxx,
    name = xxxx,
    projectState = CREATED,
    properties = OrgProperties (com.vmware.vmc.model.org_properties) => {
        values = {...}
    }
    [dynamic fields]: {
        org_seller_info = <unset>
    }
}

using client_credentials (Server to Server OAuth app's id and secret)

import com.vmware.vmc.Orgs;
import com.vmware.vmc.model.Organization;
import com.vmware.vapi.vmc.client.VmcClients;

ApiClient apiClient = VmcClients.createDefault("<client_id>", "<client_secret>", "<org_id>");
orgsStub = apiClient.createStub(Orgs.class);
Organization orgDetails = orgsStub.get("<org_id>");
System.out.println(orgDetails);

Output in console:

Organization (com.vmware.vmc.model.organization) => {
    updated = 8/18/22 20:41:34 +0000,
    userId = xxxx-xxxx-xxxx,
    updatedByUserId = xxxx-xxxx-xxxx,
    created = 10/3/17 22:19:31 +0000,
    version = 4,
    updatedByUserName = xxxx-xxxx-xxxx,
    userName = xxxx-xxxx-xxxx,
    id = xxxx-xxxx-xxxx,
    orgType = INTERNAL_NON_CORE,
    displayName = xxxx/xxxx/xxxx,
    name = xxxx,
    projectState = CREATED,
    properties = OrgProperties (com.vmware.vmc.model.org_properties) => {
        values = {...}
    }
    [dynamic fields]: {
        org_seller_info = <unset>
    }
}

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

Support

For official support, users with Active - Premium SDK Support, Standard SDK Support, Premier/Success 360, and VMware Select Support can reach out to VMware Global Support for any issues in line with our SDK and API Support policy. For community support, please open a Github issue or start a Discussion.

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

Versioning

vSphere Automation Java SDK - X.Y.Z.U.P

vCenter-related: X.Y - (Major release), Z - (Update release), U - (Patch)

vSphere Automation Java SDK - related: P - (vSphere Automation Java SDK Maintenance patches)

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:

  • Ankit Agrawal (VMware)
  • Martin Cvetanov (VMware)
  • Shweta Purohit (VMware)
  • Jobin George (VMware)
  • Kunal Singh (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

vsphere-automation-sdk-java's People

Contributors

aagrawal3 avatar alanrenouf avatar amanpriyad avatar bhagatp10 avatar dependabot[bot] avatar dnmange avatar ggoodvmw avatar jobingeo avatar karaatanassov avatar kunalpmj avatar mashaor avatar saloneerege avatar shwetapurohit avatar shylasrinivas avatar strefethen avatar sumitagrawal007 avatar vanditsmehta avatar vthinkbeyondvm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsphere-automation-sdk-java's Issues

vim25.jar is not compatible with vCenter v7.0U2 (listed as compatible)

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

Environment

  • SDK version: 7.0.U2 (master branch)

  • Java version: openjdk version "1.8.0_282"

  • vSphere version: 7.0.U2

Steps or code snippet to reproduce

Actual behavior

The readme declares compatibility with vCenter v7.0U2, but https://github.com/vmware/vsphere-automation-sdk-java/blob/master/lib/vim25.jar is more than one year old at version 6.7

Expected behavior

Libraries in this project should be aligned with stated compatible versions of vCenter

command line argument doesnt support config file at the end

  • [yes ] I am using the latest SDK version
  • [yes ] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [yes ] I have searched existing issues

Description

While Trying to specify the arguments in config file and passing it as last argument in the command line parameters it is failing with the

Environment

  • SDK version: 6.7.0
  • Java version: 1.8
  • vSphere version:

Steps or code snippet to reproduce

  1. Create a config file with a dummy variable like below
    power-config.properties -> dummy=true

  2. Take PowerLifeCycle Sample while running this sample, provide below arguments

    --server sc2...eng.vmware.com --username adminis... --password **** --vmname Sample_Basic_VM_for_Simple_Testbed --skip-server-verification --config-file ../../power- config.properties

  3. Now run the sample and you will see below error message:
    Cannot locate configuration source sc2...eng.vmware.com

  4. Now make the config-file as your first argument, and you will see no error message and sample will run as expected.

Actual behavior

config-file passing as last argument is not supported

Expected behavior

config-file as argument should be supported independent of its position in argument list

SDK License

General question for clarity. I noticed that the license for the SDK is MIT. Does that apply to all the jar files in the /lib directory as well?

Deploy libraries to maven central

It's quite inconvenient to deal with this git repo when using maven/gradle/ivy/sbt or any other JVM build tool. It'd be great if this deployed to maven central.

OperationNotFound exception with vSphere 6.0

I'm trying to build off of the "simple VM" example in this repo. I've tried refactoring some of the design to use more beans:

    @Bean
    public VMTypes.PlacementSpec vmPlacementSpec(StubFactory stubFactory, StubConfiguration sessionStubConfig,
                                                 Cluster clusterService,
                                                 Datacenter datacenterService,
                                                 Datastore datastoreService,
                                                 Folder folderService) {
        /*
         *  Create the vm placement spec with the datastore, resource pool,
         *  cluster and vm folder
         */
        VMTypes.PlacementSpec vmPlacementSpec = new VMTypes.PlacementSpec();

        String datacenterId = getDatacenter(stubFactory, sessionStubConfig, datacenterName);

        String datastoreId = getDatastoreId(datastoreService, datacenterId);

        vmPlacementSpec.setDatastore(datastoreId);
        vmPlacementSpec.setCluster(getClusterId(clusterService, clusterName));
        vmPlacementSpec.setFolder(getFolderId(folderService, datastoreId, vmFolderName));

        log.debug("Successfully created vmPlacementSpec bean");
        return vmPlacementSpec;
    }

When this block runs, the getDatacenter - which contains the same body as this repo - throws an OperationNotFound exception:

[main] WARN org.springframework.context.support.GenericApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'vmPlacementSpec' defined in io.pivotal.ecosystem.dwaas.vmware.vSphereClientConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: 
Failed to instantiate [com.vmware.vcenter.VMTypes$PlacementSpec]: Factory method 'vmPlacementSpec' threw exception; nested exception is com.vmware.vapi.std.errors.OperationNotFound: OperationNotFound (com.vmware.vapi.std.errors.operation_not_found) => {
    messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
    id = vapi.method.input.invalid.interface,
    defaultMessage = Cannot find service 'com.vmware.vcenter.datacenter'.,
    args = [com.vmware.vcenter.datacenter]
}],
    data = <null>
}

Any help on this would be greatly appreciated!

Can't reorder gateway firewall rule using apiClient (nsx-t)

  • [O] I am using the latest SDK version 2.4.1
  • [O] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [O] I have searched existing issues

Description

Hi! I am developing automation tool which create gateway firewall rule.

I don't know if I can post a question here but I have no place to post.

I developed using java sdk (2.4.1) But I could not use revise method.

I filled out parameter but it doesn't work.

Environment

  • SDK version: 2.4.1
  • Java version: 1.8
  • vSphere version:

Steps or code snippet to reproduce

ApiClient apiClient = getApiClient(firewallInfo);
Rules ruleService = apiClient.createStub(Rules.class);
String ruleId = fwRuleInfo.getAssignedRuleId();
String location = fwRuleInfo.getOrderLocation();
Rule rule = ruleService.get(DEFAULT_DOMAIN_ID, DEFAULT_POLICY_ID, ruleId);
// bottom
ruleService.revise(DEFAULT_DOMAIN_ID, DEFAULT_POLICY_ID, ruleId, rule, null, RulesTypes.REVISE_OPERATION_BOTTOM);

// after
ruleService.revise(DEFAULT_DOMAIN_ID, DEFAULT_POLICY_ID, ruleId, rule, location, RulesTypes.REVISE_OPERATION_AFTER);

// before
ruleService.revise(DEFAULT_DOMAIN_ID, DEFAULT_POLICY_ID, ruleId, rule, location, RulesTypes.REVISE_OPERATION_BEFORE);

Actual behavior

ErrorMessage is below.
com.vmware.vapi.std.errors.InvalidRequest: InvalidRequest (com.vmware.vapi.std.errors.invalid_request) => {
messages = [],
data = struct => {error_message=Method is not allowed, error_code=282, module_name=common-services},
errorType = INVALID_REQUEST
}
at com.vmware.vapi.std.errors.InvalidRequest._newInstance2(InvalidRequest.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.createStructBinding(JavaClassStructConverter.java:220)
at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.fromValue(JavaClassStructConverter.java:78)
at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.fromValue(JavaClassStructConverter.java:32)
at com.vmware.vapi.internal.bindings.TypeConverterImpl$ValueToJavaVisitor.visit(TypeConverterImpl.java:346)
at com.vmware.vapi.bindings.type.ErrorType.accept(ErrorType.java:31)
at com.vmware.vapi.internal.bindings.TypeConverterImpl.convertToJava(TypeConverterImpl.java:688)
at com.vmware.vapi.internal.bindings.Stub.convert(Stub.java:417)
at com.vmware.vapi.internal.bindings.Stub.convertError(Stub.java:434)
at com.vmware.vapi.internal.bindings.Stub.access$300(Stub.java:57)
at com.vmware.vapi.internal.bindings.Stub$2.setResult(Stub.java:239)
at com.vmware.vapi.internal.bindings.Stub$2.setResult(Stub.java:230)
at com.vmware.vapi.internal.protocol.client.rest.DefaultRequestExecutorFactory$DefaultHttpResponseHandler.onResult(DefaultRequestExecutorFactory.java:86)
at com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor$AuthzRefreshingHttpResponseHandler.onResult(AuthzRefreshingRequestExecutorFactory.java:160)
at com.vmware.vapi.internal.protocol.client.rpc.http.ApacheClientRestTransport.execute(ApacheClientRestTransport.java:79)
at com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.authorizeAndExecute(AuthzRefreshingRequestExecutorFactory.java:112)
at com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.access$100(AuthzRefreshingRequestExecutorFactory.java:58)
at com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor$1.onComplete(AuthzRefreshingRequestExecutorFactory.java:98)
at com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.refreshContext(AuthzRefreshingRequestExecutorFactory.java:188)
at com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.refreshContextIfNeeded(AuthzRefreshingRequestExecutorFactory.java:171)
at com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.execute(AuthzRefreshingRequestExecutorFactory.java:105)
at com.vmware.vapi.internal.protocol.client.rest.RestClientApiProvider.invoke(RestClientApiProvider.java:70)
at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:225)
at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:206)
at com.vmware.vapi.internal.bindings.Stub.invokeMethodAsync(Stub.java:170)
at com.vmware.vapi.internal.bindings.Stub.invokeMethod(Stub.java:138)
at com.vmware.nsx_policy.infra.domains.gateway_policies.RulesStub.revise(RulesStub.java:226)
at com.vmware.nsx_policy.infra.domains.gateway_policies.RulesStub.revise(RulesStub.java:213)

Expected behavior

reorder firewall rule.

other methods(list, get, update, delete) are fine. only revise method doesn't work.

vapi-runtime

  • [ yes] I am using the latest SDK version
  • [ yes] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [ yes] I have searched existing issues

Description

While trying to get the list of orgs from the ApiClient, I hit this error:
Caused by: java.lang.NoSuchMethodError: com.vmware.vapi.internal.protocol.client.rpc.RestTransport.execute(Lcom/vmware/vapi/internal/protocol/client/rpc/HttpRequest;Lcom/vmware/vapi/internal/protocol/client/rpc/HttpRequest$HttpResponseHandler;)V\n\tat com.vmware.vapi.vmc.client.authz.CspAccessRequestor.requestAccess(CspAccessRequestor.java:52)\n\tat com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.refreshContext(AuthzRefreshingRequestExecutorFactory.java:215)\n\tat com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.refreshContextIfNeeded(AuthzRefreshingRequestExecutorFactory.java:171)\n\tat com.vmware.vapi.vmc.client.authz.AuthzRefreshingRequestExecutorFactory$AuthzRefreshingRequestExecutor.execute(AuthzRefreshingRequestExecutorFactory.java:105)\n\tat com.vmware.vapi.internal.protocol.client.rest.RestClientApiProvider.invoke(RestClientApiProvider.java:71)\n\tat com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:227)\n\tat com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:208)\n\tat com.vmware.vapi.internal.bindings.Stub.invokeMethodAsync(Stub.java:172)\n\tat com.vmware.vapi.internal.bindings.Stub.invokeMethod(Stub.java:140)\n\tat com.vmware.vmc.OrgsStub.list(OrgsStub.java:82)\n\tat com.vmware.vmc.OrgsStub.list(OrgsStub.java:75)

Environment

  • SDK version: vapi-runtime-2.10.1.jar
  • Java version:

1.8.0

  • vSphere version:
    6.8

Steps or code snippet to reproduce

I see this issue after moving to vapi-runtime-1.10.1.jar. My code works with vapi-runtime-1.9.0.jar

Actual behavior

Expected behavior

Fetching detailed information about Hosts within Vcenter

This might be irrelevant, but no idea where else to post.

I can only fetch identifier, name, power state, and connection state through vsphere 6.5+ rest apis. Is there any way to fetch detailed information about esxi hosts within vcenter 6.0 or above?

Create Cluster

ManagedObjectReference create = vimPortType.createClusterEx(dsMor, this.clusterName, spec);

Gives error --

com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: The request refers to an unexpected or unknown type. Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)

VPXD LOG

===

2018-04-29T08:33:49.615Z error vpxd[11995] [Originator@6876 sub=MethodValidator opID=53fd4724] [VpxdMethodValidatorImpl] Failed to resolve method createClusterEx

when I call the cloneVM sample,it report error: operation_not_found

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get the info from the Java API Reference Documentation)
  • I have searched existing issues

Environment

  • sdk binding version:

vsphereautomation-client-sdk-3.3.0.jar

  • Java version:

java8

  • vSphere version:
    6.7 , is the clone work well with this version?
  • Operating System/Shell (used to run SDK-based apps):
    windows10

Steps or code snippet to reproduce

When I run the ListVMs ,it work well, when I run the cloneVM, It make a err :
com.vmware.vapi.std.errors.OperationNotFound: OperationNotFound (com.vmware.vapi.std.errors.operation_not_found) => {

Actual behavior

OperationNotFound

Expected behavior

This API is not open to Java

In addition to the main method, there are no other methods that can be called, such as the method with which the parameters are returned.

Can't list/add firewall rules on VMC 1.5 patch 01, NSX-T

  • [ x] I am using the latest SDK version
  • [x ] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [x ] I have searched existing issues

Description

I am not able to list or get the firewall rules with my NSX-T VMC which is running 1.5 Patch 01
nsxApiClient = VmcNsxClients.custom()
.setBaseUrl(vmcUrl)
.setAuthorizationUrl(cspUrl)
.setRefreshToken()
.setOrganizationId(orgId)
.setSddcId(sddcId)
.build();
CommunicationMaps communicationMaps = nsxApiClient.createStub(CommunicationMaps.class);
CommunicationMapListResult mapListResult = ((CommunicationMaps) communicationMaps).list("mgw", null, null, 1000L, false, null);

Have the new apis been tested against the latest VMC version? If you could some sample code on how to create a firewall rule on a NSX-T VMC, that would be helpful.

Environment

  • SDK version:
  • Java version:
  • vSphere version:

Steps or code snippet to reproduce

Actual behavior

Expected behavior

Getting following error while connecting to Guest OS: Client received SOAP Fault from server: Permission to perform this operation was denied. Please see the server log to find more detail regarding exact cause of the failure

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

Environment

  • SDK version:
    6.7.0

  • Java version:
    1.8

  • vSphere version:
    6.7.0

Steps or code snippet to reproduce

String[] opts = new String[]{"guest.guestOperationsReady"};
String[] opt = new String[]{"guest.guestOperationsReady"};
wV.wait(ob, opts, opt,new Object[][]{{true}});
Map<String, ManagedObjectReference> var1 = VimUtil.inFolderByType(vimPort,serviceContent,serviceContent.getRootFolder(), "VirtualMachine");
ManagedObjectReference var2 = (ManagedObjectReference)var1.get(vmName);
if (var2 != null) {
System.out.println("Virtual Machine " + vmName + " found");
System.out.println("Guest Operations are ready for the VM");
ManagedObjectReference guestOpManger =
serviceContent.getGuestOperationsManager();
ManagedObjectReference fileManagerRef =
(ManagedObjectReference) VimUtil.entityProps(vimPort,serviceContent,guestOpManger,
new String[]{"fileManager"}).get("fileManager");
System.out.println(fileManagerRef);
System.out.println(fileManagerRef.getType());
System.out.println(fileManagerRef.getValue());
NamePasswordAuthentication auth = new NamePasswordAuthentication();
auth.setUsername("username");
auth.setPassword("password");
auth.setInteractiveSession(false);
vimPort.validateCredentialsInGuest(fileManagerRef, var2, auth);
System.out.println("validation for guest Credentials");
List li=new ArrayList<>();
li.add("open notepad.exe");
System.out.println("Executing CreateTemporaryFile guest operation");
System.out.println("FileInitailization"+vimPort.initiateFileTransferFromGuest(fileManagerRef, var2, auth, "C:\Users\"));
vimPort.createFolder(fileManagerRef, "C:\Users\Public\dsfsfs");
String result =
vimPort.createTemporaryFileInGuest(fileManagerRef, var2, auth,"TestAfter", "BeforeTest", "C:\Users\Public");
System.out.println("Temporary file was successfully created at: "
+ result + " inside the guest");

Actual behavior

Unable to login to Guest OS and not fetching any files

Expected behavior

Login to Guest OS should happen, file directory inside Guest os should be available to perform read and write operation.

Note: I am not sure that the methods i am trying is the correct one. Please help me with correct one. Even I am not able to fetch the ip address of the VM using sdk.

Attach tag to VM using Java SDK

Hi,

Is it possible to attach tag to VM using java ? If possible could you please share the code? I am searching it from last week and i haven't found anything.
Can you please help me.

--Skip-server-verification not working

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

Encountering an error during uploading files to CL with the help of OvfImportExport.Java sample class from vsphere (6.7).
An error is thrown and please find below for the error description. While debugging the error ,found ignored flag being set to false which should be ideally be true. Hence tried the below approach.
Tried updating the upload session with the respective PATCH API as per API reference doc but failed. The API is response is 200 but the parameter is nor getting updated to true.
For reference session info:
{"update_spec":{"library_item_id":"55a31c5a-9ac5-4304-b55d-6acc38ee4bb9","client_progress":0,"expiration_time":"2019-08-23T06:15:07.217Z","preview_info":{"warnings":[{"ignored":true,"type":"SELF_SIGNED_CERTIFICATE","message":{"args":[],"default_message":"The certificate is self-signed.","id":"com.vmware.vdcs.vsphere-cs-lib.CERTIFICATE_SELF_SIGNED"}},{"ignored":true,"type":"UNTRUSTED_CERTIFICATE","message":{"args":[],"default_message":"The certificate is not trusted.","id":"com.vmware.vdcs.vsphere-cs-lib.CERTIFICATE_UNTRUSTED"}}],"state":"AVAILABLE","certificate_info":{"x509":"String","subject":"EMAILADDRESS=test, CN=test, OU=test, O=test, L=test, ST=test, C=US","self_signed":true,"issuer":"EMAILADDRESS=test, CN=test, OU=test, O=test, L=test, ST=test, C=US"}},"id":"04e50d4c-fb24-4136-9822-61542c625a6a:c7f7ee5d-af0d-4c7e-a387-9561d1fb2bf9","library_item_content_version":"1","state":"ACTIVE"}}

Environment: Development environment.

  • SDK version: 6.7
  • Java version:
    java version "1.8.0_221"
    Java (TM) SE Runtime Environment (build 1.8.0_221-b11)
    Java HotSpot(TM) Client VM (build 25.221-b11, mixed mode, sharing)
  • vSphere version:

Steps or code snippet to reproduce

Actual behaviour:

Trying to deploy OVF file to the content library via OvfImportExport.Java. It is in the development environment, hence bypassing the client-side validation with the –skip-server-verification parameter. But uploading files to CL is failing with the below mentioned warning,
Catchedcom.vmware.vapi.std.errors.NotAllowedInCurrentState: NotAllowedInCurrentState (com.vmware.vapi.std.errors.not_allowed_in_current_state) => {
messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
id = com.vmware.vdcs.cls-main.update_session_invalid_state_for_operation_reason,
defaultMessage = The operation fail can not be invoked when the import session is in the ERROR state. Reason: The certificate is self-signed. The certificate is not trusted.,
args = [fail, ERROR, The certificate is self-signed. The certificate is not trusted.],
params = ,
localized =
}],
data = ,
errorType = NOT_ALLOWED_IN_CURRENT_STATE
}

Expected behaviour

Uploading files to CL with self-singed certificate.

Developer APIs for SDDC stretched cluster

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get the info from the Java API Reference Documentation)
  • I have searched existing issues

Environment

  • sdk binding version:
  • Java version:
  • vSphere version:

  • Operating System/Shell (used to run SDK-based apps):

Steps or code snippet to reproduce

Actual behavior

Expected behavior

I am currently looking for a way to provision stretched cluster SDDCs and perform operations such as Add/Remove host, Add/remove cluster etc through APIs. Currently, there's a way to provision stretched cluster SDDC only through vmc console UI

Unable to build docker container

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get the info from the Java API Reference Documentation)
  • I have searched existing issues

Environment

  • sdk binding version:
    lib/vsphereautomation-client-sdk-3.2.0.jar

  • Java version:
    root@3f7ed95c64d7:/work/vsphere-automation-sdk-java# java --version
    openjdk 11.0.6 2020-01-14
    OpenJDK Runtime Environment 18.9 (build 11.0.6+10)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.6+10, mixed mode)

  • vSphere version: VMConAWS 1.8 & 1.9

  • Operating System/Shell (used to run SDK-based apps): MacOS (10.13.6 (17G9016)) and Ubuntu 18.04

Steps or code snippet to reproduce:

docker build https://github.com/vmware/vsphere-automation-sdk-java.git#:docker -t vmware/vsphere-automation-sdk-java

Actual behavior

[INFO] Changes detected - recompiling the module!
[INFO] Compiling 109 source files to /work/vsphere-automation-sdk-java/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /work/vsphere-automation-sdk-java/src/main/java/vmware/samples/common/authentication/VimAuthenticationHelper.java:[17,19] error: package javax.xml.ws does not exist
[ERROR] /work/vsphere-automation-sdk-java/src/main/java/vmware/samples/sso/soaphandlers/HeaderHandlerResolver.java:[19,27] error: package javax.xml.ws.handler does not exist
[ERROR] /work/vsphere-automation-sdk-java/src/main/java/vmware/samples/sso/soaphandlers/HeaderHandlerResolver.java:[20,27] error: package javax.xml.ws.handler does not exist
[ERROR] /work/vsphere-automation-sdk-java/src/main/java/vmware/samples/sso/soaphandlers/HeaderHandlerResolver.java:[21,27] error: package javax.xml.ws.handler does not exist
[ERROR] /work/vsphere-automation-sdk-java/src/main/java/vmware/samples/sso/soaphandlers/HeaderHandlerResolver.java:[29,52] error: cannot find symbol

Expected behavior

[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ vsphere-samples-nodeps ---
[INFO] Installing /work/vsphere-automation-sdk-java/target/vsphere-samples-7.0.0.jar to /root/.m2/repository/com/vmware/vsphere-samples-nodeps/7.0.0/vsphere-samples-nodeps-7.0.0.jar
[INFO] Installing /work/vsphere-automation-sdk-java/pom.xml to /root/.m2/repository/com/vmware/vsphere-samples-nodeps/7.0.0/vsphere-samples-nodeps-7.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.823 s
[INFO] Finished at: 2020-01-27T20:24:32Z
[INFO] ------------------------------------------------------------------------

Fixed by adding com.sun.xml.ws, javax.xml.ws, and com.sun.org.apache.xml.internal dependencies to pom.xml see my fork: https://github.com/gavinbarnard/vsphere-automation-sdk-java

gavin@docker-dox:~/vsphere-automation-sdk-java$ git diff 5f6d2a9a0267460a93bc7fcf243a745b4c347ede pom.xml
diff --git a/pom.xml b/pom.xml
index 1c06cc74e..6a6c65bf4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -416,6 +416,21 @@
   <artifactId>commons-beanutils</artifactId>
   <version>${commons-beanutils.version}</version>
  </dependency>
+ <dependency>
+  <groupId>com.sun.xml.ws</groupId>
+  <artifactId>rt</artifactId>
+  <version>2.3.1</version>
+ </dependency>
+ <dependency>
+  <groupId>javax.xml.ws</groupId>
+  <artifactId>jaxws-api</artifactId>
+  <version>2.3.1</version>
+ </dependency>
+ <dependency>
+  <groupId>com.sun.org.apache.xml.internal</groupId>
+  <artifactId>resolver</artifactId>
+  <version>20050927</version>
+ </dependency>
 </dependencies>
  <reporting>
   <plugins>

Cannot complete vcenter login using SAML token

Hi,

We are using SAML token for vcenter authentication. When we try to login using the Bearer Token, login is failing saying "Cannot complete login due to an incorrect user name or password".

We are using com.vmaware.VimAuthenticationHelper.loginByToken(vcenter,token) to login into the vcenter.

More Details:
Token Type: Bearer Token
SAML Token generation code snippet :
SamlToken token =
SsoHelper.getSamlBearerToken(
"https://{hostIP}/sts/STSService", "[email protected]", "")
Vcenter version: 6.5.0.10000 Build 5973321

Context: trying to test rest end points using postman/curl and we are getting above exception during vcenter login.

Please find the screenshot of the error we are facing as below:

image

Please let me know if you need any other details.

Thanks
Rajendra

Is usage of vim25.jar also under MIT license?

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

  • We have the license of vSphere 7.0, 6.7 and 6.5 and want to use vim25.jar for commercial usage. Are vim25.jar and other jar files under lib folder under MIT license as well?

Environment

  • SDK version: 7.0.U2 (master branch)
  • Java version: openjdk version "1.8.0_281"
  • vSphere version: 7.0.U2

Steps or code snippet to reproduce

Actual behavior

Expected behavior

Setting PropertyParams when deploying VM from OVF

Hi,

I am using automation SDK to deploy OVF and power on VM . I need to set console-username, console-password by setting the AdditionalParameters to ResourcePoolDeploymentSpec.

I got the AdditionalParameters from OvfSummary and set the fields for console-username, console- password, and this AdditionalParameters I am setting to ResourcePoolDeploymentSpec to deploy.

But I am getting this error "defaultMessage = An error occurred: Could not convert field 'properties' of structure 'com.vmware.vcenter.ovf.property_params',".

below is what I have done.

``OvfSummary` ovfSummary = this.client.ovfLibraryItemService().filter(libItemId, deploymentTarget);
List additionalParams = ovfSummary.getAdditionalParams();
for (int i = 0; i < additionalParams.size();) {
Map<String, DataValue> dataValueFields = additionalParams.get(i)._getDataValue().getFields();
OptionalValue optionalValue = (OptionalValue) dataValueFields.get("properties");
ListValue listValue = optionalValue.getList();
List myDataValueList = listValue.getList();
for (int j = 0; j < myDataValueList.size(); j++) {
StructValue myDataValue = (StructValue) myDataValueList.get(j);

			myDataValue.getName();

			if ("console-username".equalsIgnoreCase(myDataValue.getField("id").toString())) {
				myDataValue.setField("value", "Admin");
			} else if ("console-password".equalsIgnoreCase(myDataValue.getField("id").toString())) {
				myDataValue.setField("value", "Admin@123");
			} else if ("varoot-password".equalsIgnoreCase(myDataValue.getField("id").toString())) {
				myDataValue.setField("value", "Admin@123");
			}
		}
		break;
	}

	// Setting the annotation retrieved from the OVF summary.
	deploymentSpec.setAnnotation(ovfSummary.getAnnotation());
	deploymentSpec.setAdditionalParameters(ovfSummary.getAdditionalParams());`

Is there anything additional set up I have to do to get rid of this error?

thanks.

Provide an independent truststore and keystore for TLS connections made by the SDK

  • [ X] I am using the latest SDK version
  • [ X] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [ X] I have searched existing issues

Description

When I use the SDK as part of a larger application, I want the Truststore and Keystore that the SDK uses to connect to the lookup service & to VC be different than for other entities in the JVM making TLS connections. It would be nice to be able to provide an SSLSocketFactory that the SDK can use for its own TLS connections. That way the SDK doesn't interfere with the rest of the application. If it's already possible to do this, please let me know how.

Environment

  • SDK version: vsphere-samples-6.7.1.jar
  • Java version: 1.8.0_144
  • vSphere version: N/A

Steps or code snippet to reproduce

Actual behavior

Expected behavior

Deploy OVF file with custom properties

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

I have an ovf file with a ProductSection element:

<ProductSection>
 <Property ovf:key="guestinfo.ipaddress" ovf:type="string" ovf:userConfigurable="true" ovf:value="">
    <Label>Static IP Address</Label>
 </Property>
 <Property ovf:key="guestinfo.netmask" ovf:type="string" ovf:userConfigurable="true" ovf:value="">
    <Label>Netmask</Label>
 </Property>
 <Property ovf:key="guestinfo.gateway" ovf:type="string" ovf:userConfigurable="true" ovf:value="">
    <Label>Gateway</Label>
 </Property>
 <Property ovf:key="guestinfo.dns" ovf:type="string" ovf:userConfigurable="true" ovf:value="">
    <Label>DNS Server</Label>
 </Property>
</ProductSection>

I'm trying to read and set those properties with the follwing code snipet

OvfSummary ovfSummary = libraryItemService.filter(applianceItemId, deploymentTarget);
        
for (Structure s : ovfSummary.getAdditionalParams()) {
    DataValue d = s._getDataValue();
    System.out.println(d);
}

However, I'm not able to get ProductSection properties from getAdditionalParams function.

Is there a way to accomplish this task?

Environment

  • SDK version: 3.5.0
  • Java version: 1.8.0_312
  • vSphere version: 7.0.3.00500

Is there a way to create, delete and list Linked Clone using vSphere Automation SDK?

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get the info from the Java API Reference Documentation)
  • I have searched existing issues

Environment

  • sdk binding version: 7.0.3.0
  • Java version: 11.0.12
  • vSphere version: 6.7.0.50000

  • Operating System/Shell (used to run SDK-based apps): MacOS

hello

I have a question.

Is there a way to create, delete and list Linked Clone using vSphere Automation SDK?

I can't find it in the documentation or examples, so I'm asking a question.

Thank you for your reply.

ConnectedAccounts.get() API is broken on VMC

  • [Yes ] I am using the latest SDK version
  • [N/A] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [ Yes] I have searched existing issues

Description

The following code which has been working fine for several months is failing now:
apiClient = VmcClients.custom()
.setBaseUrl(VMC_URL)
.setAuthorizationUrl(CSP_URL)
.setRefreshToken(this.refreshToken.toCharArray())
.build();
private ConnectedAccounts connectedAccountsStub =
apiClient.createStub(ConnectedAccounts.class);
List connectedAccounts =
connectedAccountsStub.get(orgId, null);

It throws the exception with the following message:
Caused by: com.vmware.vapi.bindings.convert.ConverterException:
Could not convert field 'updated_by_user_id' of structure 'com.vmware.vmc.model.aws_customer_connected_account'

Getting the connected accounts through the API explorer works fine. So, it seems that the mapping of the output from the server to the 'aws_customer_connected_account' structure fails due to an unexpected type. The following message is also seen on the stack trace:

com.vmware.vapi.bindings.convert.ConverterException: Expected value of class com.vmware.vapi.data.StringValue, found com.vmware.vapi.data.OptionalValue.\n\tat com.vmware.vapi.internal.bindings.convert.impl.ConvertUtil.narrowType(ConvertUtil.java:34)\n\ com.vmware.vapi.internal.bindings.TypeConverterImpl$ValueToJavaVisitor.visit(TypeConverterImpl.java:152)\n\tat com.vmware.vapi.bindings.type.StringType.accept(StringType.java:10)

Debugging this some more, it seems that some of the field definitions may be of issue here:

private static StructType awsCustomerConnectedAccountInit() {
FieldNameDetails details = null;
List validators = null;
Map<String, Type> fields = new LinkedHashMap();
Map<String, FieldNameDetails> fieldNameDetails = new HashMap();
fields.put("updated", new DateTimeType());
details = new FieldNameDetails("updated", "updated", "getUpdated", "setUpdated");
fieldNameDetails.put(details.getCanonicalName(), details);

    fields.put("user_id", new StringType());
    details = new FieldNameDetails("user_id", "userId", "getUserId", "setUserId");
    fieldNameDetails.put(details.getCanonicalName(), details);
    fields.put("updated_by_user_id", new StringType());
    details = new FieldNameDetails("updated_by_user_id", "updatedByUserId", "getUpdatedByUserId", "setUpdatedByUserId");

'updated_by_user_id' is defined as a StringType here, but server appears to send a OptionalType?

We are currently blocked on this issue.

Environment

  • SDK version:
    The latest libraries as of today.

  • Java version: 1.8

parameter --skip-server-verification not working

I am trying the ListVMs sample following the instructions provided in the readme.
The server I am connecting to uses a default certificate issued by a non-trusted root CA.
Setting the --skip-server-verification seems to do nothing, because the application terminates with an exception regardless of its presence.
The exception is:

Exception in thread "main" com.vmware.vapi.client.exception.SslException: Host name '[redacted]' does not match the certificate subject provided by the peer (OID.1.2.840.113549.1.9.2="[redacted]", CN=localhost.localdomain, [email protected], OU=VMware ESX Server Default Certificate, O="VMware, Inc", L=Palo Alto, ST=California, C=US)
    at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.send(HttpClient.java:185)
    at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.sendRequest(JsonApiProvider.java:126)
    at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.invoke(JsonApiProvider.java:307)
    at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:222)
    at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:203)
    at com.vmware.vapi.internal.bindings.Stub.invokeMethodAsync(Stub.java:167)
    at com.vmware.vapi.internal.bindings.Stub.invokeMethod(Stub.java:135)
    at com.vmware.cis.SessionStub.create(SessionStub.java:44)
    at com.vmware.cis.SessionStub.create(SessionStub.java:37)
    at vmware.samples.common.authentication.VapiAuthenticationHelper.loginByUsernameAndPassword(VapiAuthenticationHelper.java:70)
    at vmware.samples.common.SamplesAbstractBase.login(SamplesAbstractBase.java:306)
    at vmware.samples.common.SamplesAbstractBase.execute(SamplesAbstractBase.java:411)
    at vmware.samples.vcenter.vm.list.ListVMs.main(ListVMs.java:128)
Caused by: javax.net.ssl.SSLPeerUnverifiedException: Host name '[redacted]' does not match the certificate subject provided by the peer (OID.1.2.840.113549.1.9.2="[redacted]", CN=localhost.localdomain, [email protected], OU=VMware ESX Server Default Certificate, O="VMware, Inc", L=Palo Alto, ST=California, C=US)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:465)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:395)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)
    at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.invoke(HttpClient.java:147)
    at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.send(HttpClient.java:166)
    ... 12 more

If I understand the stackTrace correctly, it looks like the Apache commons HTTPClient used by the vApi is using its own internal HostNameVerifier, which is performing a real verification instead of returning true like the dummy HostNameVerifier used in the samples.

I also tried passing --skip-server-verification true as the parameter, but with same result.

Import issue of com.vmware.vcenter.VM

  • [ O ] I am using the latest SDK version
  • [ O ] This API is compatible with my vCenter version (You can get this info from the API documentation )
  • [ O ] I have searched existing issues

Description

I was checking out the sample code vmware.samples.vcenter.vm.list.ListVMs
but it says the package com.vmware.vcenter.VM cannot be resolved.
Am i supposed to configure external library for this sample code?
FYI, I directly downloaded the master branch of this github.

Environment

  • SDK version: 6.7
  • Java version: 1.8
  • vSphere version: 6.5

Steps or code snippet to reproduce

Actual behavior

Expected behavior

Provide dependencies via Maven Central

I do not know what's the point in having all of the dependencies in the git repository making the git history more than a gigabyte big.

It would be a great improvement if those libraries were provided via Maven Central.

Even Oracle does that for their drivers.

vsphere-automation-sdk-java UNAUTHENTICATED

https://stackoverflow.com/questions/59261012/vsphere-automation-sdk-java-unauthenticated

i am trying to clone a vsphere vm using java sdk (https://github.com/vmware/vsphere-automation-sdk-java) i am able to run all available examples like list vm and creat vm and all . but when i try to execute vmService.instantClone(instantCloneSpec) it run in to this specific error.

code:

import java.util.Collections;
import java.util.List;

import com.vmware.vcenter.VMTypes;
import org.apache.commons.cli.Option;
import com.vmware.vcenter.VM;
import org.camunda.bpm.getstarted.loanapproval.common.SamplesAbstractBase;

public class CloneVmManager extends SamplesAbstractBase {

private VM vmService;

/**
 * Define the options specific to this sample and configure the sample using
 * command-line arguments or a config file
 *
 * @param args command line arguments passed to the sample
 */
protected void parseArgs(String[] args) {
    List<Option> optionList = Collections.<Option>emptyList();
    super.parseArgs(optionList, args);
}

protected void setup() throws Exception {
    this.vmService =
            vapiAuthHelper.getStubFactory()
                    .createStub(VM.class, sessionStubConfig);



}

protected void run() throws Exception {
    // TODO: Add your sample code here
 try {
     VMTypes.InstantClonePlacementSpec placementSpec= new VMTypes.InstantClonePlacementSpec();
     placementSpec.setDatastore("datastore1");
     placementSpec.setFolder("cvs");
     VMTypes.InstantCloneSpec instantCloneSpec =new VMTypes.InstantCloneSpec();
     instantCloneSpec.setName("instantClone1");

// instantCloneSpec.setSource("tpl_reproxy-6_10-wax-CentOS6-h9-ver2.4");
instantCloneSpec.setSource("_Ubuntu_19_Template");
instantCloneSpec.setDisconnectAllNics(true);
instantCloneSpec.setPlacement(placementSpec);
vmService.instantClone(instantCloneSpec);
}catch (Exception e){
System.out.println("something went wrong"+e.getMessage());
e.printStackTrace();
}

}
protected void cleanup() throws Exception {
    // TODO: Add cleanup here
}

public static void main(String[] args) throws Exception {
    /*
     * Execute the sample using the command line arguments or parameters
     * from the configuration file. This executes the following steps:
     * 1. Parse the arguments required by the sample
     * 2. Login to the server
     * 3. Setup any resources required by the sample run
     * 4. Run the sample
     * 5. Cleanup any data created by the sample run, if cleanup=true
     * 6. Logout of the server
     */

// new CloneVmManager().execute(args);
}

public void runcustom(String[] args) throws Exception{
    System.out.println("inside clone vm");
    for(String s:args){
        System.out.println("arg:->"+s);

    }
    new CloneVmManager().execute(args);
}

}

as you can see it says You are susceptible to man-in-the-middle attacks as i am providing --skip-server-verification arg so am not sure it is authentication issue .

my arg would be like :

String arg[] = {
        "--server","192.168.1.1","--username","[email protected]","--password","password","--skip-server-verification"}

2019-12-10 11:06:33.685 WARN 1140 --- [nio-8080-exec-3] c.v.v.i.p.c.r.h.TrustAllX509TrustManager : Skipped the validation of a certificate chain due to configuration policy. Your co
nnection is not secure!
2019-12-10 11:06:33.729 WARN 1140 --- [nio-8080-exec-3] c.v.v.i.p.c.r.h.AllowAllHostnameVerifier : Cannot validate the identity of 192.168.1.160 due to the hostname-verification bei
ng disabled. You are susceptible to man-in-the-middle attacks!
something went wrongUnauthenticated (com.vmware.vapi.std.errors.unauthenticated) => {
messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
id = vapi.method.authentication.required,
defaultMessage = This method requires authentication.,
args = [],
params = ,
localized =
}],
data = ,
errorType = UNAUTHENTICATED,
challenge =
}
com.vmware.vapi.std.errors.Unauthenticated: Unauthenticated (com.vmware.vapi.std.errors.unauthenticated) => {
messages = [LocalizableMessage (com.vmware.vapi.std.localizable_message) => {
id = vapi.method.authentication.required,
defaultMessage = This method requires authentication.,
args = [],
params = ,
localized =
}],
data = ,
errorType = UNAUTHENTICATED,
challenge =
}
at com.vmware.vapi.std.errors.Unauthenticated._newInstance2(Unauthenticated.java:244)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)

cannot convert VMTypes.Info into VMTypes.CreateSpec

Tried to use "_converTo" but got :
Exception in thread "main" com.vmware.vapi.bindings.convert.ConverterException: Could not convert field 'name' of structure 'com.vmware.vcenter.VM.create_spec'
at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.fromValue(JavaClassStructConverter.java:89)
at com.vmware.vapi.internal.bindings.convert.impl.JavaClassStructConverter.fromValue(JavaClassStructConverter.java:33)
at com.vmware.vapi.internal.bindings.TypeConverterImpl$ValueToJavaVisitor.visit(TypeConverterImpl.java:279)
at com.vmware.vapi.bindings.type.StructType.accept(StructType.java:372)
at com.vmware.vapi.internal.bindings.TypeConverterImpl.convertToJava(TypeConverterImpl.java:688)
at com.vmware.vapi.internal.bindings.BindingsUtil.convertTo(BindingsUtil.java:497)
at com.vmware.vapi.internal.bindings.BindingsUtil.convertTo(BindingsUtil.java:480)
at com.vmware.vcenter.VMTypes$Info._convertTo(VMTypes.java:1874)

hosting this JAR and other vSphere SDKs on Maven

Hi, thanks for creating this automation! I was wondering if there is any plan to host these on Maven or somewhere where Java projects can easily use them.

Do most people otherwise host these themselves on Artifactory?

Class cast exception

I am updating existing network from the template while cloning (Applying Storage recommandation) .
below is my code......

private VirtualDeviceConfigSpec setVirtualNetwork(VirtualDevice[] vds, String network) {
VirtualDeviceConfigSpec nicSpec = new VirtualDeviceConfigSpec();
nicSpec.setOperation(VirtualDeviceConfigSpecOperation.edit);
for (int i = 0; i < vds.length; i++) {
if ((vds[i] instanceof VirtualEthernetCard)
&& (vds[i].getDeviceInfo().getLabel().equalsIgnoreCase("Network Adapter 1"))) {
VirtualEthernetCard nic = (VirtualEthernetCard) vds[i];
VirtualDeviceBackingInfo properties = nic.getBacking();
VirtualEthernetCardNetworkBackingInfo nicBaking = (VirtualEthernetCardNetworkBackingInfo) properties;
nicBaking.setDeviceName(network);
nic.setBacking(nicBaking);
nicSpec.setDevice(nic);
}
}
return nicSpec;

}

This is my error: any idea why this exception occured?

java.lang.ClassCastException: com.vmware.vim25.VirtualEthernetCardDistributedVirtualPortBackingInfo cannot be cast to com.vmware.vim25.VirtualEthernetCardNetworkBackingInfo

why CustomizationIPSettings not setNicSettingMap method?

vsphere web service sdk 6.7

public static CustomizationSpec createCustomizations(){
CustomizationSpec spec=new CustomizationSpec();
......
......
adapter.setAdapter(ipSetting);
adapterMappings[0]=adapter;
spec.setNicSettingMap(adapterMappings);
CustomizationSpecItem customizationSpecItem=new CustomizationSpecItem();
customizationSpecItem.setSpec(spec);
CustomizationSpecInfo info=new CustomizationSpecInfo();
info.setName("123456");
info.setDescription("123456");
customizationSpecItem.setInfo(info);
return spec;
}

error:

The method setNicSettingMap(CustomizationAdapterMapping[]) is undefined for the type CustomizationSpec

Connection timeout

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

I use the latest code and version 6.7.0 have connection timeout, but I use the browser and use the same user password is normal access, has been unable to resolve.

java.lang.NullPointerException
at vmware.samples.common.authentication.VimAuthenticationHelper.logout(VimAuthenticationHelper.java:105)
at vmware.samples.common.SamplesAbstractBase.logout(SamplesAbstractBase.java:411)
at vmware.samples.common.SamplesAbstractBase.execute(SamplesAbstractBase.java:448)
at vmware.samples.vcenter.vm.list.ListVMs.main(ListVMs.java:128)
Exception in thread "main" com.vmware.vapi.client.exception.ConnectionException: https://172.23.3.105:443/api invocation failed with "org.apache.http.conn.ConnectTimeoutException: Connect to 172.23.3.105:443 [/172.23.3.105] failed: connect timed out"
at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.send(HttpClient.java:188)
at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.sendRequest(JsonApiProvider.java:186)
at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.invoke(JsonApiProvider.java:539)
at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:241)
at com.vmware.vapi.internal.bindings.Stub.invokeMethodAsync(Stub.java:191)
at com.vmware.vapi.internal.bindings.Stub.invokeMethod(Stub.java:137)
at com.vmware.cis.SessionStub.create(SessionStub.java:46)
at com.vmware.cis.SessionStub.create(SessionStub.java:37)
at vmware.samples.common.authentication.VapiAuthenticationHelper.loginByUsernameAndPassword(VapiAuthenticationHelper.java:73)
at vmware.samples.common.SamplesAbstractBase.login(SamplesAbstractBase.java:309)
at vmware.samples.common.SamplesAbstractBase.execute(SamplesAbstractBase.java:433)
at vmware.samples.vcenter.vm.list.ListVMs.main(ListVMs.java:128)

Environment

  • SDK version:

6.7.0 and 7.0.3.0

  • Java version:

1.8

  • vSphere version:
    6.7.0

Steps or code snippet to reproduce

Actual behavior

Abnormal connection

Expected behavior

Normal connection

VMC AccountLink.get() API returns void

  • I am using the latest SDK version
  • This API is compatible with my vCenter version (You can get this info from the API documentation )
  • I have searched existing issues

Description

The VMC AccountLink.get() API returns void.
However, based on the API Explorer we expect this to return a JSON String response with the following fields:

  • template_execution_url
  • template_url
  • tracking_task

Environment

  • SDK version:
    Latest v6.8.7

  • Java version:
    Java 8

  • vSphere version:
    Latest that comes with VMC SDDC

Steps or code snippet to reproduce

import com.vmware.vmc.orgs.AccountLink;
AccountLink accountLink = ...;
String jsonResponse = accountLink.get("EXAMPLE_ORG_ID");

Actual behavior

(compilation-error)

Expected behavior

(no compilation-error)

Getting error from Server (Vsphere API)


Getting no response from server for Power Start and Stop requests

  • I am using the [latest SDK version]:6.7.1
  • This API is compatible with my vCenter version 6.7
  • Yes I have searched existing issues

Description

Vsphere API: VM Power Start/Stop requests are sending error in the response

Environment

  • SDK version: 6.7.1

  • Java version:1.8

  • vSphere version:6.7

Steps or code snippet to reproduce

  1. Login to vsphere vcenter in api explorer
  2. Get the vm id from VM request
  3. POST /vcenter/vm/{vm}/power/start
  4. Enter vm-id in the above request
  5. Request starts running for more than 30 minutes
  6. Server sends the Error: "error": "no response from server"
  7. Same respose is observed for /vcenter/vm/{vm}/power/stop

Actual behavior

No response from the server, getting error after 15-30 minutes.
Error: "no response from server"

Expected behavior

Server should send the proper response

Note: I think above issue is happening because of the parameter invocationConfig either it is set as null or set as false

can't find basic operations

Hi,
Some basic operations are missing.

  1. creating a clone from a VM? thought it will be in VM class but its not there.
  2. taking a snapshot on a VM? thought it will be in VM class but its not there.
  3. I saw that creating a VM requires a spec. can I create a spec from existing VM? thought it will be in VM class but its not there.

After Start next operations are not working, timeouts after an hour but no operations are performed

I am getting this issue while running the Power Cycle, When VM gets turned on, after that next operations are not working.

Getting this exception
Exception in thread "main" com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.net.SocketException: Network is unreachable: connect
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:117)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:208)
at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:130)
at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:95)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:1121)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:1035)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:1004)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:862)
at com.sun.xml.internal.ws.client.Stub.process(Stub.java:448)
at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:178)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
at com.sun.proxy.$Proxy37.retrieveProperties(Unknown Source)
at vmware.samples.common.vim.helpers.VimUtil.getCluster(VimUtil.java:121)
at vmware.samples.VMOperations.getMORforHost(VMOperations.java:128)
at vmware.samples.VMOperations.main(VMOperations.java:45)
Caused by: java.net.SocketException: Network is unreachable: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666)
at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1199)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1334)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1309)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:259)
at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:104)
... 16 more


After VM on this error is displayed

Exception in thread "main" com.vmware.vapi.client.exception.ConnectionException: https://10.98.34.54:443/api invocation failed with "java.net.SocketException: Connection reset"
at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.send(HttpClient.java:196)
at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.sendRequest(JsonApiProvider.java:125)
at com.vmware.vapi.internal.protocol.client.msg.json.JsonApiProvider.invoke(JsonApiProvider.java:306)
at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:227)
at com.vmware.vapi.internal.bindings.Stub.invoke(Stub.java:208)
at com.vmware.vapi.internal.bindings.Stub.invokeMethodAsync(Stub.java:172)
at com.vmware.vapi.internal.bindings.Stub.invokeMethod(Stub.java:140)
at com.vmware.vcenter.vm.PowerStub.start(PowerStub.java:82)
at com.vmware.vcenter.vm.PowerStub.start(PowerStub.java:75)
at vmware.samples.VMOperations.run(VMOperations.java:120)
at vmware.samples.common.SamplesAbstractBase.execute(SamplesAbstractBase.java:366)
at vmware.samples.VMOperations.main(VMOperations.java:56)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:933)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.invoke(HttpClient.java:156)
at com.vmware.vapi.internal.protocol.client.rpc.http.HttpClient.send(HttpClient.java:176)
... 11 more

Following the version information
Vsphere: 6.7.0
JDK: 1.8

Please do the needful

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.