Complete Populate Oc-Workflow

This commit is contained in:
mr 2024-07-30 10:08:36 +02:00
parent c9410552a2
commit 4bb98f028b
6 changed files with 836 additions and 2 deletions

View File

@ -11,3 +11,6 @@ If default Swagger page is displayed instead of tyour api, change url in swagger
url: "swagger.json"
To launch demo workflow :
`./populate.sh ./demo.json`

765
demo.json Normal file
View File

@ -0,0 +1,765 @@
[
{
"api": "/oc/data/",
"content": [
{
"name": "Mundi Sentienl 3 SRAL Images",
"short_description": "Mundi Sentinels 3 SAR Altiemter image",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Mundi Sentienl 3 SRAL Images.png",
"description": "A very long description of what this data is",
"owner": "Mundi Web",
"example": "string",
"datatype": "string",
"source_url": "string"
},
{
"name": "Mundi Sentienl 3 OLCI Images",
"short_description": "Mundi Sentinels 3 Ocean and land color Altiemter image",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Mundi Sentienl 3 OLCI Images.png",
"description": "A very long description of what this data is",
"owner": "Mundi Web",
"example": "string",
"datatype": "string",
"source_url": "string"
},
{
"name": "Meteo-France forecasts",
"short_description": "Meteo France weather forecasts",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Meteo-France forecasts.png",
"description": "A very long description of what this data is",
"owner": "Meteo-France",
"example": "string",
"datatype": "string",
"source_url": "string"
},
{
"name": "Meteo-France wind archive",
"short_description": "Meteo France wind archive",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Meteo-France wind archive.png",
"description": "A very long description of what this data is",
"owner": "Meteo-France",
"example": "string",
"datatype": "string",
"source_url": "string"
}
]
},
{
"api": "/oc/processing/",
"content": [
{
"name": "SAR High points",
"short_description": "SAR Altimeter High points extraction Software",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/SAR High points.png",
"description": "A very long description of what this data is",
"owner": "IRT",
"price": 300,
"license": "GPLv2",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 1024,
"storage": 300,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"source_url": "http://www.google.com"
},
{
"name": "Flammable vegetation slicer",
"short_description": "Analyze land cover and define optimum vegetation slices to prevent fire propagation",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Flammable vegetation slicer.png",
"description": "A very long description of what this data is",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 4096,
"storage": 30000,
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"owner": "Gob.fr",
"price": 330,
"license": "Copyright",
"source_url": "http://www.google.com"
},
{
"name": "Long term fire risk mitigation planner",
"short_description": "Long term fire risk mitigation planner : provides list of actions to be performed to mitigate fire propagation",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Long term fire risk mitigation planner.png",
"description": "A very long description of what this data is",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 1024,
"disk_io": "30 MB/s",
"parallel": false,
"scaling_model": 2,
"owner": "Gob.fr",
"price": 30,
"license": "GPLv3",
"source_url": "http://www.google.com"
},
{
"name": "Fire propagation simulator",
"short_description": "Fire propagation simulator",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Fire propagation simulator.png",
"description": "A very long description of what this data is",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 8192,
"storage": 30000,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"owner": "Gob.fr",
"price": 39,
"license": "GPLv3",
"source_url": "http://www.google.com"
},
{
"name": "Environment builder",
"short_description": "build simulated environment from real environmental data and fire mitigation rules ",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Environment builder.png",
"description": "A very long description of what this data is",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 2049,
"storage": 500,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"owner": "Gob.fr",
"price": 39,
"license": "GPLv3",
"source_url": "http://www.google.com"
},
{
"name": "CURL",
"image" : "curlimages/curl:7.88.1",
"short_description": "Transfer or retrieve information from or to a server ",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/curl-logo.png",
"description": "curl is a tool for transferring data from or to a server. It supports these protocols: DICT, FILE, FTP, FTPS, GOPHER, GOPHERS, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP, WS and WSS.",
"owner": "IRT",
"price": 300,
"license": "GPLv2",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 1024,
"storage": 300,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"source_url": "http://www.google.com"
},
{
"name": "alpine",
"image" : "alpine:3.7",
"short_description": "A minimal Docker image ",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/alpine-logo.png",
"description": "Alpine Linux is a Linux distribution built around musl libc and BusyBox. The image is only 5 MB in size and has access to a package repository that is much more complete than other BusyBox based images. This makes Alpine Linux a great image base for utilities and even production applications",
"owner": "IRT",
"price": 300,
"license": "GPLv2",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 1024,
"storage": 300,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"source_url": "http://www.google.com"
},
{
"name": "alpr",
"image" : "openalpr/openalpr",
"short_description": "Open source Automatic License Plate Recognition library.",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/alpr-logo.png",
"description": "Deploy license plate and vehicle recognition with Rekors OpenALPR suite of solutions designed to provide invaluable vehicle intelligence which enhances business capabilities, automates tasks, and increases overall community safety!",
"owner": "IRT",
"price": 300,
"license": "GPLv2",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 1024,
"storage": 300,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"source_url": "http://www.google.com"
},
{
"name": "imagemagic",
"image" : "dpokidov/imagemagick:7.1.0-62-2",
"short_description": "ImageMagick® is a free, open-source software suite, used for editing and manipulating digital images.",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/imagemagic-logo.png",
"description": "Use ImageMagick to create, edit, compose, and convert digital images. Resize an image, crop it, change its shades and colors, add captions, and more.",
"owner": "IRT",
"price": 300,
"license": "GPLv2",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 1024,
"storage": 300,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"source_url": "http://www.google.com"
},
{
"name": "Mosquito server",
"short_description": "open source message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1.",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/mosquitto-logo.png",
"description": "A very long description of what this storage is",
"owner": "IRT",
"price": 300,
"license": "GPLv2",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": 1024,
"storage": 300,
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"disk_io": "30 MB/s",
"parallel": true,
"scaling_model": 2,
"source_url": "http://www.google.com"
}
]
},
{
"api": "/oc/storage/",
"content": [
{
"name": "IRT risk database",
"short_description": "IRT Database instance",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/IRT risk database.png",
"owner": "IRT",
"description": "A very long description of what this storage is",
"type": "database",
"acronym": "DC_myDC",
"size": 4000,
"price": 90,
"encryption": false,
"redundancy": "RAID5",
"throughput": "r:200,w:150",
"source_url": "http://www.google.com"
},
{
"name": "IRT local file storage",
"short_description": "S3 compliant IRT file storage",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/IRT local file storage.png",
"description": "A very long description of what this storage is",
"owner": "IRT",
"acronym": "DC_myDC",
"size": 40000,
"encryption": false,
"redundancy": "RAID5S",
"throughput": "r:300,w:350",
"price": 90,
"source_url": "http://www.google.com"
}
]
},
{
"api": "/oc/datacenter/",
"content": [
{
"name": "Mundi datacenter",
"acronym": "DC_myDC",
"hosts": [
"localhost:49618",
"oc-catalog:49618"
],
"short_description": "Mundi Opencloud Instance",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Mundi datacenter.png",
"description": "A very long description of what this data is",
"type": "datacenter",
"bookingPrice": 650,
"owner": "IRT",
"cpus": [{
"cores": 8,
"architecture": "x86",
"shared": false
}],
"ram": {
"size": 16384,
"ecc": false
},
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"source_url": "http://www.google.com"
},
{
"name": "CNES datacenter",
"acronym": "DC_superDC1",
"hosts": [
"localhost:49619",
"dc1:49618"
],
"short_description": "CNES Opencloud Instance",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/CNES datacenter.png",
"description": "A very long description of what this data is",
"type": "datacenter",
"bookingPrice": 650,
"owner": "IRT",
"cpus": [{
"cores": 32,
"architecture": "x86",
"shared": false
}],
"ram": {
"size": 100000,
"ecc": false
},
"gpus": [],
"source_url": "http://www.google.com"
},
{
"name": "Meteo France datacenter",
"acronym": "DC_superDC2",
"hosts": [
"localhost:49620",
"dc2:49618"
],
"short_description": "Meteo France Opencloud Instance",
"logo": "https://cloud.o-forge.io/core/deperecated-oc-catalog/src/branch/main/scripts/local_imgs/Meteo France datacenter.png",
"description": "A very long description of what this data is",
"type": "datacenter",
"bookingPrice": 650,
"owner": "Meteo France",
"cpus": [{
"cores": 16,
"architecture": "x86",
"shared": false
}],
"ram": {
"size": 32786,
"ecc": false
},
"gpus": [
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
},
{
"cuda_cores": 10496,
"model": "RTX 3090 FE",
"memory": 24000,
"tensor_cores": 328
}
],
"source_url": "http://www.google.com"
}
]
}
]

