Compute Manager uses Objects (Juno Work)

Registered by Dan Smith

Compute manager should use objects instead of conductor API and raw dicts wherever possible. Continuation of the work started in icehouse:

https://blueprints.launchpad.net/nova/+spec/compute-manager-objects

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
High
Drafter:
Dan Smith
Direction:
Approved
Assignee:
Dan Smith
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
John Garbutt
Completed by
John Garbutt

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/86072
    Propose Compute Manager Objects Support

Addressed by: https://review.openstack.org/86112
    Make detach_volume() use objects

Dan, I guess the plan is for Juno-1 at first? Or will it likely take longer? --johnthetubaguy

Addressed by: https://review.openstack.org/86942
    Finish _delete_instance() object conversion

Addressed by: https://review.openstack.org/86966
    Make _get_compute_info() use objects

Addressed by: https://review.openstack.org/86994
    Add with_compute_node to service_get()

Addressed by: https://review.openstack.org/86995
    Add get_by_service() method to ComputeNodeList object

Addressed by: https://review.openstack.org/86996
    Make update_available_resource() use objects

Addressed by: https://review.openstack.org/87007
    Convert poll_rescued_instances() periodic task to objects

Addressed by: https://review.openstack.org/87016
    Make aggregate host operations use Aggregate object

Addressed by: https://review.openstack.org/87019
    Return to using network_api directly for migrations

Addressed by: https://review.openstack.org/87022
    Convert instance_usage_audit() periodic task to objects

Addressed by: https://review.openstack.org/87041
    Deprecate aggregate_host_* operations in conductor

Addressed by: https://review.openstack.org/87042
    Deprecate network_migrate_instance_* from conductor

Addressed by: https://review.openstack.org/87044
    Deprecate instance_destroy() from conductor

Gerrit topic: https://review.openstack.org/#q,topic:rpc-drop-old-compat,n,z

Addressed by: https://review.openstack.org/87046
    Remove instance_info_cache_delete() from conductor

Addressed by: https://review.openstack.org/87049
    Deprecate compute_unrescue() from conductor

Addressed by: https://review.openstack.org/87051
    Deprecate instance_get_all_by_filters() from conductor

Addressed by: https://review.openstack.org/87052
    Deprecate instance_get_active_by_window_joined() from conductor

Addressed by: https://review.openstack.org/87094
    Make _is_multi_host() use objects

Addressed by: https://review.openstack.org/84254
    Drop support for conductor 1.x rpc interface

Addressed by: https://review.openstack.org/85244
    Enable live migration use instance object

Adding to Juno-1 for now, to unblock this work --johnthetubaguy 28th April 2014

Addressed by: https://review.openstack.org/90801
    Make live_migration use instance objects

Addressed by: https://review.openstack.org/92826
    Remove conductor usage from compute.utils.EventReporter

Addressed by: https://review.openstack.org/92827
    Deprecate action_event_*() from conductor

Addressed by: https://review.openstack.org/84430
    Drop support for scheduler 2.x rpc interface

Addressed by: https://review.openstack.org/65038
    Add Instance Object add_security_group() and remove_security_group()

Addressed by: https://review.openstack.org/94546
    Make security_group add_to_instance and remove_from_instance use object

Addressed by: https://review.openstack.org/77592
    Fix default want_result value for event_finish_with_failure

Addressed by: https://review.openstack.org/76427
    Enable InstanceActionEventObject testcase

Gerrit topic: https://review.openstack.org/#q,topic:bp/remove-cast-to-schedule-run-instance,n,z

Addressed by: https://review.openstack.org/94663
    Use objects through the run_instance() path

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

Addressed by: https://review.openstack.org/95056
    WIP: Treat instance objects as objects in rescue API flow

Addressed by: https://review.openstack.org/95076
    Add Instance Object add_security_group() and remove_security_group()

Addressed by: https://review.openstack.org/95152
    Treat instance objects as objects in unrescue API flow

Gerrit topic: https://review.openstack.org/#q,topic:instance-exists,n,z

Addressed by: https://review.openstack.org/96296
    Refactor test_rescue_unrescue into compute api/manager unit tests

