Skip to content
This repository has been archived by the owner on Dec 9, 2021. It is now read-only.

Commit

Permalink
vSphere 6.7 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
vinpai committed Apr 17, 2018
1 parent 4563cf0 commit f19ec0e
Show file tree
Hide file tree
Showing 24 changed files with 143,357 additions and 110,009 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
bin
obj
packages
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ This document describes the vSphere Automation .NET SDK samples that use the vSp
.NET client library. The samples have been developed to work with .NET Framework 4.5.

## Supported vCenter Releases:
vCenter 6.0 and 6.5 and vCenter 6.6.1 for VMware Cloud 1.1.
vCenter 6.0, 6.5, 6.7 and vCenter 6.6.3 for VMware Cloud on AWS 1.3.

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

Expand Down Expand Up @@ -78,7 +78,7 @@ Apart from the above, each individual sample may require additional setup. Pleas

### Adding a new sample using a template

* To import the VMware Project Template, install the vsix file by double click to the file "Vmware-SDK-Automation-Sample-Template.vsix" located in "vsphere-automation-sdk-.net\Project Template".
* To import the VMware Project Template, copy the zip file located in "vsphere-automation-sdk-.net\Project Template" to "C:\Users\<username>\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#".

1. Open Visual Studio
2. In the menu select File --> New --> Project...
Expand Down
Binary file modified doc/docs.zip
Binary file not shown.
Binary file modified packages/STSService.dll
Binary file not shown.
Binary file modified packages/Vim25Service.dll
Binary file not shown.
248,442 changes: 139,389 additions & 109,053 deletions packages/vapi-client-bindings-6.6.1.xml → packages/vapi-client-bindings-1.2.0.xml

Large diffs are not rendered by default.

Binary file modified packages/vapi-client-bindings.dll
Binary file not shown.
Binary file modified packages/vapi-runtime.dll
Binary file not shown.
Binary file modified packages/vsphereautomation-lookupservice.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace vmware.samples.sso
using CommandLine;
using System;
using System.Collections.Generic;
using System.Linq;
using vmware.cis.tagging;
using vmware.samples.common;
using vmware.samples.common.authentication;
using vmware.vapi.bindings;
Expand Down Expand Up @@ -64,15 +66,23 @@ public override void Run()

Console.WriteLine("\nStep 3: Perform certain tasks using the vAPI "
+ "services.");
Datacenter datacenterService =
vapiAuthHelper.StubFactory.CreateStub<Datacenter>(
sessionStubConfig);
List<DatacenterTypes.Summary> dcList =
datacenterService.List(new DatacenterTypes.FilterSpec());
Console.WriteLine("\nList of datacenters on the vcenter server:");
foreach (DatacenterTypes.Summary dcSummary in dcList)
Console.WriteLine("\nListing all tags on the vCenter Server ...");
Tag taggingService =
vapiAuthHelper.StubFactory.CreateStub<Tag>(sessionStubConfig);
List<string> tagList = taggingService.List();
if (!tagList.Any())
{
Console.WriteLine(dcSummary);
Console.WriteLine("\nNo tags found !");
}
else
{
Console.WriteLine("\nTag Name\tTag Description");
foreach (string tagId in tagList)
{
Console.WriteLine(
taggingService.Get(tagId).GetName()
+ "\t" + taggingService.Get(tagId).GetDescription());
}
}
vapiAuthHelper.Logout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ namespace vmware.samples.sso
using CommandLine;
using System;
using System.Collections.Generic;
using System.Linq;
using vmware.cis.tagging;
using vmware.samples.common;
using vmware.samples.common.authentication;
using vmware.vapi.bindings;
Expand Down Expand Up @@ -69,15 +71,23 @@ public override void Run()

Console.WriteLine("\nStep 5: Perform certain tasks using the vAPI "
+ "services.");
Datacenter datacenterService =
vapiAuthHelper.StubFactory.CreateStub<Datacenter>(
sessionStubConfig);
List<DatacenterTypes.Summary> dcList =
datacenterService.List(new DatacenterTypes.FilterSpec());
Console.WriteLine("\nList of datacenters on the vcenter server:");
foreach (DatacenterTypes.Summary dcSummary in dcList)
Console.WriteLine("\nListing all tags on the vCenter Server ...");
Tag taggingService =
vapiAuthHelper.StubFactory.CreateStub<Tag>(sessionStubConfig);
List<string> tagList = taggingService.List();
if (!tagList.Any())
{
Console.WriteLine(dcSummary);
Console.WriteLine("\nNo tags found !");
}
else
{
Console.WriteLine("\nTag Name\tTag Description");
foreach (string tagId in tagList)
{
Console.WriteLine(
taggingService.Get(tagId).GetName()
+ "\t" + taggingService.Get(tagId).GetDescription());
}
}
vapiAuthHelper.Logout();
}
Expand Down
27 changes: 13 additions & 14 deletions vmware/samples/tagging/TaggingWorkflow/TaggingWorkflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namespace vmware.samples.tagging.workflow
using System;
using System.Collections.Generic;
using vapi.std;
using vcenter.helpers;
using vmware.cis.tagging;
using vmware.samples.common;
using vmware.vim25;

