OpenStack API client for golang
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dean Troyer d38d3def62 Clean up source with go fmt
Change-Id: Iaa5382f2fd35764ba7e795c5ae8e5b9b780eac31
7 years ago
examples Clean up source with go fmt 7 years ago
identity/middleware Clean up source with go fmt 7 years ago
image/v1 change from stackforge to openstack 7 years ago
objectstorage/v1 Clean up source with go fmt 7 years ago
openstack Clean up source with go fmt 7 years ago
testUtil Add auth package 8 years ago
util Added support 206 http code 7 years ago
volume/v2 Clean up source with go fmt 7 years ago
.gitignore change from stackforge to openstack 7 years ago
.gitreview change from stackforge to openstack 7 years ago Workflow documentation is now in infra-manual 9 years ago
LICENSE All tests passed. Initial commit. 10 years ago
Makefile Makefile with unit tests 7 years ago Final StackForge cleanups 7 years ago

OpenStack Golang Client

NOTE(dtroyer) Apr 2015: This repo is under heavy revision as it is being revived.

openstack/golang-client is an implementation of [OpenStack] ( API client in Go language. The code follows OpenStack licensing and uses its CI infrastructure for hosting. It currently implements [Identity Service v2] ( and [Object Storage v1] (

The initial focus is on building a solid core REST Session and OpenStack authentication on which to build the usual API interfaces. The architecture if the Session and authentication is similar to that used in the current Python Keystone client library: The Session object contains the HTTP interface methods and an authentication object that provides access to the auth token and service catalog.

Current State

Code maturity is considered experimental.

  • The new Session object is functional and used by most of the code now.
  • The examples work.
  • The image tests work.
  • The obejct store tests do not work.
  • identity/v2/auth.go is now unused, will be kept around for a short time for easier reference.


Use go get Or alternatively, download or clone the repository.

The lib was developed and tested on go 1.3. No external dependencies, so far.


The examples directory contains examples for using the SDK using real world working code. Each example starts with a two digit number followed by a name (e.g., 00-authentication.go). If you have a config.json file in the examples directory following the format of config.json.dist the example can be executed using go run [example name] setup.go. Or, all the examples can be executed running the script from the examples directory.


There are two types of test files. The *_test.go are standard golang unit test files. The examples can be run as integration tests.

The tests were written against the [OpenStack API specifications] ( The integration test were successful against the following:

If you use another provider and successfully completed the tests, please email the maintainer(s) so your service can be mentioned here. Alternatively, if you are a service provider and can arrange a free (temporary) account, a quick test can be arranged.


Apache v2.


The code repository utilizes the OpenStack CI infrastructure. Please use the [recommended workflow] ( If you are not a member yet, please consider joining as an [OpenStack contributor] ( If you have questions or comments, you can email the maintainer(s).

Coding Style

The source code is automatically formatted to follow go fmt by the [IDE] ( And where pragmatic, the source code follows this general [coding style] (