Skip to content

instance events #43

@matt-beanland

Description

@matt-beanland

As per #8 we want to support TMF Service and Resource events. These will be ash resources which will be related to the firing instance, and chained. They will render as json in TMF format.

We'll want a domain API to return the most recent event/s.

Eventually we will want an action which checks if an event should be fired, and if so fires it. It will do this using the most recently fired event, compared with the current state of the instance. Need to think about how this relates to the instance version. The version should be incremented if the json rendering of the instance changes, we could do by storing hash and/or serialised json.

Initially we can just create a method to fire an event and call it on create/state/value change actions.

TMF events must have:
eventId (we can use a uuid, would be good to use uuid7 since sortable in time order
eventTime
eventType
event

Where event is service: {}, resource: {}

eventType for service:
serviceCreateEvent
serviceStateChangeEvent
serviceAttributeValueChangeEvent
serviceDeleteEvent

where any state/status change causes serviceStateChangeEvent

resource is same except prefixed by resource, not service.

..DeleteEvent just includes the id/href, not the entire (ex) service/resource.

NaaS has serviceOperatingStateChangeEvent and serviceProcessStatusChangeEvent but these are non-standard.
We will make serviceCreateEvent on initial create, not on state change to target state.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions