-
Notifications
You must be signed in to change notification settings - Fork 24
rsrc attributes 3.3 design
Implement or update (when noted) resource attributes for the following:
- Images (update)
- Instances
- Snapshots
- Volumes
Resource attributes are already implemented for Images. As part of this feature we should clean up this implementation.
Messages, Query/SOAP bindings and services will need some updates (no major changes anticipated)
The required attribute operations (some of Describe, Modify, Reset) will have placement as follows:
Type | Manager |
---|---|
Image | com.eucalyptus.images.ImageManager (existing methods updated) |
Instance | com.eucalyptus.vm.VmControl (has stubs) |
Snapshot | com.eucalyptus.blockstorage.SnapshotManager (has stubs) |
Volume | com.eucalyptus.blockstorage.VolumeManager |
NOTE: Snapshot and volume operations depend on inclusion of other features (Snaphost launch permission, product code propagation)
A client tool is required for testing SOAP bindings (older AWS SDK?)
IAM / resource ownership (account) dictate which attributes can be read or updated. Users in the eucalyptus account can access all resource attributes.
Read of attributes can be implemented using a Map:
Map<String,AttributeGetter<R,V>>
Where R is the response message type and V is the resource value.
For each attribute there will be an AttributeGetter in the map that knows how to populate the value.
AttributeGetter - get( R, V ) // Populate R from V
Update of attributes can be implemented with a collection of setters:
Collection<AttributeSetter<R,V>>
Where R is the request message, and V is the resource value.
Each setter would be matched against the requests message, only one setting is allowed to match (only one attribute update per request).
The matched setter is then invoked to (perhaps partially) update the attribute value.
AttributeSetter - bool match( R ) - bool set( R, V ) // Set value on V from R
The success of the setter is reflected in the success of the overall operation.
Reset of attributes can be implemented using a Map:
Map<String,AttributeResetter<V>>
Where V is the resource value.
For each attribute there will be an AttributeResetter in the map that knows how to reset the value.
AttributeResetter - bool reset( V ) // Populate R from V
TODO or just use a Predicate for this.
The success of the setter is reflected in the success of the overall operation.
For instances, some attributes may only be updated when the instance is stopped. When this precondition is violated the correct error should be returned.
Restrictions on instance attributes that can be modifed when running mean that it is not required to keep a (readonly) copy of the instance configuration. Instance attributes that can be modified when running are:
- disableApiTermination
- instanceInitiatedShutdownBehavior
- blockDeviceMapping delete on terminate setting (multiple)
IAM: operations access controlled via IAM policies
No upgrade impact noted.
No specific packaging requirements.
No specific documentation items noted.
No specific security concerns are noted for this design.
Testing should cover SOAP and Query APIs
tag:rls-3.3 tag:rsrc-attributes- Contact Info
- email: architecture@eucalyptus.com
- IRC: #eucalyptus-devel (freenode)
- Eucalyptus Links