From 61b04cfd38654b13edfcaff253008eb06274247e Mon Sep 17 00:00:00 2001 From: zshi Date: Thu, 12 Oct 2017 15:14:58 +0800 Subject: BIOS Settings: Add DB API Adds the following methods to DB API: * create_bios_setting_list * update_bios_setting_list * delete_bios_setting * get_bios_setting * get_bios_setting_list Adds two exceptions: * BIOSSettingAlreadyExists * BIOSSettingNotFound This patch also deletes BIOS setting records associated with a node when it's destroyed. Co-Authored-By: Yolanda Robla Mota Change-Id: Ibbca0a30baaae1e19e015b4dddbbac0189ff80ba Story: #1712032 --- ironic/common/exception.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ironic/common/exception.py') diff --git a/ironic/common/exception.py b/ironic/common/exception.py index 19cd98204..f33cac85f 100644 --- a/ironic/common/exception.py +++ b/ironic/common/exception.py @@ -775,3 +775,11 @@ class InstanceUnrescueFailure(IronicException): class XClarityError(IronicException): _msg_fmt = _("XClarity exception occurred. Error: %(error)s") + + +class BIOSSettingAlreadyExists(Conflict): + _msg_fmt = _('A BIOS setting %(name)s for node %(node)s already exists.') + + +class BIOSSettingNotFound(NotFound): + _msg_fmt = _("Node %(node)s doesn't have a BIOS setting '%(name)s'") -- cgit v1.2.1