From 6fcf4133b49cfefa77151937dec4db097a85c349 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 22 May 2013 17:30:36 -0700 Subject: 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 --- nova/objects/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'nova/objects') 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') -- cgit