Unified Object Model

Registered by Dan Smith

We need a unified notion of an object which can be passed over RPC while retaining rich functionality, localized (de-)serialization code, and lazy-loading of additional data directly from the DB or over RPC. This will provide the basis for versioned object support in the future.

Blueprint information

Status:
Complete
Approver:
Russell Bryant
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
Dan Smith
Definition:
Approved
Series goal:
Accepted for havana
Implementation:
Implemented
Milestone target:
milestone icon 2013.2
Started by
Chris Behrens
Completed by
Dan Smith

Related branches

Sprints

Whiteboard

More detailed proposal for the whole thing here:

https://wiki.openstack.org/wiki/ObjectProposal

Gerrit topic: https://review.openstack.org/#q,topic:bp/unified-object-model,n,z

Addressed by: https://review.openstack.org/27456
    Add base object model

Addressed by: https://review.openstack.org/30158
    Add instance object

Addressed by: https://review.openstack.org/30188
    Make a few places tolerant of sys_meta being a dict

Addressed by: https://review.openstack.org/30192
    WIP: Use Instance Objects for Start/Stop

Addressed by: https://review.openstack.org/30802
    WIP: Lists of instance objects

Addressed by: https://review.openstack.org/30817
    WIP: Use InstanceList object for init_host

Addressed by: https://review.openstack.org/31067
    Make pylint ignore nova/objects/

Addressed by: https://review.openstack.org/31120
    Add fake_instance.py

Addressed by: https://review.openstack.org/31121
    Make xenapi/host use instance objects for _uuid_find

Addressed by: https://review.openstack.org/31122
    Make xenapi use Instance object for host_maintenance_mode()

Addressed by: https://review.openstack.org/31123
    Remove unused methods from VirtAPI

Addressed by: https://review.openstack.org/31124
    Make sync_power_state routines use InstanceList

Addressed by: https://review.openstack.org/31528
    Make instance object tolerate isotime strings

Addressed by: https://review.openstack.org/31659
    Make object actions pass positional arguments

Addressed by: https://review.openstack.org/31713
    Make the datetime utility function coerce to UTC

Addressed by: https://review.openstack.org/31732
    Add Instance.info_cache

Addressed by: https://review.openstack.org/31842
    Add base mixin class for object lists

Addressed by: https://review.openstack.org/31862
    Fix sys_meta access in prep for instance object

Addressed by: https://review.openstack.org/31893
    Add BlockDeviceMapping objects

Addressed by: https://review.openstack.org/31897
    Add deleted flag to NovaObject base

Addressed by: https://review.openstack.org/31991
    Fix obj_load() in NovaObject base class

Addressed by: https://review.openstack.org/32921
    Unregister test objects when finished

Addressed by: https://review.openstack.org/33359
    Make NovaObject support extra attributes in items()

Addressed by: https://review.openstack.org/33371
    Remove straggling use of all-kwarg object methods

Addressed by: https://review.openstack.org/33372
    Use InstanceList for _heal_instance_info_cache()

Addressed by: https://review.openstack.org/33373
    Remove a layer of nesting in _poll_unconfirmed_resizes()

Addressed by: https://review.openstack.org/33374
    Make _poll_unconfirmed_resizes() use objects

Addressed by: https://review.openstack.org/33491
    Fix importing InstanceInfoCache during register_all()

Addressed by: https://review.openstack.org/33492
    Fix orphaned instance from get_by_uuid() and _from_db_object()

Addressed by: https://review.openstack.org/33493
    Fix serialization of iterable types

Addressed by: https://review.openstack.org/33494
    Add basic SecurityGroup model

Addressed by: https://review.openstack.org/33495
    Add Instance.security_groups

Addressed by: https://review.openstack.org/33108
    Fill context on objects in lists

Gerrit topic: https://review.openstack.org/#q,topic:bug/1192004,n,z

Gerrit topic: https://review.openstack.org/#q,topic:bug/1192012,n,z

Addressed by: https://review.openstack.org/33623
    Fix metadata access in prep for instance objects

Addressed by: https://review.openstack.org/33701
    Make InstanceList filter non-column extra attributes

Addressed by: https://review.openstack.org/33702
    WIP Make instance show and index use objects

Addressed by: https://review.openstack.org/33551
    Add basic InstanceFault model

Addressed by: https://review.openstack.org/33552
    Add Instance.fault

Addressed by: https://review.openstack.org/33871
    Make NovaObject support the 'in' operator

Addressed by: https://review.openstack.org/33872
    Fix instance object's use of a db query method parameter

Addressed by: https://review.openstack.org/33873
    Make info_cache not break network_info

Addressed by: https://review.openstack.org/33874
    Prepare fake instance stubs for objects

Addressed by: https://review.openstack.org/33875
    Make fake_network tolerant of objects

Addressed by: https://review.openstack.org/33935
    Refactored compute/servers.py:update() to properly use API

Gerrit topic: https://review.openstack.org/#q,topic:bug/1192011,n,z

Addressed by: https://review.openstack.org/34000
    Refactor db.security_group_get() instance join behavior

Addressed by: https://review.openstack.org/34276
    Add obj_to_dict() to recursively convert objects to dicts

Addressed by: https://review.openstack.org/34277
    DNM Make to_primitive() serialize netaddr.IPAddress

Addressed by: https://review.openstack.org/34584
    Add update() method to NovaObject for dict compatibility

