Click or drag to resize

IWsEndUserGetOpenStackFlavors Method

Get a list of Openstack Flavor available to the account indicated. By the method OpenStackFlavor() of Aruba WsEndUser, you can get a list of objects of class OpenStackFlavor that defines the compute, memory, and storage capacity of an instance.

Namespace:  Aruba.Cloud.WsEndUser
Assembly:  Aruba.Cloud.WsEndUser (in Aruba.Cloud.WsEndUser.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
[OperationContractAttribute]
WsResult<List<OpenStackFlavor>> GetOpenStackFlavors(
	GetOpenStackFlavorsRequest request
)

Parameters

request
Type: Aruba.Cloud.Provisioning.EntitiesGetOpenStackFlavorsRequest
Filter for the method

Return Value

Type: WsResultListOpenStackFlavor
List of OpenStackFlavor Objects
Examples
The following example describes a method which does a call to GetOpenStackFlavors
private static void Test_wsEndUser_GetOpenStackFlavors()
{
    using (var client = new WsEndUser.WsEndUserClient())
    {
        client.ClientCredentials.UserName.UserName = ARU_0000;
        client.ClientCredentials.UserName.Password = ARU_PSW;
        try
        {
            WsResultOfArrayOfOpenStackFlavor result = client.GetOpenStackFlavors(new GetOpenStackFlavorsRequest());

            if (result.Success)
            {                        
                var res = result.Value.ToList();
                foreach (var r in res)
                {
                    Console.WriteLine(string.Format("{0} - {1} - {2}", 
                        r.ID, 
                        r.IdentificationCode, 
                        r.Descriptions.First().Description));
                }
            }
        }
        catch (Exception ex)
        {                    
            throw new ApplicationException(String.Format(
              "An error has occurred while retrieving OpenStackFlavors. {0}", ex.Message));
        }
    }
}
See Also