diff --git a/docs/components/components_specification.md b/docs/components/components_specification.md index fed8387..4bce6f5 100644 --- a/docs/components/components_specification.md +++ b/docs/components/components_specification.md @@ -21,6 +21,10 @@ For each instance of a computing component we can specify : - **arguments**, which will be passed to the entrypoint - **Environment variables** +The fields **input** and **output** list the different links coming in and out of the computing components. +> [!] This is redundant with the Links object that we create when parsing the XML in oc-scheduler, might be better to remove them if proved redundant + + ## Datacenter A datacenter is identified by its **DC acronym** which is a very short form of its name. diff --git a/docs/identified_problems.md b/docs/identified_problems.md new file mode 100644 index 0000000..36081e1 --- /dev/null +++ b/docs/identified_problems.md @@ -0,0 +1,5 @@ +# Code + +- [ ] In most of the components from 'models/' we have a method to add input and output to the model, however this linking of components is already done in oc-schedule when parsing the MxGraph. We need to determine if adding relations between components inside the objects themself is necessary. + - When running in debug mode with a breakpoint inside the first line of computing.addLink it is only called once +- [ ] \ No newline at end of file diff --git a/models/computing.go b/models/computing.go index fb0aac2..d3c58e1 100644 --- a/models/computing.go +++ b/models/computing.go @@ -27,30 +27,30 @@ type RepositoryModel struct { } type ComputingNEWModel struct { - Description string `json:"description,omitempty" required:"true"` Name string `json:"name,omitempty" required:"true" validate:"required" description:"Name of the computing"` + Description string `json:"description,omitempty" required:"true"` ShortDescription string `json:"short_description,omitempty" required:"true" validate:"required"` Logo string `json:"logo,omitempty" required:"true" validate:"required"` - Type string `json:"type,omitempty" required:"true"` + // Type string `json:"type,omitempty" required:"true"` Owner string `json:"owner,omitempty"` License string `json:"license,omitempty"` Price uint `json:"price,omitempty"` ExecutionRequirements ExecutionRequirementsModel `json:"execution_requirements,omitempty"` - Dinputs []string `json:"dinputs,omitempty"` - Doutputs []string `json:"doutputs,omitempty"` + // Dinputs []string `json:"dinputs,omitempty"` // Possibly redundant with Links object in oc-schedule + // Doutputs []string `json:"doutputs,omitempty"` // Possibly redundant with Links objects in oc-schedule Image string `json:"image,omitempty"` Command string `json:"command,omitempty"` Arguments []string `json:"arguments,omitempty"` Environment []string `json:"environment,omitempty"` - Ports []string `json:"ports,omitempty"` + // Ports []string `json:"ports,omitempty"` - CustomDeployment string `json:"custom_deployment,omitempty"` + // CustomDeployment string `json:"custom_deployment,omitempty"` - Repository RepositoryModel `json:"repository,omitempty"` + // Repository RepositoryModel `json:"repository,omitempty"` } type ComputingModel struct { diff --git a/models/data.go b/models/data.go index eb36d25..a0db949 100644 --- a/models/data.go +++ b/models/data.go @@ -11,15 +11,15 @@ import ( // TODO: review why swagger are not using the metadata when we do herarchy type DataNEWModel struct { Name string `json:"name,omitempty" required:"true" validate:"required" description:"Name of the data"` + Description string `json:"description" required:"true" validate:"required"` ShortDescription string `json:"short_description" required:"true" validate:"required"` Logo string `json:"logo" required:"true" validate:"required"` - Description string `json:"description" required:"true" validate:"required"` + // Dtype string `json:"dtype"` Type string `json:"type,omitempty" required:"true" validate:"required" description:"Define type of data" example:"file"` Example string `json:"example" required:"true" validate:"required" description:"base64 encoded data"` - Location string `json:"location" required:"true" validate:"required"` - Dtype string `json:"dtype"` Protocol []string `json:"protocol"` //TODO Enum type + Location string `json:"location" required:"true" validate:"required"` } type DataModel struct { diff --git a/models/datacenter.go b/models/datacenter.go index 3a66515..fdc1db5 100644 --- a/models/datacenter.go +++ b/models/datacenter.go @@ -32,9 +32,9 @@ type DatacenterGpuModel struct { type DatacenterNEWModel struct { Name string `json:"name" required:"true"` - Type string `json:"type,omitempty" required:"true"` + // Type string `json:"type,omitempty" required:"true"` Acronym string `json:"acronym" required:"true" description:"id of the DC"` - Hosts []string `json:"hosts" required:"true" description:"list of host:port"` + // Hosts []string `json:"hosts" required:"true" description:"list of host:port"` Description string `json:"description" required:"true"` ShortDescription string `json:"short_description" required:"true" validate:"required"` Logo string `json:"logo" required:"true" validate:"required"` diff --git a/models/storage.go b/models/storage.go index 1f04624..397cd82 100644 --- a/models/storage.go +++ b/models/storage.go @@ -12,9 +12,10 @@ type StorageNEWModel struct { Description string `json:"description" required:"true"` ShortDescription string `json:"short_description" required:"true" validate:"required"` Logo string `json:"logo" required:"true" validate:"required"` - Type string `json:"type,omitempty" required:"true"` + // Type string `json:"type,omitempty" required:"true"` DCacronym string `json:"DCacronym" required:"true" description:"Unique ID of the DC where it is the storage"` + URL string `json:"URL"` Size uint `json:"size" required:"true"` Encryption bool `json:"encryption" ` diff --git a/scripts/demo.json b/scripts/demo.json index f6cccdb..d59a324 100644 --- a/scripts/demo.json +++ b/scripts/demo.json @@ -255,7 +255,8 @@ "throughput": "r:200,w:150", "bookingPrice": 60, "inputs": [], - "outputs": [] + "outputs": [], + "URL" : "" }, { "name": "IRT local file storage", @@ -270,7 +271,8 @@ "throughput": "r:300,w:350", "bookingPrice": 90, "inputs": [], - "outputs": [] + "outputs": [], + "URL" : "" }, { "name": "Mosquito server", @@ -285,7 +287,8 @@ "throughput": "r:300,w:350", "bookingPrice": 90, "inputs": [], - "outputs": [] + "outputs": [], + "URL" : "" } ] },