mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Log error when podman client cannot be initialized Signed-off-by: Parthvi Vala <pvala@redhat.com> * Return error if platform is podman Signed-off-by: Parthvi Vala <pvala@redhat.com> * Refactor errors related to cluster/podman inaccessible Signed-off-by: Parthvi Vala <pvala@redhat.com> * Fix integration test Signed-off-by: Parthvi Vala <pvala@redhat.com> * fix validation failure * rm3l's review * Attempt at fixing CI failures Signed-off-by: Parthvi Vala <pvala@redhat.com> * Log error when unable to find podman client in NewPodmanCli Signed-off-by: Parthvi Vala <pvala@redhat.com> * Update pkg/podman/podman.go Co-authored-by: Armel Soro <armel@rm3l.org> * Update pkg/podman/errors.go Co-authored-by: Armel Soro <armel@rm3l.org> * Fix integration test Signed-off-by: Parthvi Vala <pvala@redhat.com> --------- Signed-off-by: Parthvi Vala <pvala@redhat.com> Co-authored-by: Armel Soro <armel@rm3l.org>
33 lines
812 B
Go
33 lines
812 B
Go
package kclient
|
|
|
|
import "fmt"
|
|
|
|
// DeploymentNotFoundError returns an error if no deployment is found with the selector
|
|
type DeploymentNotFoundError struct {
|
|
Selector string
|
|
}
|
|
|
|
func (e *DeploymentNotFoundError) Error() string {
|
|
return fmt.Sprintf("deployment not found for the selector: %s", e.Selector)
|
|
}
|
|
|
|
// ServiceNotFoundError returns an error if no service is found with the selector
|
|
type ServiceNotFoundError struct {
|
|
Selector string
|
|
}
|
|
|
|
func (e *ServiceNotFoundError) Error() string {
|
|
return fmt.Sprintf("service not found for the selector %q", e.Selector)
|
|
}
|
|
|
|
type NoConnectionError struct{}
|
|
|
|
func NewNoConnectionError() NoConnectionError {
|
|
return NoConnectionError{}
|
|
}
|
|
|
|
func (e NoConnectionError) Error() string {
|
|
// could also be "cluster is non accessible"
|
|
return "unable to access the cluster"
|
|
}
|