4.0
Table Of Contents
- Lab Manager SOAP API Reference
- Contents
- About This Book
- Introducing VMware vCenter Lab Manager SOAP API
- Getting Started with the Lab Manager SOAP API
- Lab Manager API Data Types
- Lab Manager API Method Reference
- ConfigurationCapture
- ConfigurationCheckout
- ConfigurationClone
- ConfigurationDelete
- ConfigurationDeploy
- ConfigurationPerformAction
- ConfigurationSetPublicPrivate
- ConfigurationUndeploy
- GetConfiguration
- GetConfigurationByName
- GetCurrentOrganizationName
- GetCurrentWorkspaceName
- GetMachine
- GetMachineByName
- GetSingleConfigurationByName
- ListConfigurations
- ListMachines
- LiveLink
- MachinePerformAction
- SetCurrentOrganizationByName
- SetCurrentWorkspaceByName
- Index
Lab Manager SOAP API Reference
14 VMware, Inc.
//
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.AuthenticationHeaderValue.workspacename = "My’Workspace";
//**
//** Call GetSingleConfigurationByName()
//** Get default configuration that comes with Lab Manager
//** installation and write all property values to console
//**
LabManagerSoap.Configuration defCfg=
binding.GetSingleConfigurationByName("Sample Configuration");
//
//** Print out configuration properties to the Console
//
Console.WriteLine("Name = " + defCfg.name);
Console.WriteLine("ID = " + defCfg.id.ToString());
Console.WriteLine("Description = "+ defCfg.description);
Console.WriteLine("isPublic = "+ defCfg.isPublic.ToString());
Console.WriteLine("isDeployed = "+ defCfg.isDeployed.ToString());
Console.WriteLine("fenceMode = "+ defCfg.fenceMode.ToString());
Console.WriteLine("type = " + defCfg.type.ToString());
Console.WriteLine("owner = " + defCfg.owner);
Console.WriteLine("dateCreated = " +
defCfg.dateCreated.ToString());
Console.ReadLine();
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
} //** end Main
} //** end Class1
/// <summary>
/// This class is needed to automatically accept the SSL certificate
/// the Lab Manager sends on each API call.
/// </summary>
public class CertificateAccepter : System.Net.ICertificatePolicy
{
public CertificateAccepter() {}
public bool CheckValidationResult(
System.Net.ServicePoint servicePoint,
System.Security.Cryptography.X509Certificates.X509Certificate cert,
System.Net.WebRequest webRequest, int iProblem)
{
return true;
}
}
} //** end Namespace}