From 4f30636ef121c6e2d0d2754ed269fb0ccc681b52 Mon Sep 17 00:00:00 2001 From: "jean-christophe.alleman" Date: Tue, 1 Oct 2019 12:01:38 +0200 Subject: [PATCH 1/2] feat(cloud.project.io): add resources --- .../cloud/project/cloud-project.service.js | 3 +++ .../cloud-project-io-capabilities.service.js | 5 +++++ ...-project-io-capabilities-stream.service.js | 5 +++++ ...t-io-capabilities-stream-region.service.js | 5 +++++ ...o-capabilities-stream-region.v6.service.js | 10 +++++++++ .../project/io/cloud-project-io.service.js | 6 ++++++ .../stream/cloud-project-io-stream.service.js | 7 +++++++ .../cloud-project-io-stream.v6.service.js | 16 ++++++++++++++ ...-project-io-stream-subscription.service.js | 5 +++++ ...oject-io-stream-subscription.v6.service.js | 21 +++++++++++++++++++ .../cloud-project-io-stream-token.service.js | 5 +++++ ...loud-project-io-stream-token.v6.service.js | 11 ++++++++++ 12 files changed, 99 insertions(+) create mode 100644 src/api/cloud/project/io/capabilities/cloud-project-io-capabilities.service.js create mode 100644 src/api/cloud/project/io/capabilities/stream/cloud-project-io-capabilities-stream.service.js create mode 100644 src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.service.js create mode 100644 src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.v6.service.js create mode 100644 src/api/cloud/project/io/cloud-project-io.service.js create mode 100644 src/api/cloud/project/io/stream/cloud-project-io-stream.service.js create mode 100644 src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js create mode 100644 src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.service.js create mode 100644 src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.v6.service.js create mode 100644 src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.service.js create mode 100644 src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.v6.service.js diff --git a/src/api/cloud/project/cloud-project.service.js b/src/api/cloud/project/cloud-project.service.js index 84e11cc1..22f07340 100644 --- a/src/api/cloud/project/cloud-project.service.js +++ b/src/api/cloud/project/cloud-project.service.js @@ -19,6 +19,9 @@ angular.module('ovh-api-services').service('OvhApiCloudProject', ($injector, $ca Instance() { return $injector.get('OvhApiCloudProjectInstance'); }, + Io() { + return $injector.get('OvhApiCloudProjectIo'); + }, Ip() { return $injector.get('OvhApiCloudProjectIp'); }, diff --git a/src/api/cloud/project/io/capabilities/cloud-project-io-capabilities.service.js b/src/api/cloud/project/io/capabilities/cloud-project-io-capabilities.service.js new file mode 100644 index 00000000..27098715 --- /dev/null +++ b/src/api/cloud/project/io/capabilities/cloud-project-io-capabilities.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoCapabilities', $injector => ({ + Stream: () => $injector.get('OvhApiCloudProjectIoCapabilitiesStream'), + })); diff --git a/src/api/cloud/project/io/capabilities/stream/cloud-project-io-capabilities-stream.service.js b/src/api/cloud/project/io/capabilities/stream/cloud-project-io-capabilities-stream.service.js new file mode 100644 index 00000000..ed6228df --- /dev/null +++ b/src/api/cloud/project/io/capabilities/stream/cloud-project-io-capabilities-stream.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoCapabilitiesStream', $injector => ({ + Region: () => $injector.get('OvhApiCloudProjectIoCapabilitiesStreamRegion'), + })); diff --git a/src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.service.js b/src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.service.js new file mode 100644 index 00000000..cd4eebcd --- /dev/null +++ b/src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoCapabilitiesStreamRegion', $injector => ({ + v6: () => $injector.get('OvhApiCloudProjectIoCapabilitiesStreamRegionV6'), + })); diff --git a/src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.v6.service.js b/src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.v6.service.js new file mode 100644 index 00000000..fb2a490f --- /dev/null +++ b/src/api/cloud/project/io/capabilities/stream/region/cloud-project-io-capabilities-stream-region.v6.service.js @@ -0,0 +1,10 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoCapabilitiesStreamRegionV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/io/capabilities/stream/region/:regionName', { + serviceName: '@serviceName', + regionName: '@regionName', + }); + + return resource; + }); diff --git a/src/api/cloud/project/io/cloud-project-io.service.js b/src/api/cloud/project/io/cloud-project-io.service.js new file mode 100644 index 00000000..303bb6e5 --- /dev/null +++ b/src/api/cloud/project/io/cloud-project-io.service.js @@ -0,0 +1,6 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIo', $injector => ({ + Capabilities: () => $injector.get('OvhApiCloudProjectIoCapabilities'), + Stream: () => $injector.get('OvhApiCloudProjectIoStream'), + })); diff --git a/src/api/cloud/project/io/stream/cloud-project-io-stream.service.js b/src/api/cloud/project/io/stream/cloud-project-io-stream.service.js new file mode 100644 index 00000000..a3a3ca64 --- /dev/null +++ b/src/api/cloud/project/io/stream/cloud-project-io-stream.service.js @@ -0,0 +1,7 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoStream', $injector => ({ + v6: () => $injector.get('OvhApiCloudProjectIoStreamV6'), + Subscription: () => $injector.get('OvhApiCloudProjectIoStreamSubscription'), + Token: () => $injector.get('OvhApiCloudProjectIoStreamToken'), + })); diff --git a/src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js b/src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js new file mode 100644 index 00000000..ffd04e3f --- /dev/null +++ b/src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js @@ -0,0 +1,16 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoStreamV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/io/stream/:streamId', { + serviceName: '@serviceName', + streamId: '@streamId', + }, { + getStats: { + url: '/cloud/project/:serviceName/io/stream/:streamId/stats', + method: 'GET', + isArray: false, + }, + }); + + return resource; + }); diff --git a/src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.service.js b/src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.service.js new file mode 100644 index 00000000..005f4200 --- /dev/null +++ b/src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoStreamSubscription', $injector => ({ + v6: () => $injector.get('OvhApiCloudProjectIoStreamSubscriptionV6'), + })); diff --git a/src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.v6.service.js b/src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.v6.service.js new file mode 100644 index 00000000..c41f6755 --- /dev/null +++ b/src/api/cloud/project/io/stream/subscription/cloud-project-io-stream-subscription.v6.service.js @@ -0,0 +1,21 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoStreamSubscriptionV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/io/stream/:streamId/subscription/:subscriptionId', { + serviceName: '@serviceName', + streamId: '@streamId', + subscriptionId: '@subscriptionId', + }, { + resetCursor: { + method: 'POST', + url: '/cloud/project/:serviceName/io/stream/:streamId/subscription/:subscriptionId/resetCursor', + }, + getStats: { + url: '/cloud/project/:serviceName/io/stream/:streamId/subscription/:subscriptionId/stats', + method: 'GET', + isArray: false, + }, + }); + + return resource; + }); diff --git a/src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.service.js b/src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.service.js new file mode 100644 index 00000000..33f53394 --- /dev/null +++ b/src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.service.js @@ -0,0 +1,5 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoStreamToken', $injector => ({ + v6: () => $injector.get('OvhApiCloudProjectIoStreamTokenV6'), + })); diff --git a/src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.v6.service.js b/src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.v6.service.js new file mode 100644 index 00000000..077e4271 --- /dev/null +++ b/src/api/cloud/project/io/stream/token/cloud-project-io-stream-token.v6.service.js @@ -0,0 +1,11 @@ +angular + .module('ovh-api-services') + .service('OvhApiCloudProjectIoStreamTokenV6', ($resource) => { + const resource = $resource('/cloud/project/:serviceName/io/stream/:streamId/token/:tokenId', { + serviceName: '@serviceName', + streamId: '@streamId', + tokenId: '@tokenId', + }); + + return resource; + }); From f90a92b653d4ee7634bfb9439cd97669cdc6079b Mon Sep 17 00:00:00 2001 From: "jean-christophe.alleman" Date: Wed, 2 Oct 2019 10:41:07 +0200 Subject: [PATCH 2/2] feat(cloud.project.io): add edit method --- .../project/io/stream/cloud-project-io-stream.v6.service.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js b/src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js index ffd04e3f..7af7eb9a 100644 --- a/src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js +++ b/src/api/cloud/project/io/stream/cloud-project-io-stream.v6.service.js @@ -5,6 +5,9 @@ angular serviceName: '@serviceName', streamId: '@streamId', }, { + edit: { + method: 'PUT', + }, getStats: { url: '/cloud/project/:serviceName/io/stream/:streamId/stats', method: 'GET',