Gerrit topic: https://review.openstack.org/#q,topic:bp/compute-api-objects,n,z

Addressed by: https://review.openstack.org/34912
    Add Instance.get_by_id() query method

Addressed by: https://review.openstack.org/35200
    Break out compute API unit tests

Addressed by: https://review.openstack.org/35220
    Break out Compute Manager unit tests

Addressed by: https://review.openstack.org/35223
    Convert pause/unpause to use objects

Addressed by: https://review.openstack.org/35224
    Convert suspend/resume to use objects

Gerrit topic: https://review.openstack.org/#q,topic:bug/1196301,n,z

Addressed by: https://review.openstack.org/35563
    Add object (de)serialization support to cells

Addressed by: https://review.openstack.org/35422
    Add cells get_cell_type() method

Addressed by: https://review.openstack.org/35575
    Add expected_vm_state to Instance.save()

Addressed by: https://review.openstack.org/35577
    Prep Instance.save() to handle cells DB updates

Addressed by: https://review.openstack.org/36358
    Unit-ify compute_api delete tests

Addressed by: https://review.openstack.org/36359
    Fix default argument values on get_all_by_filters()

Addressed by: https://review.openstack.org/36489
    Add _set_instance_obj_error_state() to compute manager

Addressed by: https://review.openstack.org/36360
    Make notifications properly string-convert instance datetimes

Addressed by: https://review.openstack.org/35051
    Update v3 servers API with objects changes

Addressed by: https://review.openstack.org/36361
    Make db/api strip timezones for datetimes

Addressed by: https://review.openstack.org/35067
    Make compute_api.reboot() use objects

Addressed by: https://review.openstack.org/36362
    Fix object_compat decorator for non-kwargs

Addressed by: https://review.openstack.org/36363
    WIP Make delete/soft_delete use objects

Addressed by: https://review.openstack.org/34913
    Make compute_api.get() use objects natively

Addressed by: https://review.openstack.org/36718
    Make InfoCache.network_info be the network model

Addressed by: https://review.openstack.org/36542
    Better start/stop handling for cells

Addressed by: https://review.openstack.org/35041
    Make servers::update() use Instance.save() to do the work

Addressed by: https://review.openstack.org/35578
    Make admin API state resets use Instance.save()

Addressed by: https://review.openstack.org/36583
    Move special cells logic for start/stop

Addressed by: https://review.openstack.org/36745
    Convert network API to use InfoCache object

Addressed by: https://review.openstack.org/37128
    Make Instance object properly update *metadata

Addressed by: https://review.openstack.org/37157
    Fix Instance object handling of implied fields

Addressed by: https://review.openstack.org/37355
    Fix shelve's use of system_metadata

Addressed by: https://review.openstack.org/37521
    Make shelve pass old-world instance object to conductor

Addressed by: https://review.openstack.org/38206
    Fix change detection logic in conductor

Addressed by: https://review.openstack.org/39965
    Enhance object inheritance

Addressed by: https://review.openstack.org/39985
    Split NovaObject into 2 base classes

Addressed by: https://review.openstack.org/39986
    Add new-world Quota object

Addressed by: https://review.openstack.org/39987
    Make _provision_instances() use Quotas obj

Addressed by: https://review.openstack.org/39988
    Switch delete to use new-world Quotas object

Addressed by: https://review.openstack.org/42262
    Pass objects for revert and confirm resizes

Addressed by: https://review.openstack.org/41769
    Make compute_api use Migration object

Addressed by: https://review.openstack.org/41573
    Make compute_api migrate/resize paths use instance objects

Addressed by: https://review.openstack.org/42331
    Add scheduler utils unit tests

Addressed by: https://review.openstack.org/42332
    Fixup some non-unity-ness to conductor tests

Addressed by: https://review.openstack.org/42249
    Unit-ify the compute API resize tests

Addressed by: https://review.openstack.org/42250
    Convert admin_actions ext tests to unit tests

Addressed by: https://review.openstack.org/41254
    Add Migration object

Addressed by: https://review.openstack.org/42999
    Deprecate conductor migration_create()

Addressed by: https://review.openstack.org/43018
    Move prep_resize paths to use objects

Addressed by: https://review.openstack.org/42340
    Make compute_api use objects for lock/unlock

Addressed by: https://review.openstack.org/42731
    Fix prep_resize() stale system_metadata issue

Addressed by: https://review.openstack.org/42665
    Make backup and snapshot use objects

Addressed by: https://review.openstack.org/42346
    Convert reset_network to use instance object

Addressed by: https://review.openstack.org/42673
    Make inject_network_info use objects

Addressed by: https://review.openstack.org/43031
    Change resize_instance paths to use objects

Addressed by: https://review.openstack.org/43080
    Change finish_resize paths to use objects

Addressed by: https://review.openstack.org/43106
    Convert _poll_unconfirmed_resizes to use Migration object

Addressed by: https://review.openstack.org/43107
    Change finish_revert_resize paths to use objects

Addressed by: https://review.openstack.org/43108
    Deprecate conductor migration_get()

Addressed by: https://review.openstack.org/43192
    Fix instance metadata access in xenapi

Gerrit topic: https://review.openstack.org/#q,topic:bug/1226759,n,z

Addressed by: https://review.openstack.org/63305
    Fixes auto comfirmation failed because db access

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.