Addressed by: https://review.openstack.org/96585
    Make SecurityGroupAPI use Instance object

Addressed by: https://review.openstack.org/96586
    Make metadata password routines use Instance object

Addressed by: https://review.openstack.org/96587
    Deprecate instance_get_by_uuid() from conductor

Addressed by: https://review.openstack.org/96739
    Make Evacuate API use Instance objects.

Gerrit topic: https://review.openstack.org/#q,topic:admin-pass-use-objects,n,z

Addressed by: https://review.openstack.org/97573
    WIP: Treat instance objects like objects in set_admin_password flow

Addressed by: https://review.openstack.org/97617
    Move set_admin_password tests from test_compute.py to api/mgr modules

Addressed by: https://review.openstack.org/97619
    Use _set_instance_obj_error_state in compute manager set_admin_password

Addressed by: https://review.openstack.org/97670
    Pass instance to _error_out_instance_on_exception context

Addressed by: https://review.openstack.org/98457
    Pass instance to _set_instance_error_state

Addressed by: https://review.openstack.org/98499
    Make get_console_output() use objects

Addressed by: https://review.openstack.org/98563
    Pass instance to _reschedule rather than instance_uuid

Addressed by: https://review.openstack.org/98600
    Remove unused code from test_compute_cells

Addressed by: https://review.openstack.org/98601
    Remove bdms from run_instance RPC conductor call

Addressed by: https://review.openstack.org/98602
    Initialize objects field in ObjectsListBase class

Addressed by: https://review.openstack.org/98603
    Add append and extend method to ObjectListBase

Addressed by: https://review.openstack.org/98604
    Improve BlockDeviceMapping object cells awareness

Addressed by: https://review.openstack.org/98605
    Make cells rpc bdm_update_or_create_at_top use BDM objects

Addressed by: https://review.openstack.org/98606
    Add 'anon' kwarg to FakeDbBlockDeviceDict class

Addressed by: https://review.openstack.org/98607
    Make NovaObjectSerializer work with dicts

Addressed by: https://review.openstack.org/98608
    Add update_or_create flag to BDM objects create()

Addressed by: https://review.openstack.org/98609
    Make compute API create() use BDM objects

Addressed by: https://review.openstack.org/98780
    Make BDM dict __init__ behave more like a dict

Addressed by: https://review.openstack.org/100011
    Make check_instance_shared_storage() use objects

Addressed by: https://review.openstack.org/100028
    Make remove_volume_connection() use objects

Addressed by: https://review.openstack.org/100153
    Remove duplicate code in Objects create() function

Addressed by: https://review.openstack.org/100382
    Add bulk create/destroy functionality to FloatingIP

Addressed by: https://review.openstack.org/100383
    Completely object-ify the floating_ips_bulk V2 extension

Addressed by: https://review.openstack.org/100615
    Move the fixed_ips APIv2 extension to use objects

Addressed by: https://review.openstack.org/100645
    Object-ify server_password APIv2 extension

Addressed by: https://review.openstack.org/100649
    Object-ify server_password APIv3 extension

Addressed by: https://review.openstack.org/100705
    move the cloudpipe_update API v2 extension to use objects

Addressed by: https://review.openstack.org/100959
    Fix Flavor object extra_specs and projects handling

Addressed by: https://review.openstack.org/100960
    Object-ify APIv2 flavorextraspecs extension

Addressed by: https://review.openstack.org/100973
    Object-ify APIv3 flavor_extraspecs extension

Addressed by: https://review.openstack.org/100998
    Don't replace instance object with dict in _allocate_network()

Addressed by: https://review.openstack.org/101028
    Pass instance object into _shutdown_instance()

Addressed by: https://review.openstack.org/101579
    Object-ify APIv3 availability_zone extension

Addressed by: https://review.openstack.org/101960
    Add Agent object

Addressed by: https://review.openstack.org/101961
    Object-ify xenapi driver use of VirtAPI.agent_build_get_by_triple()

Addressed by: https://review.openstack.org/101962
    Deprecate and remove agent_build_get_by_triple()

