Documentation
¶
Index ¶
- Constants
- Variables
- func Convert(i interface{}) interface{}
- func ConvertMapKey(m map[string]interface{}) map[string]interface{}
- func MapStructure(m map[string]interface{}, i interface{}) error
- func NewRunner() *runner
- func ReadLines(in bytes.Buffer) [][]byte
- func RetrieveDesiredComputeNodes(clusterDescription *ClusterDescription) (nodesNb int, err error)
- type AccountRole
- type AccountRoleList
- type AccountsInfo
- type CLDNamedResourceService
- type Client
- type CloudRegion
- type ClusterDescription
- type ClusterService
- type GroupUser
- type GroupUserList
- type IDP
- type IDPList
- type IDPService
- type Ingress
- type IngressList
- type IngressService
- type KubeletConfigDescription
- type KubeletConfigService
- type MachinePool
- type MachinePoolDescription
- type MachinePoolList
- type MachinePoolService
- type MachinePoolUpgrade
- type MachinePoolUpgradeDescription
- type MachinePoolUpgradeList
- type MachinePoolUpgradeService
- type NetworkVerifierService
- type NodePool
- type NodePoolDescription
- type NodePoolList
- type OCMResourceService
- type OCMRole
- type OCMRoleList
- type OIDCConfig
- type OIDCConfigList
- type OpenShiftVersion
- type OpenShiftVersionList
- func (vl *OpenShiftVersionList) FilterVersionsLowerThan(version string) (nvl *OpenShiftVersionList, err error)
- func (vl *OpenShiftVersionList) FilterVersionsSameMajorAndEqualOrLowerThanMinor(major int64, minor int64, strict bool) (nvl *OpenShiftVersionList, err error)
- func (vl *OpenShiftVersionList) FindNearestBackwardMinorVersion(version string, minorSub int64, strict bool) (vs *OpenShiftVersion, err error)
- func (vl *OpenShiftVersionList) Len() int
- func (vl *OpenShiftVersionList) Sort(reverse bool) (nvl *OpenShiftVersionList, err error)
- type Parser
- type ResourcesCleaner
- type ResourcesService
- type TuningConfig
- type TuningConfigDescription
- type TuningConfigList
- type TuningConfigService
- type UserRole
- type UserRoleList
- type UserService
- type VersionService
Constants ¶
const VersionChannelGroupNightly = "nightly"
const VersionChannelGroupStable = "stable"
Variables ¶
var RoleTypeSuffixMap = map[string]string{
"Installer": "Installer-Role",
"Support": "Support-Role",
"Control plane": "ControlPlane-Role",
"Worker": "Worker-Role",
}
Functions ¶
func ConvertMapKey ¶
func MapStructure ¶
mapStructure will map the map to the address of the structre *i
func RetrieveDesiredComputeNodes ¶
func RetrieveDesiredComputeNodes(clusterDescription *ClusterDescription) (nodesNb int, err error)
Types ¶
type AccountRole ¶
type AccountRoleList ¶
type AccountRoleList struct {
AccountRoleList []*AccountRole `json:"AccountRoleList,omitempty"`
}
func (AccountRoleList) AccountRole ¶
func (arl AccountRoleList) AccountRole(arn string) (accountRole *AccountRole)
Get specified account role by the arn
func (AccountRoleList) AccountRoles ¶
func (arl AccountRoleList) AccountRoles(prefix string) (accountRoles []*AccountRole)
Get specified account roles by prefix
func (AccountRoleList) InstallerRole ¶
func (arl AccountRoleList) InstallerRole(prefix string, hostedcp bool) (accountRole *AccountRole)
type AccountsInfo ¶
type AccountsInfo struct {
AWSArn string `json:"AWS ARN,omitempty"`
AWSAccountID string `json:"AWS Account ID,omitempty"`
AWSDefaultRegion string `json:"AWS Default Region,omitempty"`
OCMApi string `json:"OCM API,omitempty"`
OCMAccountEmail string `json:"OCM Account Email,omitempty"`
OCMAccountID string `json:"OCM Account ID,omitempty"`
OCMAccountName string `json:"OCM Account Name,omitempty"`
OCMAccountUsername string `json:"OCM Account Username,omitempty"`
OCMOrganizationExternalID string `json:"OCM Organization External ID,omitempty"`
OCMOrganizationID string `json:"OCM Organization ID,omitempty"`
OCMOrganizationName string `json:"OCM Organization Name,omitempty"`
}
type CLDNamedResourceService ¶
type CLDNamedResourceService interface {
ResourcesCleaner
List(clusterID string) (bytes.Buffer, error)
Describe(clusterID string, name string) (bytes.Buffer, error)
Create(clusterID string, name string, flags ...string) (bytes.Buffer, error)
Edit(clusterID string, name string, flags ...string) (bytes.Buffer, error)
Delete(clusterID string, name string) (bytes.Buffer, error)
}
type Client ¶
type Client struct {
// Clients
Runner *runner
Parser *Parser
// services
// Keep in alphabetical order
Cluster ClusterService
IDP IDPService
Ingress IngressService
KubeletConfig KubeletConfigService
MachinePool MachinePoolService
MachinePoolUpgrade MachinePoolUpgradeService
NetworkVerifier NetworkVerifierService
OCMResource OCMResourceService
TuningConfig TuningConfigService
User UserService
Version VersionService
}
func NewSensitiveClient ¶
func NewSensitiveClient() *Client
func (*Client) CleanResources ¶
type CloudRegion ¶
type CloudRegion struct {
ID string `json:"ID,omitempty"`
Name string `json:"NAME,omitempty"`
MultiAZSupported string `json:"MULTI-AZ SUPPORT,omitempty"`
HypershiftSupported string `json:"HOSTED-CP SUPPORT,omitempty"`
}
Struct for the 'rosa list region' output
type ClusterDescription ¶
type ClusterDescription struct {
Name string `yaml:"Name,omitempty"`
ID string `yaml:"ID,omitempty"`
ExternalID string `yaml:"External ID,omitempty"`
OpenshiftVersion string `yaml:"OpenShift Version,omitempty"`
ChannelGroup string `yaml:"Channel Group,omitempty"`
DNS string `yaml:"DNS,omitempty"`
AWSAccount string `yaml:"AWS Account,omitempty"`
AWSBillingAccount string `yaml:"AWS Billing Account,omitempty"`
APIURL string `yaml:"API URL,omitempty"`
ConsoleURL string `yaml:"Console URL,omitempty"`
Region string `yaml:"Region,omitempty"`
MultiAZ string `yaml:"Multi-AZ,omitempty"`
State string `yaml:"State,omitempty"`
Private string `yaml:"Private,omitempty"`
Created string `yaml:"Created,omitempty"`
DetailsPage string `yaml:"Details Page,omitempty"`
ControlPlane string `yaml:"Control Plane,omitempty"`
ScheduledUpgrade string `yaml:"Scheduled Upgrade,omitempty"`
InfraID string `yaml:"Infra ID,omitempty"`
AdditionalTrustBundle string `yaml:"Additional trust bundle,omitempty"`
Ec2MetadataHttpTokens string `yaml:"Ec2 Metadata Http Tokens,omitempty"`
Availability []map[string]string `yaml:"Availability,omitempty"`
Nodes []map[string]interface{} `yaml:"Nodes,omitempty"`
Network []map[string]string `yaml:"Network,omitempty"`
Proxy []map[string]string `yaml:"Proxy,omitempty"`
STSRoleArn string `yaml:"Role (STS) ARN,omitempty"`
// STSExternalID string `yaml:"STS External ID,omitempty"`
SupportRoleARN string `yaml:"Support Role ARN,omitempty"`
OperatorIAMRoles []string `yaml:"Operator IAM Roles,omitempty"`
InstanceIAMRoles []map[string]string `yaml:"Instance IAM Roles,omitempty"`
ManagedPolicies string `yaml:"Managed Policies,omitempty"`
UserWorkloadMonitoring string `yaml:"User Workload Monitoring,omitempty"`
FIPSMod string `yaml:"FIPS mode,omitempty"`
OIDCEndpointURL string `yaml:"OIDC Endpoint URL,omitempty"`
PrivateHostedZone []map[string]string `yaml:"Private Hosted Zone,omitempty"`
AuditLogForwarding string `yaml:"Audit Log Forwarding,omitempty"`
ProvisioningErrorMessage string `yaml:"Provisioning Error Message,omitempty"`
ProvisioningErrorCode string `yaml:"Provisioning Error Code,omitempty"`
LimitedSupport []map[string]string `yaml:"Limited Support,omitempty"`
AuditLogRoleARN string `yaml:"Audit Log Role ARN,omitempty"`
FailedInflightChecks string `yaml:"Failed Inflight Checks,omitempty"`
}
Struct for the 'rosa describe cluster' output
type ClusterService ¶
type ClusterService interface {
ResourcesCleaner
DescribeCluster(clusterID string) (bytes.Buffer, error)
ReflectClusterDescription(result bytes.Buffer) (*ClusterDescription, error)
DescribeClusterAndReflect(clusterID string) (*ClusterDescription, error)
List() (bytes.Buffer, error)
CreateDryRun(clusterName string, flags ...string) (bytes.Buffer, error)
EditCluster(clusterID string, flags ...string) (bytes.Buffer, error)
DeleteUpgrade(flags ...string) (bytes.Buffer, error)
IsHostedCPCluster(clusterID string) (bool, error)
IsSTSCluster(clusterID string) (bool, error)
IsPrivateCluster(clusterID string) (bool, error)
IsUsingReusableOIDCConfig(clusterID string) (bool, error)
GetClusterVersion(clusterID string) (config.Version, error)
IsBYOVPCCluster(clusterID string) (bool, error)
}
func NewClusterService ¶
func NewClusterService(client *Client) ClusterService
type GroupUserList ¶
type GroupUserList struct {
GroupUsers []GroupUser `json:"GroupUsers,omitempty"`
}
type IDP ¶
type IDP struct {
Name string `json:"NAME,omitempty"`
Type string `json:"TYPE,omitempty"`
AuthURL string `json:"AUTH URL,omitempty"`
}
Struct for the 'rosa list idp' output
type IDPList ¶
type IDPList struct {
IDPs []IDP `json:"IDPs,omitempty"`
}
type IDPService ¶
type IDPService interface {
ResourcesCleaner
ReflectIDPList(result bytes.Buffer) (idplist IDPList, err error)
CreateIDP(clusterID string, idpName string, idflags ...string) (bytes.Buffer, error)
ListIDP(clusterID string) (IDPList, bytes.Buffer, error)
DeleteIDP(clusterID string, idpName string) (bytes.Buffer, error)
}
func NewIDPService ¶
func NewIDPService(client *Client) IDPService
type Ingress ¶
type Ingress struct {
ID string `yaml:"ID,omitempty"`
ApplicationRouter string `yaml:"APPLICATION ROUTER,omitempty"`
Private string `yaml:"PRIVATE,omitempty"`
Default string `yaml:"DEFAULT,omitempty"`
RouteSelectors string `yaml:"ROUTE SELECTORS,omitempty"`
LBType string `yaml:"LB-TYPE,omitempty"`
}
type IngressList ¶
type IngressList struct {
Ingresses []Ingress `json:"Ingresses,omitempty"`
}
Struct for the 'rosa describe ingress' output
func (IngressList) Ingress ¶
func (inl IngressList) Ingress(id string) (in *Ingress)
Get specified ingress by ingress id
type IngressService ¶
type IngressService interface {
ResourcesCleaner
EditIngress(clusterID string, ingressID string, flags ...string) (bytes.Buffer, error)
ListIngress(clusterID string, flags ...string) (bytes.Buffer, error)
DeleteIngress(clusterID string, ingressID string) (bytes.Buffer, error)
ReflectIngressList(result bytes.Buffer) (res *IngressList, err error)
}
func NewIngressService ¶
func NewIngressService(client *Client) IngressService
type KubeletConfigDescription ¶
type KubeletConfigDescription struct {
PodPidsLimit int `yaml:"Pod Pids Limit,omitempty"`
}
Struct for the 'rosa describe kubeletconfig' output
type KubeletConfigService ¶
type KubeletConfigService interface {
ResourcesCleaner
DescribeKubeletConfig(clusterID string) (bytes.Buffer, error)
ReflectKubeletConfigDescription(result bytes.Buffer) *KubeletConfigDescription
EditKubeletConfig(clusterID string, flags ...string) (bytes.Buffer, error)
DeleteKubeletConfig(clusterID string, flags ...string) (bytes.Buffer, error)
CreateKubeletConfig(clusterID string, flags ...string) (bytes.Buffer, error)
}
func NewKubeletConfigService ¶
func NewKubeletConfigService(client *Client) KubeletConfigService
type MachinePool ¶
type MachinePool struct {
ID string `json:"ID,omitempty"`
AutoScaling string `json:"AUTOSCALING,omitempty"`
Replicas string `json:"REPLICAS,omitempty"`
InstanceType string `json:"INSTANCE TYPE,omitempty"`
Labels string `json:"LABELS,omitempty"`
Taints string `json:"TAINTS,omitempty"`
AvalaiblityZones string `json:"AVAILABILITY ZONES,omitempty"`
Subnets string `json:"SUBNETS,omitempty"`
SpotInstances string `json:"SPOT INSTANCES,omitempty"`
DiskSize string `json:"DISK SIZE,omitempty"`
}
Struct for the 'rosa list machinepool' output for non-hosted-cp clusters
type MachinePoolDescription ¶
type MachinePoolDescription struct {
ID string `yaml:"ID,omitempty"`
ClusterID string `yaml:"Cluster ID,omitempty"`
AutoScaling string `yaml:"Autoscaling,omitempty"`
Replicas string `yaml:"Replicas,omitempty"`
InstanceType string `yaml:"Instance type,omitempty"`
Labels string `yaml:"Labels,omitempty"`
Taints string `yaml:"Taints,omitempty"`
AvailablityZones string `yaml:"Availability zones,omitempty"`
Subnets string `yaml:"Subnets,omitempty"`
SpotInstances string `yaml:"Spot instances,omitempty"`
DiskSize string `yaml:"Disk size,omitempty"`
SecurityGroupIDs string `yaml:"Security Group IDs,omitempty"`
}
Struct for the 'rosa list machinepool' output for non-hosted-cp clusters
type MachinePoolList ¶
type MachinePoolList struct {
MachinePools []MachinePool `json:"MachinePools,omitempty"`
}
func (MachinePoolList) Machinepool ¶
func (mpl MachinePoolList) Machinepool(id string) (mp *MachinePool)
Get specified machinepool by machinepool id
type MachinePoolService ¶
type MachinePoolService interface {
ResourcesCleaner
ListMachinePool(clusterID string) (bytes.Buffer, error)
DescribeMachinePool(clusterID string, mpID string) (bytes.Buffer, error)
CreateMachinePool(clusterID string, name string, flags ...string) (bytes.Buffer, error)
EditMachinePool(clusterID string, machinePoolName string, flags ...string) (bytes.Buffer, error)
DeleteMachinePool(clusterID string, machinePoolName string) (bytes.Buffer, error)
ReflectMachinePoolList(result bytes.Buffer) (mpl MachinePoolList, err error)
ReflectMachinePoolDescription(result bytes.Buffer) (*MachinePoolDescription, error)
ReflectNodePoolList(result bytes.Buffer) (*NodePoolList, error)
ListAndReflectNodePools(clusterID string) (*NodePoolList, error)
ReflectNodePoolDescription(result bytes.Buffer) (npd *NodePoolDescription, err error)
DescribeAndReflectNodePool(clusterID string, name string) (*NodePoolDescription, error)
RetrieveHelpForCreate() (bytes.Buffer, error)
}
func NewMachinePoolService ¶
func NewMachinePoolService(client *Client) MachinePoolService
type MachinePoolUpgrade ¶
type MachinePoolUpgradeDescription ¶
type MachinePoolUpgradeDescription struct {
ID string `yaml:"ID,omitempty"`
ClusterID string `yaml:"Cluster ID,omitempty"`
ScheduleType string `yaml:"Schedule Type,omitempty"`
NextRun string `yaml:"Next Run,omitempty"`
UpgradeState string `yaml:"Upgrade State,omitempty"`
Version string `yaml:"Version,omitempty"`
}
Struct for the 'rosa describe upgrades' output for non-hosted-cp clusters
type MachinePoolUpgradeList ¶
type MachinePoolUpgradeList struct {
MachinePoolUpgrades []MachinePoolUpgrade `json:"MachinePoolUpgrades,omitempty"`
}
type MachinePoolUpgradeService ¶
type MachinePoolUpgradeService interface {
ResourcesCleaner
ListUpgrades(clusterID string, mpID string) (bytes.Buffer, error)
ReflectUpgradesList(result bytes.Buffer) (*MachinePoolUpgradeList, error)
ListAndReflectUpgrades(clusterID string, mpID string) (*MachinePoolUpgradeList, error)
// Create a manual upgrade. `version`, `scheduleDate` and `scheduleTime` are optional. `schedule*` if provided MUST be both at the same time provided.
CreateManualUpgrade(clusterID string, mpID string, version string, scheduleDate string, scheduleTime string) (bytes.Buffer, error)
// Create an automatic upgrade based on the given cron.
CreateAutomaticUpgrade(clusterID string, mpID string, scheduleCron string) (bytes.Buffer, error)
DescribeUpgrade(clusterID string, mpID string) (bytes.Buffer, error)
ReflectUpgradeDescription(result bytes.Buffer) (*MachinePoolUpgradeDescription, error)
DescribeAndReflectUpgrade(clusterID string, mpID string) (*MachinePoolUpgradeDescription, error)
DeleteUpgrade(clusterID string, mpID string) (bytes.Buffer, error)
RetrieveHelpForCreate() (bytes.Buffer, error)
RetrieveHelpForDescribe() (bytes.Buffer, error)
RetrieveHelpForList() (bytes.Buffer, error)
RetrieveHelpForDelete() (bytes.Buffer, error)
}
func NewMachinePoolUpgradeService ¶
func NewMachinePoolUpgradeService(client *Client) MachinePoolUpgradeService
type NetworkVerifierService ¶
type NetworkVerifierService interface {
ResourcesCleaner
CreateNetworkVerifierWithCluster(clusterID string, flags ...string) (bytes.Buffer, error)
CreateNetworkVerifierWithSubnets(flags ...string) (bytes.Buffer, error)
GetNetworkVerifierStatus(flags ...string) (bytes.Buffer, error)
}
func NewNetworkVerifierService ¶
func NewNetworkVerifierService(client *Client) NetworkVerifierService
type NodePool ¶
type NodePool struct {
ID string `json:"ID,omitempty"`
AutoScaling string `json:"AUTOSCALING,omitempty"`
Replicas string `json:"REPLICAS,omitempty"`
InstanceType string `json:"INSTANCE TYPE,omitempty"`
Labels string `json:"LABELS,omitempty"`
Taints string `json:"TAINTS,omitempty"`
AvalaiblityZones string `json:"AVAILABILITY ZONES,omitempty"`
Subnet string `json:"SUBNET,omitempty"`
Version string `json:"VERSION,omitempty"`
AutoRepair string `json:"AUTOREPAIR,omitempty"`
TuningConfigs string `json:"TUNING CONFIGS,omitempty"`
Message string `json:"MESSAGE,omitempty"`
}
Struct for the 'rosa list machinepool' output for hosted-cp clusters
type NodePoolDescription ¶
type NodePoolDescription struct {
ID string `yaml:"ID,omitempty"`
ClusterID string `yaml:"Cluster ID,omitempty"`
AutoScaling string `yaml:"Autoscaling,omitempty"`
DesiredReplicas string `yaml:"Desired replicas,omitempty"`
CurrentReplicas string `yaml:"Current replicas,omitempty"`
InstanceType string `yaml:"Instance type,omitempty"`
Labels string `yaml:"Labels,omitempty"`
Taints string `yaml:"Taints,omitempty"`
AvalaiblityZones string `yaml:"Availability zone,omitempty"`
Subnet string `yaml:"Subnet,omitempty"`
Version string `yaml:"Version,omitempty"`
AutoRepair string `yaml:"Autorepair,omitempty"`
TuningConfigs string `yaml:"Tuning configs,omitempty"`
Message string `yaml:"Message,omitempty"`
ScheduledUpgrade string `yaml:"Scheduled upgrade,omitempty"`
AdditionalSecurityGroupIDs string `yaml:"Additional security group IDs,omitempty"`
NodeDrainGracePeriod string `yaml:"Node drain grace period,omitempty"`
}
type NodePoolList ¶
type NodePoolList struct {
NodePools []NodePool `json:"NodePools,omitempty"`
}
func (NodePoolList) Nodepool ¶
func (npl NodePoolList) Nodepool(id string) (np *NodePool)
Get specified nodepool by nodepool id
type OCMResourceService ¶
type OCMResourceService interface {
ResourcesCleaner
ListRegion(flags ...string) ([]*CloudRegion, bytes.Buffer, error)
ReflectRegionList(result bytes.Buffer) (regions []*CloudRegion, err error)
ListUserRole() (UserRoleList, bytes.Buffer, error)
DeleteUserRole(flags ...string) (bytes.Buffer, error)
LinkUserRole(flags ...string) (bytes.Buffer, error)
UnlinkUserRole(flags ...string) (bytes.Buffer, error)
CreateUserRole(flags ...string) (bytes.Buffer, error)
ReflectUserRoleList(result bytes.Buffer) (url UserRoleList, err error)
Whoami() (bytes.Buffer, error)
ReflectAccountsInfo(result bytes.Buffer) *AccountsInfo
CreateAccountRole(flags ...string) (bytes.Buffer, error)
ReflectAccountRoleList(result bytes.Buffer) (arl AccountRoleList, err error)
DeleteAccountRole(flags ...string) (bytes.Buffer, error)
ListAccountRole() (AccountRoleList, bytes.Buffer, error)
UpgradeAccountRole(flags ...string) (bytes.Buffer, error)
ListOCMRole() (OCMRoleList, bytes.Buffer, error)
DeleteOCMRole(flags ...string) (bytes.Buffer, error)
LinkOCMRole(flags ...string) (bytes.Buffer, error)
UnlinkOCMRole(flags ...string) (bytes.Buffer, error)
CreateOCMRole(flags ...string) (bytes.Buffer, error)
ReflectOCMRoleList(result bytes.Buffer) (orl OCMRoleList, err error)
ListOIDCConfig() (OIDCConfigList, bytes.Buffer, error)
DeleteOIDCConfig(flags ...string) (bytes.Buffer, error)
CreateOIDCConfig(flags ...string) (bytes.Buffer, error)
ReflectOIDCConfigList(result bytes.Buffer) (oidclist OIDCConfigList, err error)
GetOIDCIdFromList(providerURL string) (string, error)
DeleteOperatorRoles(flags ...string) (bytes.Buffer, error)
CreateOperatorRoles(flags ...string) (bytes.Buffer, error)
CreateOIDCProvider(flags ...string) (bytes.Buffer, error)
}
func NewOCMResourceService ¶
func NewOCMResourceService(client *Client) OCMResourceService
type OCMRole ¶
type OCMRole struct {
RoleName string `json:"ROLE NAME,omitempty"`
RoleArn string `json:"ROLE ARN,omitempty"`
Linded string `json:"LINKED,omitempty"`
Admin string `json:"ADMIN,omitempty"`
AwsManaged string `json:"AWS MANAGED,omitempty"`
}
Struct for the 'rosa list ocm-role' output
type OCMRoleList ¶
type OCMRoleList struct {
OCMRoleList []OCMRole `json:"OCMRoleList,omitempty"`
}
func (OCMRoleList) FindLinkedOCMRole ¶
func (url OCMRoleList) FindLinkedOCMRole() (userRoles OCMRole)
Get the ocm-role which is linked to org
type OIDCConfig ¶
type OIDCConfigList ¶
type OIDCConfigList struct {
OIDCConfigList []OIDCConfig `json:"OIDCConfigList,omitempty"`
}
func (OIDCConfigList) OIDCConfig ¶
func (oidcl OIDCConfigList) OIDCConfig(id string) (oidc OIDCConfig)
Get specified oidc-config by oidc-config-id
type OpenShiftVersion ¶
type OpenShiftVersionList ¶
type OpenShiftVersionList struct {
OpenShiftVersions []*OpenShiftVersion `json:"OpenShiftVersions,omitempty"`
}
func (*OpenShiftVersionList) FilterVersionsLowerThan ¶
func (vl *OpenShiftVersionList) FilterVersionsLowerThan(version string) (nvl *OpenShiftVersionList, err error)
FilterVersionsByMajorMinor filter the version list for all lower versions than the given one
func (*OpenShiftVersionList) FilterVersionsSameMajorAndEqualOrLowerThanMinor ¶
func (vl *OpenShiftVersionList) FilterVersionsSameMajorAndEqualOrLowerThanMinor(major int64, minor int64, strict bool) (nvl *OpenShiftVersionList, err error)
FilterVersionsByMajorMinor filter the version list for all major/minor corresponding and returns a new `OpenShiftVersionList` struct `strict` will find only the `Major.minor` ones
func (*OpenShiftVersionList) FindNearestBackwardMinorVersion ¶
func (vl *OpenShiftVersionList) FindNearestBackwardMinorVersion(version string, minorSub int64, strict bool) (vs *OpenShiftVersion, err error)
This function will find the nearest lower OCP version which version is under `Major.{minor-sub}`. `strict` will find only the `Major.{minor-sub}` ones
func (*OpenShiftVersionList) Len ¶
func (vl *OpenShiftVersionList) Len() int
func (*OpenShiftVersionList) Sort ¶
func (vl *OpenShiftVersionList) Sort(reverse bool) (nvl *OpenShiftVersionList, err error)
Sort sort the version list from lower to higher (or reverse)
type ResourcesCleaner ¶
type ResourcesService ¶
type ResourcesService struct {
// contains filtered or unexported fields
}
type TuningConfig ¶
type TuningConfigDescription ¶
type TuningConfigDescription struct {
Name string `yaml:"Name,omitempty"`
ID string `yaml:"ID,omitempty"`
Spec string `yaml:"Spec,omitempty"`
}
Struct for the 'rosa describe cluster' output
type TuningConfigList ¶
type TuningConfigList struct {
TuningConfigs []TuningConfig `json:"TuningConfigs,omitempty"`
}
type TuningConfigService ¶
type TuningConfigService interface {
ResourcesCleaner
CreateTuningConfig(clusterID string, tcName string, specContent string, flags ...string) (bytes.Buffer, error)
EditTuningConfig(clusterID string, tcName string, flags ...string) (bytes.Buffer, error)
DeleteTuningConfig(clusterID string, tcName string) (bytes.Buffer, error)
ListTuningConfigs(clusterID string) (bytes.Buffer, error)
ReflectTuningConfigList(result bytes.Buffer) (mpl *TuningConfigList, err error)
ListTuningConfigsAndReflect(clusterID string) (*TuningConfigList, error)
DescribeTuningConfig(clusterID string, tcID string) (bytes.Buffer, error)
ReflectTuningConfigDescription(result bytes.Buffer) (npd *TuningConfigDescription, err error)
DescribeTuningConfigAndReflect(clusterID string, tcID string) (*TuningConfigDescription, error)
}
func NewTuningConfigService ¶
func NewTuningConfigService(client *Client) TuningConfigService
type UserRole ¶
type UserRole struct {
RoleName string `json:"ROLE NAME,omitempty"`
RoleArn string `json:"ROLE ARN,omitempty"`
Linded string `json:"LINKED,omitempty"`
}
Struct for the 'rosa list user-role' output
type UserRoleList ¶
type UserRoleList struct {
UserRoleList []UserRole `json:"UserRoleList,omitempty"`
}
type UserService ¶
type UserService interface {
ResourcesCleaner
ListUsers(clusterID string) (GroupUserList, bytes.Buffer, error)
ReflectUsersList(result bytes.Buffer) (gul GroupUserList, err error)
RevokeUser(clusterID string, role string, user string, flags ...string) (bytes.Buffer, error)
GrantUser(clusterID string, role string, user string, flags ...string) (bytes.Buffer, error)
CreateAdmin(clusterID string) (bytes.Buffer, error)
DescribeAdmin(clusterID string) (bytes.Buffer, error)
DeleteAdmin(clusterID string) (bytes.Buffer, error)
}
func NewUserService ¶
func NewUserService(client *Client) UserService
type VersionService ¶
type VersionService interface {
ResourcesCleaner
ReflectVersions(result bytes.Buffer) (*OpenShiftVersionList, error)
ListVersions(channelGroup string, hostedCP bool, flags ...string) (bytes.Buffer, error)
ListAndReflectVersions(channelGroup string, hostedCP bool, flags ...string) (*OpenShiftVersionList, error)
}
func NewVersionService ¶
func NewVersionService(client *Client) VersionService