Grounded in the Cloud
Showing results for 
Search instead for 
Do you mean 

OpenStack .NET SDK Released

Wayne-Foley on ‎06-19-2014 09:00 AM

The OpenStack .NET SDK team is pleased to announce its first public release with this 0.9.1 version release, which includes support for the Swift storage service. The team firmly believes in an iterative development approach, I can’t wait to show you what we have up our sleves!

The SDK is compatible with OpenStack, DevStack, and with minor modifications can support the HP Helion Public Cloud. The single Nuget SDK package includes binaries for both .NET 4.0 and 4.5 frameworks. The 4.5 binary has been built as a Portable Class Library and can be used to build applications for Microsoft Store and Windows Phone. The SDK can also be consumed by Xamarin Studio and used in cross-platform and mobile applications, including iOS and Mac Store apps.


Enough already! Show me how use it!!

At the core of the SDK is the OpenStackClient class. The client can be used to connect to an instance of OpenStack, and to create clients that can be used to interact with services that are enabled, or present on the OpenStack instance. Before the OpenStackClient can connect, it will need some credentials.


var authUri = new Uri("");

var userName = "user name";

var password = "password";

var tenantId = "XXXXXXXXXXXXXX-Project";


var credential = new OpenStackCredential(authUri, userName, password, tenantId);

var client = OpenStackClientFactory.CreateClient(credential);


First you will need to supply the public Keystone/Identity endpoint for the OpenStack instance. From here, you'll supply the user name, password, and tenant id. After the credentials have been created, you can use the OpenStackClientFactory to create a new OpenStackClient object to interact with. Once you have a client, you'll want to connect it to the OpenStack instance.

await client.Connect();


When this call is made, the client will take the credentials it was given and attempt to authenticate with the OpenStack instance. After it has successfully authenticated, the client can be used to create service clients that give you access to supported OpenStack services (i.e. Swift, Nova, Neutron, etc).


var storageServiceClient = client.CreateServiceClient<IStorageServiceClient>();


Currently the SDK support two services: Identity and Storage. The Identity client only supports authentication, but may be expanded in the near future. The Storage client supports working with containers, objects, and folders. It also has limited support for accounts. The call above will return a client that can be used to interact with the storage service.


var storageAccount = await storageServiceClient.GetStorageAccount();

foreach(var container in storageAccount.Containers)





Start by asking the storage client for the current storage account. The class that is returned can then be used to list out all of the containers in the account.

This is a very basic introduction to the OpenStack .NET SDK. More information can be found on the OpenStack projects wiki  while additional examples and a complete source code listing can be found on the StackForge repository.  The OpenStack .NET SDK project is just getting started, so your feedback is important!  Report bugs and add feature requests on the project’s Launchpad page. The team is excited to see what cool and amazing projects we can enable, so be creative, and start developing!

0 Kudos
About the Author


Nov 29 - Dec 1
Discover 2016 London
Learn how to thrive in a world of digital transformation at our biggest event of the year, Discover 2016 London, November 29 - December 1.
Read more
Each Month in 2016
Software Expert Days - 2016
Join us online to talk directly with our Software experts during online Expert Days. Find information here about past, current, and upcoming Expert Da...
Read more
View all