diff options
author | Devananda van der Veen <devananda.vdv@gmail.com> | 2013-02-13 18:25:29 -0800 |
---|---|---|
committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2013-02-20 11:52:00 -0800 |
commit | ab9f8667c63d901f37d1662c5204fb2938be44fe (patch) | |
tree | 278b174219dfaf1925cbf494610227c7c6c48b66 /nova/exception.py | |
parent | f3b673a19f393b06d023981dc8e3bc77e961b9e3 (diff) | |
download | nova-ab9f8667c63d901f37d1662c5204fb2938be44fe.tar.gz nova-ab9f8667c63d901f37d1662c5204fb2938be44fe.tar.xz nova-ab9f8667c63d901f37d1662c5204fb2938be44fe.zip |
Identify baremetal nodes by UUID.
- add a new 'uuid' column to 'bm_nodes' table
- provide a new db/api method for accessing nodes by their uuid
- return this to Nova as the nodename / hypervisor_hostname
In this way, a baremetal node is uniquely identified to the user,
whether they use a per-compute baremetal db or global baremetal db.
It will also allow for an instance to be booted on a specific baremetal
node using a means akin to the current force-hosts (TBD in later patch).
Also, creates two new Exceptions to disambiguate between
InstanceNotFound and NodeNotFound / NodeNotFoundByUUID.
Change-Id: I81105a201588fdef31cffabdae260bb43017bcd1
Diffstat (limited to 'nova/exception.py')
-rw-r--r-- | nova/exception.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py index ada55ba32..454a053a0 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -1050,6 +1050,14 @@ class InstanceNotFound(NotFound): message = _("Instance %(instance_id)s could not be found.") +class NodeNotFound(NotFound): + message = _("Node %(node_id)s could not be found.") + + +class NodeNotFoundByUUID(NotFound): + message = _("Node with UUID %(node_uuid)s could not be found.") + + class MarkerNotFound(NotFound): message = _("Marker %(marker)s could not be found.") |