sip/pkg/services/errors.go
Drew Walters fe4c9a7221 Add Redfish support to Jump Host service
This change brings Redfish support to the Jump Host service, enabling
sub-cluster operators to reboot virtual machines in their sub-cluster.
With a Secret containing sub-cluster host information (e.g. BMC
addresses, BMC usernames, BMC password) and a ConfigMap containing a
wrapper script for DMTF's redfishtool, a user in a sub-cluster's Jump
Pod can manage their hosts by executing /sip/scripts/reboot [CMD].

Signed-off-by: Drew Walters <andrew.walters@att.com>
Change-Id: Iff71ad2287cb095ebe92445a4a09771697efa5ee
2021-02-23 14:37:25 +00:00

40 lines
1.1 KiB
Go

/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package services
import (
"fmt"
airshipv1 "sipcluster/pkg/api/v1"
)
// ErrAuthTypeNotSupported is returned when wrong AuthType is provided
type ErrInfraServiceNotSupported struct {
Service airshipv1.SIPClusterService
}
func (e ErrInfraServiceNotSupported) Error() string {
return fmt.Sprintf("invalid Infrastructure Service: %v", e.Service)
}
// ErrMalformedRedfishAddress occurs when a Redfish address does not meet the expected format.
type ErrMalformedRedfishAddress struct {
Address string
}
func (e ErrMalformedRedfishAddress) Error() string {
return fmt.Sprintf("invalid Redfish BMC address %s", e.Address)
}