X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=n2vc%2Fexceptions.py;h=721b1f44fbc6d389e2872e5c7b6edc0cb9fa5c57;hp=256860edfb92be5489f7f06533401e20668a3896;hb=7077e2601a209a87f7fe397b35586e7701ca759a;hpb=7ff392f6b60850ac7408f96fd42ab16b005ec2bf diff --git a/n2vc/exceptions.py b/n2vc/exceptions.py index 256860e..721b1f4 100644 --- a/n2vc/exceptions.py +++ b/n2vc/exceptions.py @@ -13,66 +13,6 @@ # limitations under the License. -class JujuCharmNotFound(Exception): - """The Charm can't be found or is not readable.""" - - -class JujuControllerFailedConnecting(Exception): - """Failed connecting to juju controller.""" - - -class JujuModelAlreadyExists(Exception): - """The model already exists.""" - - -class JujuApplicationExists(Exception): - """The Application already exists.""" - - -class JujuApplicationNotFound(Exception): - """The Application cannot be found.""" - - -class JujuLeaderUnitNotFound(Exception): - """The Application cannot be found.""" - - -class JujuActionNotFound(Exception): - """The Action cannot be found.""" - - -class JujuMachineNotFound(Exception): - """The machine cannot be found.""" - - -class JujuK8sProxycharmNotSupported(Exception): - """K8s Proxy Charms not supported in this installation.""" - - -class N2VCPrimitiveExecutionFailed(Exception): - """Something failed while attempting to execute a primitive.""" - - -class NetworkServiceDoesNotExist(Exception): - """The Network Service being acted against does not exist.""" - - -class PrimitiveDoesNotExist(Exception): - """The Primitive being executed does not exist.""" - - -class NoRouteToHost(Exception): - """There was no route to the specified host.""" - - -class AuthenticationFailed(Exception): - """The authentication for the specified user failed.""" - - -class MethodNotImplemented(Exception): - """The method is not implemented.""" - - class N2VCException(Exception): """ N2VC exception base class @@ -189,3 +129,67 @@ class K8sException(Exception): class EntityInvalidException(Exception): """Entity is not valid, the type does not match any EntityType.""" + + +class JujuInvalidK8sConfiguration(N2VCException): + """Invalid K8s configuration.""" + + +class JujuCharmNotFound(N2VCException): + """The Charm can't be found or is not readable.""" + + +class JujuControllerFailedConnecting(N2VCException): + """Failed connecting to juju controller.""" + + +class JujuModelAlreadyExists(N2VCException): + """The model already exists.""" + + +class JujuApplicationExists(N2VCException): + """The Application already exists.""" + + +class JujuApplicationNotFound(N2VCException): + """The Application cannot be found.""" + + +class JujuLeaderUnitNotFound(N2VCException): + """The Application cannot be found.""" + + +class JujuActionNotFound(N2VCException): + """The Action cannot be found.""" + + +class JujuMachineNotFound(N2VCException): + """The machine cannot be found.""" + + +class JujuK8sProxycharmNotSupported(N2VCException): + """K8s Proxy Charms not supported in this installation.""" + + +class N2VCPrimitiveExecutionFailed(N2VCException): + """Something failed while attempting to execute a primitive.""" + + +class NetworkServiceDoesNotExist(N2VCException): + """The Network Service being acted against does not exist.""" + + +class PrimitiveDoesNotExist(N2VCException): + """The Primitive being executed does not exist.""" + + +class NoRouteToHost(N2VCException): + """There was no route to the specified host.""" + + +class AuthenticationFailed(N2VCException): + """The authentication for the specified user failed.""" + + +class MethodNotImplemented(N2VCException): + """The method is not implemented."""