nmagentclient

package
v1.4.12 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GetNmAgentSupportedApiURLFmt Api endpoint to get supported Apis of NMAgent
	GetNmAgentSupportedApiURLFmt       = "http://%s/machine/plugins/?comp=nmagent&type=GetSupportedApis"
	GetNetworkContainerVersionURLFmt   = "" /* 142-byte string literal not displayed */
	GetNcVersionListWithOutTokenURLFmt = "http://%s/machine/plugins/?comp=nmagent&type=NetworkManagement/interfaces/api-version/%s"
)

Variables

View Source
var (
	WireserverIP = "168.63.129.16"
)

WireServerIP - wire server ip

Functions

func GetNetworkContainerVersion added in v1.1.6

func GetNetworkContainerVersion(
	networkContainerID,
	getNetworkContainerVersionURL string) (*http.Response, error)

GetNetworkContainerVersion :- Retrieves NC version from NMAgent

func GetNmAgentSupportedApis added in v1.2.1

func GetNmAgentSupportedApis(
	httpc *http.Client,
	getNmAgentSupportedApisURL string) ([]string, error)

GetNmAgentSupportedApis :- Retrieves Supported Apis from NMAgent

func JoinNetwork

func JoinNetwork(
	networkID string,
	joinNetworkURL string) (*http.Response, error)

JoinNetwork joins the given network

func PublishNetworkContainer

func PublishNetworkContainer(
	networkContainerID string,
	createNetworkContainerURL string,
	requestBodyData []byte) (*http.Response, error)

PublishNetworkContainer publishes given network container

func UnpublishNetworkContainer

func UnpublishNetworkContainer(
	networkContainerID string,
	deleteNetworkContainerURL string) (*http.Response, error)

UnpublishNetworkContainer unpublishes given network container

Types

type ContainerInfo added in v1.2.2

type ContainerInfo struct {
	NetworkContainerID string `json:"networkContainerId"`
	Version            string `json:"version"`
}

type NMANetworkContainerListResponse added in v1.2.2

type NMANetworkContainerListResponse struct {
	ResponseCode string          `json:"httpStatusCode"`
	Containers   []ContainerInfo `json:"networkContainers"`
}

type NMANetworkContainerResponse added in v1.1.6

type NMANetworkContainerResponse struct {
	ResponseCode       string `json:"httpStatusCode"`
	NetworkContainerID string `json:"networkContainerId"`
	Version            string `json:"version"`
}

NMANetworkContainerResponse - NMAgent response.

type NMAgentClient added in v1.2.2

type NMAgentClient struct {
	// contains filtered or unexported fields
}

NMAgentClient is client to handle queries to nmagent

func NewNMAgentClient added in v1.2.2

func NewNMAgentClient(url string) (*NMAgentClient, error)

NewNMAgentClient create a new nmagent client.

func (*NMAgentClient) GetNcVersionListWithOutToken added in v1.2.2

func (nmagentclient *NMAgentClient) GetNcVersionListWithOutToken(ncNeedUpdateList []string) map[string]int

GetNcVersionListWithOutToken query nmagent for programmed container version.

type NMAgentClientInterface added in v1.2.2

type NMAgentClientInterface interface {
	GetNcVersionListWithOutToken(ncNeedUpdateList []string) map[string]int
}

NMAgentClientInterface has interface that nmagent client will handle

type NMAgentSupportedApisResponseXML added in v1.2.1

type NMAgentSupportedApisResponseXML struct {
	SupportedApis []string `xml:"type"`
}

Jump to

Keyboard shortcuts

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