WorkflowResource
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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{}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user