Service + Storage Binded to Compute
This commit is contained in:
@@ -17,6 +17,17 @@ import (
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
// EmbeddedStorageSelection records which storage capability was activated on a
|
||||
// compute unit graph node, and which pricing options were selected for it.
|
||||
// Key in WorkflowExecution.SelectedEmbeddedStorages is the compute graph node ID.
|
||||
// A nil/absent entry means no storage was activated on that compute unit.
|
||||
type EmbeddedStorageSelection struct {
|
||||
StorageIndex int `json:"storage_index" bson:"storage_index"` // index in ComputeResourceInstance.AvailableStorages
|
||||
PartnershipIndex int `json:"partnership_index" bson:"partnership_index"` // index in the storage's partnerships
|
||||
BuyingIndex int `json:"buying_index" bson:"buying_index"`
|
||||
StrategyIndex int `json:"strategy_index" bson:"strategy_index"`
|
||||
}
|
||||
|
||||
// BookingState tracks the reservation and completion status of a single booking
|
||||
// within a workflow execution.
|
||||
// - IsBooked: true while the resource is actively reserved (set on WORKFLOW_STARTED_EVENT,
|
||||
@@ -56,6 +67,11 @@ type WorkflowExecution struct {
|
||||
SelectedPartnerships workflow.ConfigItem `json:"selected_partnerships"`
|
||||
SelectedBuyings workflow.ConfigItem `json:"selected_buyings"`
|
||||
SelectedStrategies workflow.ConfigItem `json:"selected_strategies"`
|
||||
|
||||
// SelectedEmbeddedStorages records which storage capability was activated on
|
||||
// each compute unit graph node (key = compute graph node ID).
|
||||
// Populated by oc-scheduler, consumed by oc-monitord's argo builder.
|
||||
SelectedEmbeddedStorages map[string]*EmbeddedStorageSelection `json:"selected_embedded_storages,omitempty" bson:"selected_embedded_storages,omitempty"`
|
||||
}
|
||||
|
||||
func (ri *WorkflowExecution) Extend(typ ...string) map[string][]tools.DataType {
|
||||
|
||||
Reference in New Issue
Block a user