From ec6a7ac541ca9cab1177b92014a2e6c3a6435ac6 Mon Sep 17 00:00:00 2001 From: Adrien Carreira Date: Fri, 24 Jul 2020 16:03:12 +0200 Subject: [PATCH] feat(cloud.project.ai): add training platform initialization (#300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Maƫl LE GAL Co-authored-by: Adrien Carreira Co-authored-by: Antoine Leblanc --- .../cloud-project-ai-capabilities.service.js | 1 + .../cloud-project-ai-capabilities-training.service.js | 7 +++++++ ...roject-ai-capabilities-training-feature.service.js | 5 +++++ ...ect-ai-capabilities-training-feature.v6.service.js | 9 +++++++++ ...t-ai-capabilities-training-preset-image.service.js | 5 +++++ ...i-capabilities-training-preset-image.v6.service.js | 9 +++++++++ ...project-ai-capabilities-training-region.service.js | 5 +++++ ...ject-ai-capabilities-training-region.v6.service.js | 9 +++++++++ src/api/cloud/project/ai/cloud-project-ai.service.js | 1 + ...cloud-project-ai-training-authorization.service.js | 5 +++++ ...ud-project-ai-training-authorization.v6.service.js | 10 ++++++++++ .../ai/training/cloud-project-ai-training.service.js | 8 ++++++++ .../data/cloud-project-ai-training-data.service.js | 5 +++++ .../data/cloud-project-ai-training-data.v6.service.js | 11 +++++++++++ .../job/cloud-project-ai-training-job.service.js | 5 +++++ .../job/cloud-project-ai-training-job.v6.service.js | 11 +++++++++++ .../cloud-project-ai-training-registry.service.js | 5 +++++ .../cloud-project-ai-training-registry.v6.service.js | 8 ++++++++ 18 files changed, 119 insertions(+) create mode 100644 src/api/cloud/project/ai/capabilities/training/cloud-project-ai-capabilities-training.service.js create mode 100644 src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.service.js create mode 100644 src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.v6.service.js create mode 100644 src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.service.js create mode 100644 src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.v6.service.js create mode 100644 src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.service.js create mode 100644 src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.v6.service.js create mode 100644 src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.service.js create mode 100644 src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.v6.service.js create mode 100644 src/api/cloud/project/ai/training/cloud-project-ai-training.service.js create mode 100644 src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.service.js create mode 100644 src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.v6.service.js create mode 100644 src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.service.js create mode 100644 src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.v6.service.js create mode 100644 src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.service.js create mode 100644 src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.v6.service.js diff --git a/src/api/cloud/project/ai/capabilities/cloud-project-ai-capabilities.service.js b/src/api/cloud/project/ai/capabilities/cloud-project-ai-capabilities.service.js index 3375608e..2024466e 100644 --- a/src/api/cloud/project/ai/capabilities/cloud-project-ai-capabilities.service.js +++ b/src/api/cloud/project/ai/capabilities/cloud-project-ai-capabilities.service.js @@ -2,4 +2,5 @@ angular .module('ovh-api-services') .service('OvhApiCloudProjectAiCapabilities', ($injector) => ({ Serving: () => $injector.get('OvhApiCloudProjectAiCapabilitiesServing'), + Training: () => $injector.get('OvhApiCloudProjectAiCapabilitiesTraining'), })); diff --git a/src/api/cloud/project/ai/capabilities/training/cloud-project-ai-capabilities-training.service.js b/src/api/cloud/project/ai/capabilities/training/cloud-project-ai-capabilities-training.service.js new file mode 100644 index 00000000..022540f8 --- /dev/null +++ b/src/api/cloud/project/ai/capabilities/training/cloud-project-ai-capabilities-training.service.js @@ -0,0 +1,7 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiCapabilitiesTraining', ($injector) => ({ + Region: () => $injector.get('OvhApiCloudProjectAiCapabilitiesTrainingRegion'), + PresetImage: () => $injector.get('OvhApiCloudProjectAiCapabilitiesTrainingPresetImage'), + Feature: () => $injector.get('OvhApiCloudProjectAiCapabilitiesTrainingFeature'), + })); diff --git a/src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.service.js b/src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.service.js new file mode 100644 index 00000000..236c34bb --- /dev/null +++ b/src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiCapabilitiesTrainingFeature', ($injector) => ({ + v6: () => $injector.get('OvhApiCloudProjectAiCapabilitiesTrainingFeatureV6'), + })); diff --git a/src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.v6.service.js b/src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.v6.service.js new file mode 100644 index 00000000..12c8bd1d --- /dev/null +++ b/src/api/cloud/project/ai/capabilities/training/feature/cloud-project-ai-capabilities-training-feature.v6.service.js @@ -0,0 +1,9 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiCapabilitiesTrainingFeatureV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/ai/capabilities/training/feature', { + serviceName: '@serviceName', + }); + + return resource; + }); diff --git a/src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.service.js b/src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.service.js new file mode 100644 index 00000000..7fedc73c --- /dev/null +++ b/src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiCapabilitiesTrainingPresetImage', ($injector) => ({ + v6: () => $injector.get('OvhApiCloudProjectAiCapabilitiesTrainingPresetImageV6'), + })); diff --git a/src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.v6.service.js b/src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.v6.service.js new file mode 100644 index 00000000..8dd43729 --- /dev/null +++ b/src/api/cloud/project/ai/capabilities/training/presetImage/cloud-project-ai-capabilities-training-preset-image.v6.service.js @@ -0,0 +1,9 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiCapabilitiesTrainingPresetImageV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/ai/capabilities/training/presetImage', { + serviceName: '@serviceName', + }); + + return resource; + }); diff --git a/src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.service.js b/src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.service.js new file mode 100644 index 00000000..6fff46db --- /dev/null +++ b/src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiCapabilitiesTrainingRegion', ($injector) => ({ + v6: () => $injector.get('OvhApiCloudProjectAiCapabilitiesTrainingRegionV6'), + })); diff --git a/src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.v6.service.js b/src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.v6.service.js new file mode 100644 index 00000000..591e2793 --- /dev/null +++ b/src/api/cloud/project/ai/capabilities/training/region/cloud-project-ai-capabilities-training-region.v6.service.js @@ -0,0 +1,9 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiCapabilitiesTrainingRegionV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/ai/capabilities/training/region', { + serviceName: '@serviceName', + }); + + return resource; + }); diff --git a/src/api/cloud/project/ai/cloud-project-ai.service.js b/src/api/cloud/project/ai/cloud-project-ai.service.js index 1477d9e5..621844c3 100644 --- a/src/api/cloud/project/ai/cloud-project-ai.service.js +++ b/src/api/cloud/project/ai/cloud-project-ai.service.js @@ -3,4 +3,5 @@ angular .service('OvhApiCloudProjectAi', ($injector) => ({ Serving: () => $injector.get('OvhApiCloudProjectAiServing'), Capabilities: () => $injector.get('OvhApiCloudProjectAiCapabilities'), + Training: () => $injector.get('OvhApiCloudProjectAiTraining'), })); diff --git a/src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.service.js b/src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.service.js new file mode 100644 index 00000000..d093db9a --- /dev/null +++ b/src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingAuthorization', ($injector) => ({ + v6: () => $injector.get('OvhApiCloudProjectAiTrainingAuthorizationV6'), + })); diff --git a/src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.v6.service.js b/src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.v6.service.js new file mode 100644 index 00000000..5788cfde --- /dev/null +++ b/src/api/cloud/project/ai/training/authorization/cloud-project-ai-training-authorization.v6.service.js @@ -0,0 +1,10 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingAuthorizationV6', ($resource) => $resource('/cloud/project/:serviceName/ai/training/authorization', { + serviceName: '@serviceName', + }, { + save: { + method: 'POST', + hasBody: false, + }, + })); diff --git a/src/api/cloud/project/ai/training/cloud-project-ai-training.service.js b/src/api/cloud/project/ai/training/cloud-project-ai-training.service.js new file mode 100644 index 00000000..3a12956f --- /dev/null +++ b/src/api/cloud/project/ai/training/cloud-project-ai-training.service.js @@ -0,0 +1,8 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTraining', ($injector) => ({ + Job: () => $injector.get('OvhApiCloudProjectAiTrainingJob'), + Data: () => $injector.get('OvhApiCloudProjectAiTrainingData'), + Registry: () => $injector.get('OvhApiCloudProjectAiTrainingRegistry'), + Authorization: () => $injector.get('OvhApiCloudProjectAiTrainingAuthorization'), + })); diff --git a/src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.service.js b/src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.service.js new file mode 100644 index 00000000..35f77dc6 --- /dev/null +++ b/src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingData', ($injector) => ({ + v6: () => $injector.get('OvhApiCloudProjectAiTrainingDataV6'), + })); diff --git a/src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.v6.service.js b/src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.v6.service.js new file mode 100644 index 00000000..ca3deb5b --- /dev/null +++ b/src/api/cloud/project/ai/training/data/cloud-project-ai-training-data.v6.service.js @@ -0,0 +1,11 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingDataV6', ($resource) => $resource('/cloud/project/:serviceName/ai/training/data/:dataId', { + serviceName: '@serviceName', + dataId: '@dataId', + }, { + sync: { + method: 'POST', + url: '/cloud/project/:serviceName/ai/training/data/:dataId/sync', + }, + })); diff --git a/src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.service.js b/src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.service.js new file mode 100644 index 00000000..c4dabc54 --- /dev/null +++ b/src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingJob', ($injector) => ({ + v6: () => $injector.get('OvhApiCloudProjectAiTrainingJobV6'), + })); diff --git a/src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.v6.service.js b/src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.v6.service.js new file mode 100644 index 00000000..9b22e41b --- /dev/null +++ b/src/api/cloud/project/ai/training/job/cloud-project-ai-training-job.v6.service.js @@ -0,0 +1,11 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingJobV6', ($resource) => $resource('/cloud/project/:serviceName/ai/training/job/:jobId', { + serviceName: '@serviceName', + jobId: '@jobId', + }, { + kill: { + method: 'POST', + url: '/cloud/project/:serviceName/ai/training/job/:jobId/kill', + }, + })); diff --git a/src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.service.js b/src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.service.js new file mode 100644 index 00000000..7e7d1a49 --- /dev/null +++ b/src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingRegistry', ($injector) => ({ + v6: () => $injector.get('OvhApiCloudProjectAiTrainingRegistryV6'), + })); diff --git a/src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.v6.service.js b/src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.v6.service.js new file mode 100644 index 00000000..ad328901 --- /dev/null +++ b/src/api/cloud/project/ai/training/registry/cloud-project-ai-training-registry.v6.service.js @@ -0,0 +1,8 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectAiTrainingRegistryV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/ai/training/registry', { + serviceName: '@serviceName', + }); + return resource; + });