Logo: Relish

  1. Sign in

Project: Omnimax

Rackspace Authentication (openstacknet)

This is a simple test to authenticate to Rackspace.

Scenarios
  • @openstacknet
Authenticate (openstacknet)
Given
I am setup to run example code for openstacknet
When
I execute the following code:
//Required namespaces
using net.openstack.Providers.Rackspace.Objects;
using net.openstack.Providers.Rackspace;
using net.openstack.Core.Providers;
using net.openstack.Core.Exceptions.Response;

public class Authenticate
{
   public static void Main()
   {
        try
        {
            IIdentityProvider identityProvider = new CloudIdentityProvider();
            var userAccess = identityProvider.Authenticate(new RackspaceCloudIdentity
               {
                   Username = System.Environment.GetEnvironmentVariable("RAX_USERNAME"),
                   APIKey = System.Environment.GetEnvironmentVariable("RAX_API_KEY")
               });
            System.Console.WriteLine("Authenticated");
        }
        catch(ResponseException ex2)
        {
          throw;
            // do something
        }
    }
}
Then
the output should match
Authenticated

Last published about 6 years ago by Max Lincoln.