serviceVersionList

package
v0.0.0-...-d1703da Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2015 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

README

Golang Client

stackforge/golang-client is yet another implementation of [OpenStack] (http://www.openstack.org/) API client in Go language. The code follows OpenStack licensing and borrows its infrastructure for code hosting. It currently implements [Identity Service v2] (http://docs.openstack.org/api/openstack-identity-service/2.0/content/) and [Object Storage v1] (http://docs.openstack.org/api/openstack-object-storage/1.0/content/). Some API calls are not implemented initially, but the intention is to expand the lib over time (where pragmatic).

Code maturity is considered experimental.

Installation

Use go get git.openstack.org/stackforge/golang-client.git. Or alternatively, download or clone the repository.

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

Examples

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 run-all.sh from the examples directory.

Testing

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] (http://docs.openstack.org/api/api-specs.html). 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.

License

Apache v2.

Contributing

The code repository borrows OpenStack StackForge infrastructure. Please use the [recommended workflow] (https://wiki.openstack.org/wiki/GerritWorkflow). If you are not a member yet, please consider joining as an [OpenStack contributor] (https://wiki.openstack.org/wiki/HowToContribute). 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] (https://code.google.com/p/liteide/). And where pragmatic, the source code follows this general [coding style] (http://slamet.neocities.org/coding-style.html).

Documentation

Overview

Package serviceVersionList implements a client library for accessing service version endpoints This can be used to understand what versions of particular services are running

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEndpointVersion

func FindEndpointVersion(serviceURL string, tokenID string, r requester.SendRequestFunction, version string) (string, error)

FindEndpointVersion will get the version endpoint and seach for a current or supported version of the service.

Types

type Link struct {
	HRef string `json:"href"`
	Rel  string `json:"rel"`
}

Link contains information of a link

type Version

type Version struct {
	Status string `json:"status"`
	ID     string `json:"id"`
	Links  []Link `json:"links"`
}

Version is a structure for one image version

func Endpoints

func Endpoints(serviceURL string, tokenID string, r requester.SendRequestFunction) ([]Version, error)

Endpoints gets the service versions from the specified endpoint.

func FilterVersion

func FilterVersion(versions []Version, status string, serviceVersion string) Version

FilterVersion will locate the version of the service

func (version Version) GetSelfLink() Link

GetSelfLink returns the self link for the Version. this Link contains the url of the service itself.

Directories

Path Synopsis
blockstorage
v1
compute
v2
Package compute is used to manage hypervisors, virtual machines, and SSH key pairs
Package compute is used to manage hypervisors, virtual machines, and SSH key pairs
database
v1
identity
common
Package common provides interfaces and ability to allow getting tokens and service urls independent of the auth version.
Package common provides interfaces and ability to allow getting tokens and service urls independent of the auth version.
v2
Package identity provides functions for client-side access to OpenStack IdentityService.
Package identity provides functions for client-side access to OpenStack IdentityService.
image
v1
Package image implements a client library for accessing OpenStack Image V1 service Images and ImageDetails can be retrieved using the api.
Package image implements a client library for accessing OpenStack Image V1 service Images and ImageDetails can be retrieved using the api.
machine_metadata
network
v2
Package network is used to create, delete, and query, networks, ports and subnets Package network is used to create, delete, and query, networks, ports and subnets
Package network is used to create, delete, and query, networks, ports and subnets Package network is used to create, delete, and query, networks, ports and subnets
objectstorage
v1
Package testUtil has helpers to be used with unit tests
Package testUtil has helpers to be used with unit tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL