Bug Fixes
- Assigner lifecycle (#168) — broadened the lifecycle states permitted to make assignments. Services may now assign from
:feasibilityChecked,:reserved,:inactive,:active, or:suspended(was:active/:inactiveonly). Resources may now assign from:installingor:operating(was:operatingonly).Assigner.assignable_state?/1exposes the policy directly.
Features
-
Diffo.Provider.Changes.Define/Relate/Assign(#170) — change modules that wrap the standard after-action patterns every Instance consumer writes. Replace the hand-writtenafter_actionbody threadingCharacteristic.update_all/Pool.update_pools/Relationship.relate_instance/Assigner.assigntogether with a one-liner:update :define do argument :characteristic_value_updates, {:array, :term} change Diffo.Provider.Changes.Define end update :relate do argument :relationships, {:array, :struct} change Diffo.Provider.Changes.Relate end update :assign_port do argument :assignment, :struct, constraints: [instance_of: Assignment] change {Diffo.Provider.Changes.Assign, pool: :ports} end
Reload happens via the resource's primary :read action, so no consumer-specific reader is needed.
- BaseCharacteristic auto-generated
:create/:updateactions (#171) —BaseCharacteristic-derived resources now get default:createand:updateactions synthesised from their public attributes.:createaccepts[:name | <public_attrs>]with:instance_id/:feature_idarguments andmanage_relationshipchanges;:updateaccepts<public_attrs>. Consumers may still declare their own actions to override the defaults. - Typed characteristics and pools in Instance JSON (#169) —
BaseInstancenow loads two new calculations (:typed_characteristics,:pool_characteristics) by default and the jason customize merges their values into theserviceCharacteristic/resourceCharacteristicarray. TypedBaseCharacteristicrecords andAssignableCharacteristicpool records that were already present in the graph are now visible at the TMF JSON surface.
Notable Changes
Diffo.Provider.Calculations.TypedCharacteristicsandDiffo.Provider.Calculations.PoolCharacteristics— new calc modules backing the JSON surfacing for #169.- Regression test added for #62 (characteristic update validation) — typed
BaseCharacteristicupdates now reject unknown fields and invalid types through Ash's standard changeset machinery.
Full Changelog: v0.4.0...v0.4.1