sapcontrolapi

package
v0.0.0-...-a443d5c Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

generated nolint

Index

Constants

View Source
const (
	STATECOLOR_GRAY   STATECOLOR = "SAPControl-GRAY"
	STATECOLOR_GREEN  STATECOLOR = "SAPControl-GREEN"
	STATECOLOR_YELLOW STATECOLOR = "SAPControl-YELLOW"
	STATECOLOR_RED    STATECOLOR = "SAPControl-RED"

	HAVerificationStateSAPControlHASUCCESS HAVerificationState = "SAPControl-HA-SUCCESS"
	HAVerificationStateSAPControlHAWARNING HAVerificationState = "SAPControl-HA-WARNING"
	HAVerificationStateSAPControlHAERROR   HAVerificationState = "SAPControl-HA-ERROR"

	HACheckCategorySAPControlSAPCONFIGURATION HACheckCategory = "SAPControl-SAP-CONFIGURATION"
	HACheckCategorySAPControlSAPSTATE         HACheckCategory = "SAPControl-SAP-STATE"
	HACheckCategorySAPControlHACONFIGURATION  HACheckCategory = "SAPControl-HA-CONFIGURATION"
	HACheckCategorySAPControlHASTATE          HACheckCategory = "SAPControl-HA-STATE"

	// NOTE: This was just copy-pasted from sap_host_exporter, not used right now
	// see: https://github.com/SUSE/sap_host_exporter/blob/68bbf2f1b490ab0efaa2dd7b878b778f07fba2ab/lib/sapcontrol/webservice.go#L42
	STATECOLOR_CODE_GRAY   STATECOLOR_CODE = 1
	STATECOLOR_CODE_GREEN  STATECOLOR_CODE = 2
	STATECOLOR_CODE_YELLOW STATECOLOR_CODE = 3
	STATECOLOR_CODE_RED    STATECOLOR_CODE = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GetInstanceProperties

type GetInstanceProperties struct {
	XMLName xml.Name `xml:"urn:SAPControl GetInstanceProperties"`
}

type GetInstancePropertiesResponse

type GetInstancePropertiesResponse struct {
	XMLName    xml.Name            `xml:"urn:SAPControl GetInstancePropertiesResponse"`
	Properties []*InstanceProperty `xml:"properties>item,omitempty" json:"properties>item,omitempty"`
}

type GetProcessList

type GetProcessList struct {
	XMLName xml.Name `xml:"urn:SAPControl GetProcessList"`
}

type GetProcessListResponse

type GetProcessListResponse struct {
	XMLName   xml.Name     `xml:"urn:SAPControl GetProcessListResponse"`
	Processes []*OSProcess `xml:"process>item,omitempty" json:"process>item,omitempty"`
}

type GetSystemInstanceList

type GetSystemInstanceList struct {
	XMLName xml.Name `xml:"urn:SAPControl GetSystemInstanceList"`
	Timeout int32    `xml:"timeout,omitempty" json:"timeout,omitempty"`
}

type GetSystemInstanceListResponse

type GetSystemInstanceListResponse struct {
	XMLName   xml.Name       `xml:"urn:SAPControl GetSystemInstanceListResponse"`
	Instances []*SAPInstance `xml:"instance>item,omitempty" json:"instance>item,omitempty"`
}

type GetVersionInfo

type GetVersionInfo struct {
	XMLName xml.Name `xml:"urn:SAPControl GetVersionInfo"`
}

type GetVersionInfoResponse

type GetVersionInfoResponse struct {
	XMLName          xml.Name       `xml:"urn:SAPControl GetVersionInfoResponse"`
	InstanceVersions []*VersionInfo `xml:"version>item,omitempty" json:"version>item,omitempty"`
}

type HACheck

type HACheck struct {
	State       *HAVerificationState `xml:"state,omitempty" json:"state,omitempty"`
	Category    *HACheckCategory     `xml:"category,omitempty" json:"category,omitempty"`
	Description string               `xml:"description,omitempty" json:"description,omitempty"`
	Comment     string               `xml:"comment,omitempty" json:"comment,omitempty"`
}

type HACheckCategory

type HACheckCategory string

type HACheckConfig

type HACheckConfig struct {
	XMLName xml.Name `xml:"urn:SAPControl HACheckConfig"`
}

type HACheckConfigResponse

type HACheckConfigResponse struct {
	XMLName xml.Name   `xml:"urn:SAPControl HACheckConfigResponse"`
	Checks  []*HACheck `xml:"check>item,omitempty" json:"check>item,omitempty"`
}

type HAGetFailoverConfig

type HAGetFailoverConfig struct {
	XMLName xml.Name `xml:"urn:SAPControl HAGetFailoverConfig"`
}

type HAGetFailoverConfigResponse

type HAGetFailoverConfigResponse struct {
	XMLName               xml.Name  `xml:"urn:SAPControl HAGetFailoverConfigResponse"`
	HAActive              bool      `xml:"HAActive,omitempty" json:"HAActive,omitempty"`
	HAProductVersion      string    `xml:"HAProductVersion,omitempty" json:"HAProductVersion,omitempty"`
	HASAPInterfaceVersion string    `xml:"HASAPInterfaceVersion,omitempty" json:"HASAPInterfaceVersion,omitempty"`
	HADocumentation       string    `xml:"HADocumentation,omitempty" json:"HADocumentation,omitempty"`
	HAActiveNode          string    `xml:"HAActiveNode,omitempty" json:"HAActiveNode,omitempty"`
	HANodes               *[]string `xml:"HANodes>item,omitempty" json:"HANodes>item,omitempty"`
}

type HAVerificationState

type HAVerificationState string

type InstanceProperty

type InstanceProperty struct {
	Property     string `xml:"property,omitempty" json:"property,omitempty"`
	Propertytype string `xml:"propertytype,omitempty" json:"propertytype,omitempty"`
	Value        string `xml:"value,omitempty" json:"value,omitempty"`
}

type OSProcess

type OSProcess struct {
	Name        string     `xml:"name,omitempty" json:"name,omitempty"`
	Description string     `xml:"description,omitempty" json:"description,omitempty"`
	Dispstatus  STATECOLOR `xml:"dispstatus,omitempty" json:"dispstatus,omitempty"`
	Textstatus  string     `xml:"textstatus,omitempty" json:"textstatus,omitempty"`
	Starttime   string     `xml:"starttime,omitempty" json:"starttime,omitempty"`
	Elapsedtime string     `xml:"elapsedtime,omitempty" json:"elapsedtime,omitempty"`
	Pid         int32      `xml:"pid,omitempty" json:"pid,omitempty"`
}

type SAPInstance

type SAPInstance struct {
	Hostname      string     `xml:"hostname,omitempty" json:"hostname,omitempty"`
	InstanceNr    int32      `xml:"instanceNr,omitempty" json:"instanceNr"`
	HttpPort      int32      `xml:"httpPort,omitempty" json:"httpPort,omitempty"`
	HttpsPort     int32      `xml:"httpsPort,omitempty" json:"httpsPort,omitempty"`
	StartPriority string     `xml:"startPriority,omitempty" json:"startPriority,omitempty"`
	Features      string     `xml:"features,omitempty" json:"features,omitempty"`
	Dispstatus    STATECOLOR `xml:"dispstatus,omitempty" json:"dispstatus,omitempty"`
}

type STATECOLOR

type STATECOLOR string

type STATECOLOR_CODE

type STATECOLOR_CODE int

type VersionInfo

type VersionInfo struct {
	Filename    string `xml:"Filename,omitempty" json:"Filename,omitempty"`
	VersionInfo string `xml:"VersionInfo,omitempty" json:"VersionInfo,omitempty"`
	Time        string `xml:"Time,omitempty" json:"Time,omitempty"`
}

type WebService

type WebService interface {
	GetInstanceProperties(ctx context.Context) (*GetInstancePropertiesResponse, error)
	GetProcessList(ctx context.Context) (*GetProcessListResponse, error)
	GetSystemInstanceList(ctx context.Context) (*GetSystemInstanceListResponse, error)
	GetVersionInfo(ctx context.Context) (*GetVersionInfoResponse, error)
	HACheckConfig(ctx context.Context) (*HACheckConfigResponse, error)
	HAGetFailoverConfig(ctx context.Context) (*HAGetFailoverConfigResponse, error)
}

func NewWebServiceUnix

func NewWebServiceUnix(instNumber string) WebService

type WebServiceConnector

type WebServiceConnector interface {
	New(instanceNumber string) WebService
}

type WebServiceUnix

type WebServiceUnix struct{}

func (WebServiceUnix) New

func (w WebServiceUnix) New(instanceNumber string) WebService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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