SelectedEmbeddedStorages
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"cloud.o-forge.io/core/oc-lib/models/booking"
|
||||
"cloud.o-forge.io/core/oc-lib/models/common/enum"
|
||||
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
|
||||
"cloud.o-forge.io/core/oc-lib/models/resources"
|
||||
"cloud.o-forge.io/core/oc-lib/models/resources/purchase_resource"
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
"cloud.o-forge.io/core/oc-lib/models/workflow"
|
||||
@@ -17,17 +18,6 @@ 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,
|
||||
@@ -71,7 +61,7 @@ type WorkflowExecution struct {
|
||||
// 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"`
|
||||
SelectedEmbeddedStorages map[string]*resources.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