Convert EC2 API to use nova objects¶
This blueprint covers updating EC2 API and related functions to use the Nova object model for all database interaction, like implementation in compute manager & nova-network now.
Currently EC2 API use original raw db APIs to fetch data from the database.
The files need to be modified include:
Data model impact¶
Four parts are included, EC2SnapshotIdMapping, EC2VolumeIdMapping, EC2S3Image, EC2InstanceIdMapping.
All of them need to be modified to make use of the object instead of using the db API directly for managing UUID to EC2 ID.
Now ‘EC2VolumeMapping’ & ‘EC2InstanceMapping’ need to co-ordinate work with russellb working on objects.
‘EC2SnapshotIdMapping’ & ‘EC2S3Image’ object need to be added and implemented in nova/objects.ec2.py later.
REST API impact¶
Other end user impact¶
Other deployer impact¶
- Primary assignee:
- Other contributors:
Add ‘EC2VolumeMapping’ object - (needs to co-ordinate work with russellb)
Add ‘EC2InstanceMapping’ object - (needs to co-ordinate work with russellb)
Add ‘EC2SnapshotIdMapping’ & ‘EC2S3Image’ object in /nova/objects/ec2.py
Use ‘EC2VolumeMapping’ in EC2 API & related tests
Use ‘EC2InstanceMapping’ in EC2 API & related tests
Use ‘EC2SnapshotIdMapping’ in EC2 API & related tests
Use ‘EC2S3Image’ in EC2 API & related tests
The original unit tests also need to rewrite using nova objects. After the modifications, all changed APIs will be verified together.