From accdc459ae3ebce18fc49a8ee48bf0fd97fef85a Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Mon, 13 May 2013 00:51:36 -0700 Subject: [PATCH] Update IPMI driver for new base class. Fix IPMI unit tests, and add missing power states and exceptions. --- ironic/common/exception.py | 6 +++++- ironic/tests/drivers/__init__.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ironic/tests/drivers/__init__.py diff --git a/ironic/common/exception.py b/ironic/common/exception.py index 40a56f95..6c3ad178 100644 --- a/ironic/common/exception.py +++ b/ironic/common/exception.py @@ -31,7 +31,7 @@ from oslo.config import cfg from ironic.common import safe_utils from ironic.openstack.common import excutils from ironic.openstack.common import log as logging - +from ironic.openstack.common.gettextutils import _ LOG = logging.getLogger(__name__) @@ -234,3 +234,7 @@ class NodeNotFound(NotFound): class InterfaceNotFound(NotFound): message = _("Interface %(iface)s could not be found.") + + +class PowerStateFailure(IronicException): + message = _("Failed to set node power state to %(pstate)s.") diff --git a/ironic/tests/drivers/__init__.py b/ironic/tests/drivers/__init__.py new file mode 100644 index 00000000..56425d0f --- /dev/null +++ b/ironic/tests/drivers/__init__.py @@ -0,0 +1,16 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4 + +# Copyright 2013 Hewlett-Packard Development Company, L.P. +# All Rights Reserved. +# +# 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 +# +# http://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.