View File

@ -12,4 +12,5 @@ services:
- catalog
networks:
catalog:
catalog:
external: true

2
go.mod
View File

@ -11,7 +11,7 @@ require (
)
require (
cloud.o-forge.io/core/oc-lib v0.0.0-20240724075330-637b2c977dda // indirect
cloud.o-forge.io/core/oc-lib v0.0.0-20240730065931-4730d5b4d401 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/beego/bee/v2 v2.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect

24
go.sum
View File

@ -74,6 +74,30 @@ cloud.o-forge.io/core/oc-lib v0.0.0-20240724072703-c5f4427f9f04 h1:kUWIOJVNOX7jA
cloud.o-forge.io/core/oc-lib v0.0.0-20240724072703-c5f4427f9f04/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724075330-637b2c977dda h1:aoZ2nomRGCTjW+cJN/3iKGGPbgLYG0hNa2NlW1pSjgs=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724075330-637b2c977dda/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724122347-ac2111a3658a h1:6A0n5vA3OTnohOwKUQDh04MMD1L90mbj0Sd2DVmazNE=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724122347-ac2111a3658a/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724124904-357d79e68b86 h1:PuvtXdiFIPMUP2dpXu2EGU18mKFw+7ubBqGBPQAHjWc=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724124904-357d79e68b86/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724132730-840eb24bb294 h1:qKleUcDOsDKVbW6w7GCW8gzJHPEBDvWTUDg+YZ2eN64=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724132730-840eb24bb294/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724150830-51e94e73e5ec h1:xjFy7B/7/zozknoPaRjJwvdNurctuiyxDQVF9TTrmZA=
cloud.o-forge.io/core/oc-lib v0.0.0-20240724150830-51e94e73e5ec/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729065202-c7f65914bb93 h1:5biCGQKPQWkmLRDegd7UBY6vP0KdEcDZQ8rROqNtaz8=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729065202-c7f65914bb93/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729121948-e2f722e17bb6 h1:EDwuA0giARIo5UFicOVGAkTIK0xQCk9HQJvNxcflflQ=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729121948-e2f722e17bb6/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729132214-d77a403150d8 h1:SWTfZIJ7Nq+1cfrfMEKG95DTxwXISyz1ul0N9zexWK8=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729132214-d77a403150d8/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729135315-2f6fab2f7b23 h1:EyWdP+NCgVSdHW9jZbp0nlAwNVLro+yzWZL9mrgdZRM=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729135315-2f6fab2f7b23/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729140409-beeac40a103d h1:NQ2GONbmIKKJuEunsn+cpYzFSThtGblL1eYD1BIIIg8=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729140409-beeac40a103d/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729150539-dc30412f2edc h1:Q70pRG2f6fULpw+BE7ECQO7wk/Wy9VreZPrpuUXJ9yA=
cloud.o-forge.io/core/oc-lib v0.0.0-20240729150539-dc30412f2edc/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730063928-0e96b5c01a4f h1:AQuTEgzKJCd05QKyI9yx6v65L4IbPQX7nQLaLvO+ots=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730063928-0e96b5c01a4f/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730065931-4730d5b4d401 h1:kp1sHyrRIoa4i9tjUuFvFMVRSfUC+093s9KcWLiURy8=
cloud.o-forge.io/core/oc-lib v0.0.0-20240730065931-4730d5b4d401/go.mod h1:V5EL+NV2s9P1/BcFm3/icfLeBYVVMLl1Z0F0eecJZGo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=

41
populate.sh Executable file
View File

@ -0,0 +1,41 @@
#!/usr/bin/bash
# Must specify a JSON with a following structure:
ENDPOINT="http://localhost:8087"
if [[ $DOCKER_ENVIRONMENT ]]; then
ENDPOINT="http://oc-catalog:8087"
fi
if [[ $DOCKER_ENDPOINT ]]; then
ENDPOINT="$DOCKER_ENDPOINT"
fi
[[ -z $1 ]] && { echo "Must specify a json path"; exit 1; }
[[ ! -f $1 ]] && { echo "$1 is not a file"; exit 1; }
cat "$1" | jq empty || { echo "$1 is not a valid JSON"; exit 1; }
########
while read row; do
TRGT_ENDPOINT=$(echo $row | jq -r '.api')
while read item; do
echo `echo $item | jq -r '.name'` to $ENDPOINT${TRGT_ENDPOINT}
answer=$(curl --fail "$ENDPOINT${TRGT_ENDPOINT}" \
-X POST \
-H "Content-Type: application/json" \
-d "$item")
echo $answer
if [[ $? -ne 0 || "$answer" == *"<html>"* ]]; then
exit 1
fi
done < <(echo "$row" | jq -c '.content[]')
done < <(jq -c '.[]' $1)
echo
echo
echo
echo "All models submitted correctly!"