From 38fc47f5eee57d17d50efc8b957546cf2f654d6c Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 18 Nov 2024 16:27:30 +0100 Subject: [PATCH] booking debug --- controllers/booking.go | 3 ++- go.mod | 2 +- go.sum | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/booking.go b/controllers/booking.go index c48c203..cd89666 100644 --- a/controllers/booking.go +++ b/controllers/booking.go @@ -137,9 +137,10 @@ func (o *BookingController) Post() { json.Unmarshal(o.Ctx.Input.CopyBody(10000), &resp) dc_id := resp.ResourceID // delete all previous bookings + fmt.Println("Deleting previous bookings", resp) res := oclib.Search(&dbs.Filters{And: map[string][]dbs.Filter{ "workflowexecution.workflow_id": {{Operator: dbs.EQUAL.String(), Value: resp.WorkflowID}}, - "datacenter_resource_id": {{Operator: dbs.EQUAL.String(), Value: dc_id}}, + "compute_resource_id": {{Operator: dbs.EQUAL.String(), Value: dc_id}}, }}, "", oclib.LibDataEnum(oclib.BOOKING)) if res.Code != 200 { o.Data["json"] = map[string]interface{}{ diff --git a/go.mod b/go.mod index 336c05b..bc80341 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22.0 toolchain go1.22.4 require ( - cloud.o-forge.io/core/oc-lib v0.0.0-20241112141026-06c3af5d4d61 + cloud.o-forge.io/core/oc-lib v0.0.0-20241118144940-902ad0ea7144 github.com/beego/beego/v2 v2.3.1 ) diff --git a/go.sum b/go.sum index dcdfb49..9f52828 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,10 @@ cloud.o-forge.io/core/oc-lib v0.0.0-20241112134441-8a21a7c803de h1:faiwXaNsohYkP cloud.o-forge.io/core/oc-lib v0.0.0-20241112134441-8a21a7c803de/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo= cloud.o-forge.io/core/oc-lib v0.0.0-20241112141026-06c3af5d4d61 h1:wAuOQAbv2uAie1QulHvbBzlZWMUE6hQ0kjhnP4OXFqQ= cloud.o-forge.io/core/oc-lib v0.0.0-20241112141026-06c3af5d4d61/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo= +cloud.o-forge.io/core/oc-lib v0.0.0-20241114090218-14fe694fd370 h1:3o0naAyt9oXs/dG4eygreVePBmjd516PEZrW9aviJ0Q= +cloud.o-forge.io/core/oc-lib v0.0.0-20241114090218-14fe694fd370/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo= +cloud.o-forge.io/core/oc-lib v0.0.0-20241118144940-902ad0ea7144 h1:KC4lz5LzwXVz1M4eN9//sG45XqEwvMBY4NvrZw3vaE4= +cloud.o-forge.io/core/oc-lib v0.0.0-20241118144940-902ad0ea7144/go.mod h1:ya7Q+zHhaKM+XF6sAJ+avqHEVzaMnFJQih2X3TlTlGo= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/beego/beego/v2 v2.3.0 h1:iECVwzm6egw6iw6tkWrEDqXG4NQtKLQ6QBSYqlM6T/I= github.com/beego/beego/v2 v2.3.0/go.mod h1:Ob/5BJ9fIKZLd4s9ZV3o9J6odkkIyL83et+p98gyYXo=