rl10

package
v8.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// APIName is used by rsc to display the command line help.
	APIName = "RightScale RightLink10 API"
)
View Source
const APIVersion = "unversioned"

API Version

Variables

View Source
var GenMetadata = map[string]*metadata.Resource{
	"DebugCookbookPath": &metadata.Resource{
		Name:        "DebugCookbookPath",
		Description: `Manipulate debug cookbook directory location`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "show",
				Description: `Retrieve debug cookbook directory location`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/debug/cookbook",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/debug/cookbook`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Set debug cookbook directory location`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/debug/cookbook",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/debug/cookbook`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "path",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "path",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "delete",
				Description: `Remove debug cookbook directory location`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/rll/debug/cookbook",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/debug/cookbook`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},
		},
	},
	"DockerControl": &metadata.Resource{
		Name:        "DockerControl",
		Description: `Manipulate the Docker integration in RightLink 10`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "show",
				Description: `Show Docker integration features`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/docker/control",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/docker/control`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Enable/disable Docker integration features`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/docker/control",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/docker/control`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "docker_host",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "enable_docker",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"none", "tags", "all"},
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "docker_host",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "enable_docker",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"none", "tags", "all"},
					},
				},
			},
		},
	},
	"Env": &metadata.Resource{
		Name:        "Env",
		Description: `Manipulate global script environment variables`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `Retrieve all environment variables`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/env",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/env`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Retrieve environment variable value`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/env/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/env/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Set environment variable value`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/env/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/env/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "payload",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				Payload: "string",
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "payload",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "delete",
				Description: `Delete environment variable`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/rll/env/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/env/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},
		},
	},
	"LoginControl": &metadata.Resource{
		Name:        "LoginControl",
		Description: `Manipulate login policy settings`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "show",
				Description: `Show login policy features`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/login/control",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/login/control`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Enable/disable login policy features`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/login/control",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/login/control`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "enable_login",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"on", "off", "compat"},
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "enable_login",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"on", "off", "compat"},
					},
				},
			},
		},
	},
	"Proc": &metadata.Resource{
		Name:        "Proc",
		Description: `List of process variables, such as version, identity, and protocol_version`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `List all process variables`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/proc",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/proc`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Retrieve process variable value`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/proc/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/proc/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Set process variable value`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/proc/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/proc/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "payload",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				Payload: "string",
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "payload",
						Description: ``,
						Type:        "string",
						Location:    metadata.PayloadParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},
		},
	},
	"Rl10": &metadata.Resource{
		Name:        "Rl10",
		Description: `Miscellaneous RightLink 10 local requests`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "upgrade",
				Description: `Relaunch the RightLink process using a specified binary`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/rll/upgrade",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/upgrade`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "exec",
						Description: `Absolute path to binary`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "exec",
						Description: `Absolute path to binary`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "run_recipe",
				Description: `Run git-based scripts (as recipes) synchronously`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/rll/run/recipe",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/run/recipe`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments",
						Description: `Script argument values`,
						Type:        "map",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "json",
						Description: `JSON hash of "name": "value" pairs`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "recipe",
						Description: `Name of recipe`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments",
						Description: `Script argument values`,
						Type:        "map[string]interface{}",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "json",
						Description: `JSON hash of "name": "value" pairs`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "recipe",
						Description: `Name of recipe`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "run_right_script",
				Description: `Run RightScripts synchronously`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "POST",
						Pattern:    "/rll/run/right_script",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/run/right_script`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments",
						Description: `Script argument values`,
						Type:        "map",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "right_script",
						Description: `Name of script`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "right_script_id",
						Description: `Id of script`,
						Type:        "int",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments",
						Description: `Script argument values`,
						Type:        "map[string]interface{}",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "right_script",
						Description: `Name of script`,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "right_script_id",
						Description: `Id of script`,
						Type:        "int",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},
		},
	},
	"TSS": &metadata.Resource{
		Name:        "TSS",
		Description: `Manipulate the TSS proxy (this is deprecated, please use the /rll/tss/control resource)`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "get_hostname",
				Description: `Get the TSS hostname to proxy (deprecated, RL10 knows the hostname)`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/tss/hostname",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/tss/hostname`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "put_hostname",
				Description: `Set the TSS hostname to proxy (deprecated, RL10 knows the hostname)`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/tss/hostname",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/tss/hostname`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "hostname",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "hostname",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},
		},
	},
	"TSSControl": &metadata.Resource{
		Name:        "TSSControl",
		Description: `Manipulate monitoring (TSS) settings`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "show",
				Description: `Show monitoring features`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/tss/control",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/tss/control`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Enable/disable monitoring features`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/tss/control",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/tss/control`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "enable_monitoring",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"false", "true", "none", "util", "extra", "all"},
					},
					&metadata.ActionParam{
						Name:        "tss_id",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "enable_monitoring",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
						ValidValues: []string{"false", "true", "none", "util", "extra", "all"},
					},
					&metadata.ActionParam{
						Name:        "tss_id",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "put_control",
				Description: `Control the TSS monitoring (deprecated, use the update action)`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/tss/control",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/tss/control`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "enable_monitoring",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "tss_id",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "enable_monitoring",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "tss_id",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
				},
			},
		},
	},
	"TSSPlugin": &metadata.Resource{
		Name:        "TSSPlugin",
		Description: `TSS Custom Plugins`,
		Identifier:  "",
		Actions: []*metadata.Action{
			&metadata.Action{
				Name:        "index",
				Description: `Get TSS plugins list`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/tss/exec",
						Variables:  []string{},
						Regexp:     regexp.MustCompile(`/rll/tss/exec`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "create",
				Description: `Add new TSS custom plugin`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/tss/exec/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/tss/exec/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments[]",
						Description: ``,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "executable",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments[]",
						Description: ``,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "executable",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "show",
				Description: `Get TSS plugin info`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "GET",
						Pattern:    "/rll/tss/exec/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/tss/exec/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},

			&metadata.Action{
				Name:        "update",
				Description: `Update TSS custom plugin`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "PUT",
						Pattern:    "/rll/tss/exec/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/tss/exec/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments[]",
						Description: ``,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "executable",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
				APIParams: []*metadata.ActionParam{
					&metadata.ActionParam{
						Name:        "arguments[]",
						Description: ``,
						Type:        "[]string",
						Location:    metadata.QueryParam,
						Mandatory:   false,
						NonBlank:    false,
					},
					&metadata.ActionParam{
						Name:        "executable",
						Description: ``,
						Type:        "string",
						Location:    metadata.QueryParam,
						Mandatory:   true,
						NonBlank:    false,
					},
				},
			},

			&metadata.Action{
				Name:        "destroy",
				Description: `Delete TSS plugin info`,
				PathPatterns: []*metadata.PathPattern{
					&metadata.PathPattern{
						HTTPMethod: "DELETE",
						Pattern:    "/rll/tss/exec/%s",
						Variables:  []string{"name"},
						Regexp:     regexp.MustCompile(`/rll/tss/exec/([^/]+)`),
					},
				},
				CommandFlags: []*metadata.ActionParam{},
				APIParams:    []*metadata.ActionParam{},
			},
		},
	},
}

Consists of a map of resource name to resource metadata.

Functions

func RegisterCommands

func RegisterCommands(registrar rsapi.APICommandRegistrar)

RegisterCommands registers all the commands with the kinpin application.

Types

type API

type API struct {
	*rsapi.API
}

API is the RightLink 10 client.

func FromCommandLine

func FromCommandLine(cmdLine *cmd.CommandLine) (*API, error)

FromCommandLine builds the API client from the command line.

func New

func New(host string, auth rsapi.Authenticator) *API

New returns a client that uses RL10 authentication. accountId, host and auth arguments are not used. If no HTTP client is specified then the default client is used.

func NewRL10

func NewRL10() (*API, error)

NewRL10 returns a RL10 client that uses the information stored in /var/run/rightlink/secret to do auth and configure the host. The client behaves identically to the one returned by New in all other aspects.

func (*API) BuildRequest

func (a *API) BuildRequest(resource, action, href string, params rsapi.APIParams) (*http.Request, error)

BuildRequest builds a HTTP request from a resource name and href and an action name and parameters. It is intended for generic clients that need to consume APIs in a generic maner. The method builds an HTTP request that can be fed to PerformRequest.

func (*API) DebugCookbookPathLocator

func (api *API) DebugCookbookPathLocator(href string) *DebugCookbookPathLocator

DebugCookbookPathLocator builds a locator from the given href.

func (*API) DockerControlLocator

func (api *API) DockerControlLocator(href string) *DockerControlLocator

DockerControlLocator builds a locator from the given href.

func (*API) EnvLocator

func (api *API) EnvLocator(href string) *EnvLocator

EnvLocator builds a locator from the given href.

func (*API) LoginControlLocator

func (api *API) LoginControlLocator(href string) *LoginControlLocator

LoginControlLocator builds a locator from the given href.

func (*API) ProcLocator

func (api *API) ProcLocator(href string) *ProcLocator

ProcLocator builds a locator from the given href.

func (*API) Rl10Locator

func (api *API) Rl10Locator(href string) *Rl10Locator

Rl10Locator builds a locator from the given href.

func (*API) RunCommand

func (a *API) RunCommand(cmd string) (*http.Response, error)

RunCommand parses and runs the command with the given name.

func (*API) ShowAPIActions

func (a *API) ShowAPIActions(cmd string) error

ShowAPIActions displays the command hrefs.

func (*API) ShowCommandHelp

func (a *API) ShowCommandHelp(cmd string) error

ShowCommandHelp displays the command help.

func (*API) TSSControlLocator

func (api *API) TSSControlLocator(href string) *TSSControlLocator

TSSControlLocator builds a locator from the given href.

func (*API) TSSLocator

func (api *API) TSSLocator(href string) *TSSLocator

TSSLocator builds a locator from the given href.

func (*API) TSSPluginLocator

func (api *API) TSSPluginLocator(href string) *TSSPluginLocator

TSSPluginLocator builds a locator from the given href.

type DebugCookbookPath added in v1.0.5

type DebugCookbookPath struct {
}

Manipulate debug cookbook directory location

type DebugCookbookPathLocator

type DebugCookbookPathLocator struct {
	Href
	// contains filtered or unexported fields
}

DebugCookbookPathLocator exposes the DebugCookbookPath resource actions.

func (*DebugCookbookPathLocator) Delete

func (loc *DebugCookbookPathLocator) Delete() error

DELETE /rll/debug/cookbook

Remove debug cookbook directory location

func (*DebugCookbookPathLocator) Show

func (loc *DebugCookbookPathLocator) Show() (string, error)

GET /rll/debug/cookbook

Retrieve debug cookbook directory location

func (*DebugCookbookPathLocator) Update

func (loc *DebugCookbookPathLocator) Update(path string) (string, error)

PUT /rll/debug/cookbook

Set debug cookbook directory location

type DockerControl

type DockerControl struct {
}

Manipulate the Docker integration in RightLink 10

type DockerControlLocator

type DockerControlLocator struct {
	Href
	// contains filtered or unexported fields
}

DockerControlLocator exposes the DockerControl resource actions.

func (*DockerControlLocator) Show

func (loc *DockerControlLocator) Show() (string, error)

GET /rll/docker/control

Show Docker integration features

func (*DockerControlLocator) Update

func (loc *DockerControlLocator) Update(options rsapi.APIParams) (string, error)

PUT /rll/docker/control

Enable/disable Docker integration features

type Env added in v1.0.5

type Env struct {
}

Manipulate global script environment variables

type EnvLocator

type EnvLocator struct {
	Href
	// contains filtered or unexported fields
}

EnvLocator exposes the Env resource actions.

func (*EnvLocator) Delete

func (loc *EnvLocator) Delete() error

DELETE /rll/env/:name

Delete environment variable

func (*EnvLocator) Index

func (loc *EnvLocator) Index() (string, error)

GET /rll/env

Retrieve all environment variables

func (*EnvLocator) Show

func (loc *EnvLocator) Show() (string, error)

GET /rll/env/:name

Retrieve environment variable value

func (*EnvLocator) Update

func (loc *EnvLocator) Update(payload string) (string, error)

PUT /rll/env/:name

Set environment variable value

type Href

type Href string

An Href contains the relative path to a resource or resource collection, e.g. "/api/servers/123" or "/api/servers".

func (*Href) ActionPath

func (r *Href) ActionPath(rName, aName string) (*metadata.ActionPath, error)

ActionPath computes the path to the given resource action. For example given the href "/api/servers/123" calling ActionPath with resource "servers" and action "clone" returns the path "/api/servers/123/clone" and verb POST. The algorithm consists of extracting the variables from the href by looking up a matching pattern from the resource metadata. The variables are then substituted in the action path. If there are more than one pattern that match the href then the algorithm picks the one that can substitute the most variables.

type LoginControl

type LoginControl struct {
}

Manipulate login policy settings

type LoginControlLocator

type LoginControlLocator struct {
	Href
	// contains filtered or unexported fields
}

LoginControlLocator exposes the LoginControl resource actions.

func (*LoginControlLocator) Show

func (loc *LoginControlLocator) Show() (string, error)

GET /rll/login/control

Show login policy features

func (*LoginControlLocator) Update

func (loc *LoginControlLocator) Update(options rsapi.APIParams) (string, error)

PUT /rll/login/control

Enable/disable login policy features

type Proc added in v1.0.5

type Proc struct {
}

List of process variables, such as version, identity, and protocol_version

type ProcLocator

type ProcLocator struct {
	Href
	// contains filtered or unexported fields
}

ProcLocator exposes the Proc resource actions.

func (*ProcLocator) Index

func (loc *ProcLocator) Index() (string, error)

GET /rll/proc

List all process variables

func (*ProcLocator) Show

func (loc *ProcLocator) Show() (string, error)

GET /rll/proc/:name

Retrieve process variable value

func (*ProcLocator) Update

func (loc *ProcLocator) Update(payload string) (string, error)

PUT /rll/proc/:name

Set process variable value

type Rl10 added in v1.0.5

type Rl10 struct {
}

Miscellaneous RightLink 10 local requests

type Rl10Locator

type Rl10Locator struct {
	Href
	// contains filtered or unexported fields
}

Rl10Locator exposes the Rl10 resource actions.

func (*Rl10Locator) RunRecipe

func (loc *Rl10Locator) RunRecipe(recipe string, options rsapi.APIParams) (string, error)

POST /rll/run/recipe

Run git-based scripts (as recipes) synchronously

func (*Rl10Locator) RunRightScript

func (loc *Rl10Locator) RunRightScript(options rsapi.APIParams) (string, error)

POST /rll/run/right_script

Run RightScripts synchronously

func (*Rl10Locator) Upgrade

func (loc *Rl10Locator) Upgrade(exec string) (string, error)

POST /rll/upgrade

Relaunch the RightLink process using a specified binary

type TSS added in v1.0.9

type TSS struct {
}

Manipulate the TSS proxy (this is deprecated, please use the /rll/tss/control resource)

type TSSControl

type TSSControl struct {
}

Manipulate monitoring (TSS) settings

type TSSControlLocator

type TSSControlLocator struct {
	Href
	// contains filtered or unexported fields
}

TSSControlLocator exposes the TSSControl resource actions.

func (*TSSControlLocator) PutControl

func (loc *TSSControlLocator) PutControl(options rsapi.APIParams) (string, error)

PUT /rll/tss/control

Control the TSS monitoring (deprecated, use the update action)

func (*TSSControlLocator) Show

func (loc *TSSControlLocator) Show() (string, error)

GET /rll/tss/control

Show monitoring features

func (*TSSControlLocator) Update

func (loc *TSSControlLocator) Update(options rsapi.APIParams) (string, error)

PUT /rll/tss/control

Enable/disable monitoring features

type TSSLocator added in v1.0.9

type TSSLocator struct {
	Href
	// contains filtered or unexported fields
}

TSSLocator exposes the TSS resource actions.

func (*TSSLocator) GetHostname added in v1.0.9

func (loc *TSSLocator) GetHostname() (string, error)

GET /rll/tss/hostname

Get the TSS hostname to proxy (deprecated, RL10 knows the hostname)

func (*TSSLocator) PutHostname added in v1.0.9

func (loc *TSSLocator) PutHostname(hostname string) (string, error)

PUT /rll/tss/hostname

Set the TSS hostname to proxy (deprecated, RL10 knows the hostname)

type TSSPlugin

type TSSPlugin struct {
}

TSS Custom Plugins

type TSSPluginLocator

type TSSPluginLocator struct {
	Href
	// contains filtered or unexported fields
}

TSSPluginLocator exposes the TSSPlugin resource actions.

func (*TSSPluginLocator) Create

func (loc *TSSPluginLocator) Create(executable string, options rsapi.APIParams) (string, error)

PUT /rll/tss/exec/:name

Add new TSS custom plugin

func (*TSSPluginLocator) Destroy

func (loc *TSSPluginLocator) Destroy() error

DELETE /rll/tss/exec/:name

Delete TSS plugin info

func (*TSSPluginLocator) Index

func (loc *TSSPluginLocator) Index() (string, error)

GET /rll/tss/exec

Get TSS plugins list

func (*TSSPluginLocator) Show

func (loc *TSSPluginLocator) Show() (string, error)

GET /rll/tss/exec/:name

Get TSS plugin info

func (*TSSPluginLocator) Update

func (loc *TSSPluginLocator) Update(executable string, options rsapi.APIParams) error

PUT /rll/tss/exec/:name

Update TSS custom plugin

Jump to

Keyboard shortcuts

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