api

package
v0.8.0-dev.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package api defines the data structure to be used in the request/response messages between libnetwork and the remote ipam plugin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetAddressSpacesResponse

type GetAddressSpacesResponse struct {
	Response
	LocalDefaultAddressSpace  string
	GlobalDefaultAddressSpace string
}

GetAddressSpacesResponse is the response to the “get default address spaces“ request message

type GetCapabilityResponse added in v0.5.2

type GetCapabilityResponse struct {
	Response
	RequiresMACAddress bool
}

GetCapabilityResponse is the response of GetCapability request

func (GetCapabilityResponse) ToCapability added in v0.5.2

func (capRes GetCapabilityResponse) ToCapability() *ipamapi.Capability

ToCapability converts the capability response into the internal ipam driver capaility structure

type ReleaseAddressRequest

type ReleaseAddressRequest struct {
	PoolID  string
	Address string
}

ReleaseAddressRequest represents the expected data in a “release address“ request message

type ReleaseAddressResponse

type ReleaseAddressResponse struct {
	Response
}

ReleaseAddressResponse represents the response message to a “release address“ request

type ReleasePoolRequest

type ReleasePoolRequest struct {
	PoolID string
}

ReleasePoolRequest represents the expected data in a “release address pool“ request message

type ReleasePoolResponse

type ReleasePoolResponse struct {
	Response
}

ReleasePoolResponse represents the response message to a “release address pool“ request

type RequestAddressRequest

type RequestAddressRequest struct {
	PoolID  string
	Address string
	Options map[string]string
}

RequestAddressRequest represents the expected data in a “request address“ request message

type RequestAddressResponse

type RequestAddressResponse struct {
	Response
	Address string // in CIDR format
	Data    map[string]string
}

RequestAddressResponse represents the expected data in the response message to a “request address“ request

type RequestPoolRequest

type RequestPoolRequest struct {
	AddressSpace string
	Pool         string
	SubPool      string
	Options      map[string]string
	V6           bool
}

RequestPoolRequest represents the expected data in a “request address pool“ request message

type RequestPoolResponse

type RequestPoolResponse struct {
	Response
	PoolID string
	Pool   string // CIDR format
	Data   map[string]string
}

RequestPoolResponse represents the response message to a “request address pool“ request

type Response

type Response struct {
	Error string
}

Response is the basic response structure used in all responses

func (*Response) GetError

func (r *Response) GetError() string

GetError returns the error from the response, if any.

func (*Response) IsSuccess

func (r *Response) IsSuccess() bool

IsSuccess returns wheter the plugin response is successful

Jump to

Keyboard shortcuts

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