1.2.2 Templates

The templates are the various configurations of the Operating System with pre-installed/configured software that Aruba has made available for each hypervisor, it is also possible to create customized templates, see the Create a personal template section.

To get the list of Templates available with the related configurable resources we can use the GetHypervisors methods. By scrolling the Templates property of each Hypervisor object returned by the method you can view the list of OS/templates available. By scrolling the ResourceBounds property of each TemplateDetails object you can get a map of the resources with the related setting values.

Here is the example that prints the list of templates associated with each hypervisor with related resources.
//IWsEndUser.GetHypervisors Method (c# .NET)
private static void GetHpervisors(WsEndUserClient client)
{
    WsResultOfArrayOfHypervisor hypervisors = client.GetHypervisors();
    foreach (Hypervisor hypervisor in hypervisors.Value)
    {
        Console.WriteLine(hypervisor.HypervisorType);
        Console.WriteLine(hypervisor.HypervisorServerType);

        foreach (TemplateDetails template in hypervisor.Templates)
        {
            Console.WriteLine("... " + template.Id + " - "
                + template.Name + " - " + template.Description + " - "
                + template.ProductId + " - " + template.TemplateType + " - "
                + template.ToolsAvailable);

            foreach (ResourceBound resourceBound in template.ResourceBounds)
            {
                Console.WriteLine("... ... " + resourceBound.Default + " - "
                    + resourceBound.Min + " - " + resourceBound.Max + " - "
                    + resourceBound.ResourceType);
            }
        }
    }
}
//IWsEndUser.GetHypervisors Method Method (JAVA)
private static void GetHpervisors(IWsEndUser client)
{
    WsResultOfArrayOfHypervisor result = client.getHypervisors();
    
    //retrieves the list of Hypervisors from the resulting object
    List<Hypervisor> hypervisors = result.getValue().getHypervisor();
    
    for (Hypervisor hypervisor: hypervisors)
    {
        System.out.println(hypervisor.getHypervisorType().value());
        System.out.println(hypervisor.getHypervisorServerType().value());

        //retrieves the list of associated templates
        List<TemplateDetails> templates = 
                hypervisor.getTemplates().getTemplateDetails();
        
        for (TemplateDetails template: templates)
        {
            System.out.println("... " + template.getId() + " - "
                    + template.getName() + " - " 
                    + template.getDescription() + " - "
                    + template.getProductId() + " - " 
                    + template.getTemplateType().value() + " - "
                    + template.isToolsAvailable());

            //retrieves the list of associated resources
            List<ResourceBound> resources = 
                    template.getResourceBounds().getResourceBound();
            
             for (ResourceBound resourceBound: resources)
            {
                System.out.println("... ... " 
                        + resourceBound.getDefault() + " - "
                        + resourceBound.getMin() + " - " 
                        + resourceBound.getMax() + " - "
                        + resourceBound.getResourceType().value());
            }
        }
    }    
}

Version
API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl
See also

API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl