From d35ad440fa77763ec7f49ab34a85e47e75581b61 Mon Sep 17 00:00:00 2001 From: pb Date: Fri, 27 Jun 2025 16:20:31 +0200 Subject: [PATCH 1/4] removed the 'validate:required' from PricedItem in Booking because we don't have implemented the error handling nor the feature yet --- models/booking/booking.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/booking/booking.go b/models/booking/booking.go index bdc031b..831f443 100644 --- a/models/booking/booking.go +++ b/models/booking/booking.go @@ -17,9 +17,9 @@ import ( */ type Booking struct { utils.AbstractObject // AbstractObject contains the basic fields of an object (id, name) - PricedItem pricing.PricedItemITF `json:"priced_item,omitempty" bson:"priced_item,omitempty" validate:"required"` + PricedItem pricing.PricedItemITF `json:"priced_item,omitempty" bson:"priced_item,omitempty"` // We need to add the validate:"required" tag once the pricing feature is implemented, removed to avoid handling the error - ResumeMetrics map[string]map[string]models.MetricResume `json:"resume_metrics,omitempty" bson:"resume_metrics,omitempty"` + ResumeMetrics map[string]map[string]models.MetricResume `json:"resume_metrics,omitempty" bson:"resume_metrics,omitempty"` ExecutionMetrics map[string][]models.MetricsSnapshot `json:"metrics,omitempty" bson:"metrics,omitempty"` ExecutionsID string `json:"executions_id,omitempty" bson:"executions_id,omitempty" validate:"required"` // ExecutionsID is the ID of the executions From 1ab2bd2153146d42bc68f07a9b315374fd8f7b4e Mon Sep 17 00:00:00 2001 From: pb Date: Fri, 27 Jun 2025 17:10:32 +0200 Subject: [PATCH 2/4] commented the condition that prevents the booking if pricing is not selected to allow dev while the feature is not implemented --- models/workflow/workflow.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/models/workflow/workflow.go b/models/workflow/workflow.go index 3cfdf2b..71f0a1f 100644 --- a/models/workflow/workflow.go +++ b/models/workflow/workflow.go @@ -240,9 +240,10 @@ func plan[T resources.ResourceInterface]( return resources, priceds, errors.New("could not load the processing resource") } priced := realItem.ConvertToPricedResource(dt, request) - if priced.SelectPricing() == nil { - return resources, priceds, errors.New("no pricings are selected... can't proceed") - } + // Should be commented once the Pricing selection feature has been implemented, related to the commit d35ad440fa77763ec7f49ab34a85e47e75581b61 + // if priced.SelectPricing() == nil { + // return resources, priceds, errors.New("no pricings are selected... can't proceed") + // } started, duration := start(realItem, priced) priced.SetLocationStart(started) if duration >= 0 { From e95d1aa53b14d69044eb4c8d4bb8ccad984efa5a Mon Sep 17 00:00:00 2001 From: pb Date: Fri, 27 Jun 2025 17:33:39 +0200 Subject: [PATCH 3/4] implemented StoreOne for orders --- models/order/order_mongo_accessor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/order/order_mongo_accessor.go b/models/order/order_mongo_accessor.go index adbf43f..29a17cc 100644 --- a/models/order/order_mongo_accessor.go +++ b/models/order/order_mongo_accessor.go @@ -36,7 +36,7 @@ func (a *orderMongoAccessor) UpdateOne(set utils.DBObject, id string) (utils.DBO } func (a *orderMongoAccessor) StoreOne(data utils.DBObject) (utils.DBObject, int, error) { - return nil, 404, errors.New("Not implemented") + return utils.GenericStoreOne(data,a) } func (a *orderMongoAccessor) CopyOne(data utils.DBObject) (utils.DBObject, int, error) { From 3971d5ca5d7bdf6b7ab1690b99f158a46c6fa870 Mon Sep 17 00:00:00 2001 From: pb Date: Mon, 30 Jun 2025 14:06:03 +0200 Subject: [PATCH 4/4] added the value to reach the minio route on datacenter --- tools/enums.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/enums.go b/tools/enums.go index 4e1736b..5bc0620 100644 --- a/tools/enums.go +++ b/tools/enums.go @@ -29,6 +29,7 @@ const ( LIVE_DATACENTER LIVE_STORAGE BILL + MINIO_SVCACC ) var NOAPI = "" @@ -44,6 +45,7 @@ var ADMIRALTY_TARGETAPI = DATACENTERAPI + "/admiralty/target" var ADMIRALTY_SECRETAPI = DATACENTERAPI + "/admiralty/secret" var ADMIRALTY_KUBECONFIGAPI = DATACENTERAPI + "/admiralty/kubeconfig" var ADMIRALTY_NODESAPI = DATACENTERAPI + "/admiralty/node" +var MINIO = DATACENTERAPI + "/minio" // Bind the standard API name to the data type var DefaultAPI = [...]string{ @@ -72,6 +74,7 @@ var DefaultAPI = [...]string{ DATACENTERAPI, DATACENTERAPI, NOAPI, + MINIO, } // Bind the standard data name to the data type @@ -101,6 +104,7 @@ var Str = [...]string{ "live_datacenter", "live_storage", "bill", + "service_account", } func FromInt(i int) string {