agents

package
v0.0.0-...-f9caf76 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package agents provides access to management network agents

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *gophercloud.ServiceClient, opts *ListOpts) pagination.Pager

List makes a request against the API to list all network agents

Types

type Agent

type Agent struct {
	ID               string               `json:"id"`
	Binary           string               `json:"binary"`
	Description      string               `json:"description"`
	AvailabilityZone string               `json:"availability_zone"`
	AdminStateUp     bool                 `json:"admin_state_up"`
	Alive            bool                 `json:"alive"`
	Topic            string               `json:"topic"`
	Host             string               `json:"host"`
	AgentType        string               `json:"agent_type"`
	Heartbeat        osTime.OpenStackTime `json:"heartbeat_timestamp"`
}

Agent represents a blockstorage service in the OpenStack cloud.

func ExtractAgents

func ExtractAgents(r pagination.Page) ([]Agent, error)

ExtractAgents interprets the results of a single page from a List() call, producing a slice of Agents entities.

type AgentPage

type AgentPage struct {
	pagination.LinkedPageBase
}

AgentPage abstracts the raw results of making a List() request against the API. As OpenStack extensions may freely alter the response bodies of structures returned to the client, you may only safely access the data provided through the ExtractAgent call.

func (AgentPage) IsEmpty

func (r AgentPage) IsEmpty() (bool, error)

IsEmpty returns true if a page contains no Agents results.

func (AgentPage) NextPageURL

func (r AgentPage) NextPageURL() (string, error)

NextPageURL uses the response's embedded link reference to navigate to the next page of results.

type GetResult

type GetResult struct {
	gophercloud.Result
}

func Get

func Get(client *gophercloud.ServiceClient, id string) (r GetResult)

Get makes a request against the API to get a network agent

func (GetResult) Extract

func (r GetResult) Extract() (*Agent, error)

Extract is a function that accepts a result and extracts a agent resource.

type ListOpts

type ListOpts struct {
	Host      string `q:"host"`
	AgentType string `q:"agent_type"`
}

ListOpts holds options for filtering agents

Directories

Path Synopsis
Package testing test network agents
Package testing test network agents

Jump to

Keyboard shortcuts

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