WorkflowResource
This commit is contained in:
@@ -18,6 +18,7 @@ type ResourceInterface interface {
|
|||||||
ClearEnv() utils.DBObject
|
ClearEnv() utils.DBObject
|
||||||
SetAllowedInstances(request *tools.APIRequest, instance_id ...string)
|
SetAllowedInstances(request *tools.APIRequest, instance_id ...string)
|
||||||
AddInstances(instance ResourceInstanceITF)
|
AddInstances(instance ResourceInstanceITF)
|
||||||
|
GetSelectedInstance(index *int) ResourceInstanceITF
|
||||||
}
|
}
|
||||||
|
|
||||||
type ResourceInstanceITF interface {
|
type ResourceInstanceITF interface {
|
||||||
|
|||||||
@@ -55,6 +55,10 @@ func (w *NativeTool) ConvertToPricedResource(t tools.DataType, selectedInstance
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *NativeTool) GetSelectedInstance(selected *int) ResourceInstanceITF {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func InitNative() {
|
func InitNative() {
|
||||||
for _, kind := range []native_tools.NativeToolsEnum{native_tools.WORKFLOW_EVENT} {
|
for _, kind := range []native_tools.NativeToolsEnum{native_tools.WORKFLOW_EVENT} {
|
||||||
newNative := &NativeTool{}
|
newNative := &NativeTool{}
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ func (w *WorkflowResource) SetAllowedInstances(request *tools.APIRequest, ids ..
|
|||||||
/* EMPTY */
|
/* 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) {
|
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{
|
return &PricedResource{
|
||||||
Name: w.Name,
|
Name: w.Name,
|
||||||
|
|||||||
@@ -616,16 +616,6 @@ func (k *KubernetesService) CreateSecret(context context.Context, minioId string
|
|||||||
return nil
|
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 ==============
|
// ============== ADMIRALTY ==============
|
||||||
// Returns a concatenation of the peerId and namespace in order for
|
// Returns a concatenation of the peerId and namespace in order for
|
||||||
// kubernetes ressources to have a unique name, under 63 characters
|
// kubernetes ressources to have a unique name, under 63 characters
|
||||||
|
|||||||
Reference in New Issue
Block a user