/// <summary>
/// Description: Demonstrates CRUD operations on a sample tag.
Expand All @@ -28,7 +28,7 @@ namespace vmware.samples.tagging.workflow
/// </summary>
public class TaggingWorkflow : SamplesBase
{
Tag tagService;
cis.tagging.Tag tagService;
Category categoryService;
TagAssociation tagAssociation;
string tagId, categoryId;
Expand All @@ -42,33 +42,32 @@ public class TaggingWorkflow : SamplesBase
Required = true)]
public string ClusterName { get; set; }

[Option(
"datacenter",
HelpText = "Name of the Datacenter on which to create tags.",
Required = true)]
public string DatacenterName { get; set; }
public override void Run()
{
// Login
VapiAuthHelper = new VapiAuthenticationHelper();
VimAuthHelper = new VimAuthenticationHelper();
SessionStubConfiguration =
VapiAuthHelper.LoginByUsernameAndPassword(
Server, UserName, Password);
VimAuthHelper.LoginByUsernameAndPassword(
Server, UserName, Password);

// Get the cluster
ManagedObjectReference clusterMoRef =
VimHelper.GetCluster(ClusterName, VimAuthHelper);
this.clusterId = new DynamicID();
this.clusterId.SetType("ClusterComputeResource");
this.clusterId.SetId(ClusterHelper.GetCluster(
VapiAuthHelper.StubFactory, SessionStubConfiguration,
DatacenterName, ClusterName));
this.clusterId.SetType((string)clusterMoRef.type);
this.clusterId.SetId((string)clusterMoRef.Value);


this.tagName = RandomIdGenerator.GetRandomString("Tag-");
var tagDesc = "Sample tag";
this.categoryName = RandomIdGenerator.GetRandomString("Cat-");
var categoryDesc = "Sample category";

// create services
this.tagService = VapiAuthHelper.StubFactory.CreateStub<Tag>(
this.tagService = VapiAuthHelper.StubFactory.CreateStub<cis.tagging.Tag>(
SessionStubConfiguration);
this.categoryService =
VapiAuthHelper.StubFactory.CreateStub<Category>(
Expand Down Expand Up @@ -169,7 +168,7 @@ private void UpdateCategoryDesc(
}

private string CreateTag(
Tag taggingService,
cis.tagging.Tag taggingService,
string name,
string description,
string categoryId)
Expand All @@ -182,7 +181,7 @@ private string CreateTag(
}

private void UpdateTagDesc(
Tag taggingService,
cis.tagging.Tag taggingService,
string tagId,
string description)
{
Expand Down
10 changes: 4 additions & 6 deletions vmware/samples/tagging/TaggingWorkflow/TaggingWorkflow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,12 @@
<Reference Include="vapi-runtime">
<HintPath>..\..\..\..\packages\vapi-runtime.dll</HintPath>
</Reference>
<Reference Include="Vim25Service, Version=6.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\packages\Vim25Service.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\vcenter\helpers\ClusterHelper.cs">
<Link>ClusterHelper.cs</Link>
</Compile>
<Compile Include="..\..\vcenter\helpers\DatacenterHelper.cs">
<Link>DatacenterHelper.cs</Link>
</Compile>
<Compile Include="TaggingWorkflow.cs" />
</ItemGroup>
<ItemGroup>
Expand Down
7 changes: 6 additions & 1 deletion wsdl/vim-service/core-types.xsd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2005-2016 VMware, Inc. All rights reserved.
Copyright 2005-2018 VMware, Inc. All rights reserved.
-->
<schema
targetNamespace="urn:vim25"
Expand Down Expand Up @@ -239,6 +239,11 @@
<element name="anyURI" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="ArrayOfBase64Binary">
<sequence>
<element name="base64Binary" type="xsd:base64Binary" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="ArrayOfManagedObjectReference">
<sequence>
<element name="ManagedObjectReference" type="vim25:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded" />
Expand Down
2 changes: 1 addition & 1 deletion wsdl/vim-service/query-messagetypes.xsd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2005-2016 VMware, Inc. All rights reserved.
Copyright 2005-2018 VMware, Inc. All rights reserved.
-->
<schema
targetNamespace="urn:vim25"
Expand Down
2 changes: 1 addition & 1 deletion wsdl/vim-service/query-types.xsd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2005-2016 VMware, Inc. All rights reserved.
Copyright 2005-2018 VMware, Inc. All rights reserved.
-->
<schema
targetNamespace="urn:vim25"
Expand Down
2 changes: 1 addition & 1 deletion wsdl/vim-service/reflect-messagetypes.xsd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2005-2016 VMware, Inc. All rights reserved.
Copyright 2005-2018 VMware, Inc. All rights reserved.
-->
<schema
targetNamespace="urn:reflect"
Expand Down
2 changes: 1 addition & 1 deletion wsdl/vim-service/reflect-types.xsd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright 2005-2016 VMware, Inc. All rights reserved.
Copyright 2005-2018 VMware, Inc. All rights reserved.
-->
<schema
targetNamespace="urn:reflect"
Expand Down
Loading

0 comments on commit f19ec0e

Please sign in to comment.