summaryrefslogtreecommitdiffstats
path: root/nova/objects
diff options
context:
space:
mode:
authorDan Smith <danms@us.ibm.com>2013-05-22 17:30:36 -0700
committerDan Smith <danms@us.ibm.com>2013-06-07 11:43:37 -0700
commit6fcf4133b49cfefa77151937dec4db097a85c349 (patch)
tree07436a73fb8f9ff6b154ffde59aaba52c3078072 /nova/objects
parente86d5b063bbb741d411bf4b50b5cc8a9829960db (diff)
downloadnova-6fcf4133b49cfefa77151937dec4db097a85c349.tar.gz
nova-6fcf4133b49cfefa77151937dec4db097a85c349.tar.xz
nova-6fcf4133b49cfefa77151937dec4db097a85c349.zip
Use Instance Objects for Start/Stop
This patch makes the start and stop operations use the Instance object instead of passing SQLA-derived dicts over RPC. Until something more sophisticated is needed (and developed), it also adds a nova.object.register_all() function which just triggers imports of all the object models so that they are registered. When adding a new object type, that register function should be updated appropriately. Related to bp/unified-object-model Change-Id: I3c8d9cba07d34097a279502062906de802d19d1f
Diffstat (limited to 'nova/objects')
-rw-r--r--nova/objects/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/objects/__init__.py b/nova/objects/__init__.py
index 67f4db51a..e39f0154c 100644
--- a/nova/objects/__init__.py
+++ b/nova/objects/__init__.py
@@ -11,3 +11,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+
+
+def register_all():
+ # NOTE(danms): You must make sure your object gets imported in this
+ # function in order for it to be registered by services that may
+ # need to receive it via RPC.
+ __import__('nova.objects.instance')