WorkflowResource

This commit is contained in:
mr
2026-02-24 13:29:00 +01:00
parent 0f6aa1fe78
commit d18b031a29
4 changed files with 9 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ type ResourceInterface interface {
ClearEnv() utils.DBObject
SetAllowedInstances(request *tools.APIRequest, instance_id ...string)
AddInstances(instance ResourceInstanceITF)
GetSelectedInstance(index *int) ResourceInstanceITF
}
type ResourceInstanceITF interface {

View File

@@ -55,6 +55,10 @@ func (w *NativeTool) ConvertToPricedResource(t tools.DataType, selectedInstance
}, nil
}
func (r *NativeTool) GetSelectedInstance(selected *int) ResourceInstanceITF {
return nil
}
func InitNative() {
for _, kind := range []native_tools.NativeToolsEnum{native_tools.WORKFLOW_EVENT} {
newNative := &NativeTool{}

View File

@@ -37,6 +37,10 @@ func (w *WorkflowResource) SetAllowedInstances(request *tools.APIRequest, ids ..
/* EMPTY */
}
func (r *WorkflowResource) GetSelectedInstance(selected *int) ResourceInstanceITF {
return nil
}
func (w *WorkflowResource) ConvertToPricedResource(t tools.DataType, selectedInstance *int, selectedPartnership *int, selectedBuyingStrategy *int, selectedStrategy *int, selectedBookingModeIndex *int, request *tools.APIRequest) (pricing.PricedItemITF, error) {
return &PricedResource{
Name: w.Name,

View File

@@ -616,16 +616,6 @@ func (k *KubernetesService) CreateSecret(context context.Context, minioId string
return nil
}
// Returns a concatenation of the peerId and namespace in order for
// kubernetes ressources to have a unique name, under 63 characters
// and yet identify which peer they are created for
func getConcatenatedName(peerId string, namespace string) string {
s := strings.Split(namespace, "-")[:2]
n := s[0] + "-" + s[1]
return peerId + "-" + n
}
// ============== ADMIRALTY ==============
// Returns a concatenation of the peerId and namespace in order for
// kubernetes ressources to have a unique name, under 63 characters