rpa

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config      *Config        `json:"config"`
	Group       string         `json:"-"`
	CopyName    string         `json:"-"`
	CopyRegexp  *regexp.Regexp `json:"-"`
	Identifiers *Identifiers   `json:"identifiers"`
}

App contains settings & variables for the current execution time

func (*App) DisplayAllGroups

func (a *App) DisplayAllGroups()

DisplayAllGroups displays the status of all consisntenct groups

func (*App) DisplayGroup

func (a *App) DisplayGroup(groupName string)

DisplayGroup displays the status of a consistency group by group name

func (*App) EnableAll added in v0.9.2

func (a *App) EnableAll()

EnableAll wraper for enabling Direct Image Access for all CG

func (*App) EnableOne added in v0.9.2

func (a *App) EnableOne()

EnableOne wraper for enabling Direct Image Access for a single CG

func (*App) FinishAll

func (a *App) FinishAll()

FinishAll wraper for finishing Direct Image Access for all CG

func (*App) FinishOne

func (a *App) FinishOne()

FinishOne wraper for finishing Direct Image Access for a single CG

func (*App) ListGroups

func (a *App) ListGroups()

ListGroups lists all consistency group names

type ClusterUID

type ClusterUID struct {
	ID int `json:"id"`
}

ClusterUID is the same as GroupUID but keeping seperate for clarity and/or if api data expands

type Config added in v0.9.2

type Config struct {
	RPAURL    string `json:"rpa_url"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Delay     int    `json:"delay"`
	PollDelay int    `json:"polldelay"`
	PollMax   int    `json:"pollmax"`
	CheckMode bool   `json:"-"`
	Debug     bool   `json:"-"`
}

Config contains various API configurations for the application

func (*Config) Load added in v0.9.2

func (c *Config) Load() *Config

Load will populate the application config based on the configuration file & cli flags

type CopyUID

type CopyUID struct {
	GroupUID      GroupUID      `json:"groupUID"`
	GlobalCopyUID GlobalCopyUID `json:"globalCopyUID"`
}

CopyUID is used by GroupCopiesSettings for copyUID within groupCopiesSettings

type GlobalCopyUID

type GlobalCopyUID struct {
	CopyUID    int        `json:"copyUID"`
	ClusterUID ClusterUID `json:"clusterUID"`
}

GlobalCopyUID is used by GroupCopiesSettings for globalCopyUID within groupCopiesSettings

type GroupCopiesSettings

type GroupCopiesSettings struct {
	Name                   string                 `json:"name"`
	CopyUID                CopyUID                `json:"copyUID"`
	RoleInfo               RoleInfo               `json:"roleInfo"`
	ImageAccessInformation ImageAccessInformation `json:"imageAccessInformation"`
}

GroupCopiesSettings is used by GroupSettingsResponse for groupCopiesSettings

type GroupName

type GroupName struct {
	String string `json:"string"`
}

GroupName to marshal response from /fapi/rest/5_1/groups/{id}/name/

type GroupSettingsResponse

type GroupSettingsResponse struct {
	GroupCopiesSettings []GroupCopiesSettings `json:"groupCopiesSettings"`
}

GroupSettingsResponse to marshal response from /fapi/rest/5_1/groups/{id}/settings/"

type GroupUID

type GroupUID struct {
	ID int `json:"id"`
}

GroupUID holds groupUID.id

type GroupsResponse

type GroupsResponse struct {
	InnerSet []GroupUID `json:"innerSet"`
}

GroupsResponse to marshal response from /fapi/rest/5_1/groups/

type Identifiers

type Identifiers struct {
	ProductionNodeRegexp *regexp.Regexp `json:"production_node_regexp"`
	CopyNodeRegexp       *regexp.Regexp `json:"copy_node_regexp"`
	TestNodeRegexp       *regexp.Regexp `json:"test_node_regexp"`
}

Identifiers describe the regular expression strings for use in copy name validations

func (*Identifiers) Load added in v0.9.2

func (i *Identifiers) Load() *Identifiers

Load will compile the application copy regular expression identifiers

type ImageAccessInformation added in v1.1.0

type ImageAccessInformation struct {
	ImageAccessEnabled bool             `json:"imageAccessEnabled"`
	ImageInformation   ImageInformation `json:"imageInformation"`
}

ImageAccessInformation holds the boolean imageAccessEnabled within groupCopiesSettings

type ImageAccessPutData

type ImageAccessPutData struct {
	Mode     string `json:"mode"`
	Scenario string `json:"scenario"`
}

ImageAccessPutData is used to marshal the required PUT data to enable image access

type ImageInformation added in v1.1.3

type ImageInformation struct {
	Mode string `json:"mode"`
}

ImageInformation holds the image information found within ImageAccessInformation

type RoleInfo

type RoleInfo struct {
	Role string `json:"role"`
}

RoleInfo holds the 'ACTIVE/REPLICA' json string roleInfo within groupCopiesSettings

type Task

type Task struct {
	GroupName  string
	GroupUID   int
	ClusterUID int
	CopyName   string
	CopyUID    int
	Enable     bool
}

Task is used to pass variables required to perform various tasks to the API This helps avoid creating functions with multiple args and provides meaningful variable names

type User

type User struct {
	Name   string     `json:"name"`
	Groups []GroupUID `json:"groups"`
}

User is used by UsersSettingsResponse

type UsersSettingsResponse

type UsersSettingsResponse struct {
	Users []User `json:"users"`
}

UsersSettingsResponse to marshal response from /fapi/rest/5_1/users/settings/

Jump to

Keyboard shortcuts

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