Addressed by: https://review.openstack.org/101994
    Object-ify APIv2 agents extension

Addressed by: https://review.openstack.org/101995
    Object-ify APIv3 agents extension

Addressed by: https://review.openstack.org/102006
    object-ify API v2 availability_zone extension

Addressed by: https://review.openstack.org/102359
    Pass instance to _instance_update rather than uuid

Addressed by: https://review.openstack.org/99832
    Add missing create() method on SecurityGroup object

Addressed by: https://review.openstack.org/102446
    add aggregated metadata gets to Aggregate object

Addressed by: https://review.openstack.org/102447
    object-ify availability_zones

Addressed by: https://review.openstack.org/99920
    Add bandwidth usage object

Addressed by: https://review.openstack.org/102459
    Added serialization datetime.datetime

Addressed by: https://review.openstack.org/102092
    Fix update agent return agent_id with string for os-agents v3

Addressed by: https://review.openstack.org/102095
    Fix agent_id with string type in API samples files for os-agents v2

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

Gerrit topic: https://review.openstack.org/#q,topic:bp/juno-slaveification,n,z

Addressed by: https://review.openstack.org/103238
    Fix run_instance() rpc method to pass instance object

Addressed by: https://review.openstack.org/103248
    Update compute rpcapi tests to use instance object instead of dict

Addressed by: https://review.openstack.org/103585
    Be explicit about objects in _shutdown_instance()

Addressed by: https://review.openstack.org/99826
    Add missing create() method on SecurityGroupRule object

Addressed by: https://review.openstack.org/107143
    Add quota limit create/update methods to Quotas object

Addressed by: https://review.openstack.org/107144
    Make quotas APIv2 extension use Quotas object for create/update

Addressed by: https://review.openstack.org/107781
    Make quotas APIv3 extension use Quotas object for create/update

Addressed by: https://review.openstack.org/109106
    Convert network/api.py get calls to use Network object

Addressed by: https://review.openstack.org/109114
    Convert network/api.py fixedip calls to use FixedIP object

Addressed by: https://review.openstack.org/109340
    Make network/api.py use Network object for associations

Addressed by: https://review.openstack.org/109395
    Correct some IPAddress DB interaction in objects

Addressed by: https://review.openstack.org/109396
    Convert network/api.py to use FloatingIP object

Addressed by: https://review.openstack.org/113029
    object-ify flavors

Addressed by: https://review.openstack.org/113337
    Convert last use of direct database instance fetching from network api

Addressed by: https://review.openstack.org/113338
    Convert network/api.py uses of vif database functions to objects

Addressed by: https://review.openstack.org/113740
    Treat instance like an object in _start_building

Addressed by: https://review.openstack.org/113741
    Treat instance like an object in _prebuild_instance

Addressed by: https://review.openstack.org/113756
    Treat instance like object in _validate_instance_group_policy

Addressed by: https://review.openstack.org/113945
    nova-network: treat instance like object in allocate_for_instance

Addressed by: https://review.openstack.org/113979
    neutronv2: treat instance like object in allocate_for_instance

Addressed by: https://review.openstack.org/114007
    Treat instance like an object in _default_block_device_names

Addressed by: https://review.openstack.org/114008
    Remove _instance_update usage in _default_block_device_names

Addressed by: https://review.openstack.org/114032
    Treat instance like an object in _build_instance

Addressed by: https://review.openstack.org/114033
    Remove _instance_update usage in _build_instance

Addressed by: https://review.openstack.org/114314
    neutronv2: treat instance as object in deallocate_for_instance

Addressed by: https://review.openstack.org/115027
    Objectify last uses of direct db access in network/floating_ips

Addressed by: https://review.openstack.org/115043
    Objectify association in neutronapi

Addressed by: https://review.openstack.org/115334
    Make neutronapi get_all() return NetworkList of Network objects

Addressed by: https://review.openstack.org/115749
    Make neutronapi get_floating*() methods return objects

Addressed by: https://review.openstack.org/115801
    Give the FloatingIP object an external_id field, because neutron

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.