diff --git a/src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.service.js b/src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.service.js new file mode 100644 index 00000000..0143a501 --- /dev/null +++ b/src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudAllowedNetwork", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudAllowedNetworkV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.v6.service.js b/src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.v6.service.js new file mode 100644 index 00000000..6745a3d5 --- /dev/null +++ b/src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.v6.service.js @@ -0,0 +1,35 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudAllowedNetworkV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudAllowedNetworkV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudAllowedNetworkV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + queryCache.removeAll(); + return response.data; + } + }; + + var networkAllowedResource = $resource("/dedicatedCloud/:serviceName/allowedNetwork/:networkAccessId", { + serviceName: "@serviceName", + networkAccessId: "@networkAccessId" + }, { + get: { method: "GET", cache: cache }, + query: { method: "GET", cache: queryCache, isArray: true }, + put: { method: "PUT", interceptor: interceptor }, + save: { method: "POST", interceptor: interceptor }, + "delete": { method: "DELETE", interceptor: interceptor } + }); + + networkAllowedResource.resetCache = function () { + cache.removeAll(); + }; + + networkAllowedResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return networkAllowedResource; +}); diff --git a/src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.service.js b/src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.service.js new file mode 100644 index 00000000..43c80c07 --- /dev/null +++ b/src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.service.js @@ -0,0 +1,11 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterBackup", function ($injector) { + + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudDatacenterBackupV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.v6.service.js b/src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.v6.service.js new file mode 100644 index 00000000..262ddff6 --- /dev/null +++ b/src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.v6.service.js @@ -0,0 +1,46 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterBackupV6", function ($resource, $cacheFactory) { + "use strict"; + + var cache = $cacheFactory("OvhApiDedicatedCloudDatacenterBackupV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + return response.data; + } + }; + + var baseUrl = "/dedicatedCloud/:serviceName/datacenter/:datacenterId/backup"; + + var backupResource = $resource(baseUrl, { + serviceName: "@serviceName", + datacenterId: "@datacenterId" + }, { + get: { method: "GET", cache: cache }, + disable: { + url: baseUrl + "/disable", + method: "POST", + interceptor: interceptor + }, + enable: { + url: baseUrl + "/enable", + method: "POST", + interceptor: interceptor + }, + changeProperties: { + url: baseUrl + "/changeProperties", + method: "POST", + interceptor: interceptor + } + }); + + backupResource.resetAllCache = function () { + backupResource.resetCache(); + }; + + backupResource.resetCache = function () { + cache.removeAll(); + }; + + return backupResource; +}); diff --git a/src/dedicatedCloud/datacenter/dedicatedCloud-datacenter.service.js b/src/dedicatedCloud/datacenter/dedicatedCloud-datacenter.service.js index 506e53f7..cbd675cb 100644 --- a/src/dedicatedCloud/datacenter/dedicatedCloud-datacenter.service.js +++ b/src/dedicatedCloud/datacenter/dedicatedCloud-datacenter.service.js @@ -11,6 +11,12 @@ angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenter", fun }, Host: function () { return $injector.get("OvhApiDedicatedCloudDatacenterHost"); + }, + DisasterRecovery: function () { + return $injector.get("OvhApiDedicatedCloudDatacenterDisasterRecovery"); + }, + Backup: function () { + return $injector.get("OvhApiDedicatedCloudDatacenterBackup"); } }; diff --git a/src/dedicatedCloud/datacenter/disasterRecovery/dedicatedCloud-datacenter-disasterRecovery.service.js b/src/dedicatedCloud/datacenter/disasterRecovery/dedicatedCloud-datacenter-disasterRecovery.service.js new file mode 100644 index 00000000..44c7a4b8 --- /dev/null +++ b/src/dedicatedCloud/datacenter/disasterRecovery/dedicatedCloud-datacenter-disasterRecovery.service.js @@ -0,0 +1,11 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterDisasterRecovery", function ($injector) { + + "use strict"; + + return { + Zerto: function () { + return $injector.get("OvhApiDedicatedCloudDatacenterDisasterRecoveryZerto"); + } + }; + +}); diff --git a/src/dedicatedCloud/datacenter/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.service.js b/src/dedicatedCloud/datacenter/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.service.js new file mode 100644 index 00000000..146f5775 --- /dev/null +++ b/src/dedicatedCloud/datacenter/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.service.js @@ -0,0 +1,11 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterDisasterRecoveryZerto", function ($injector) { + + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudDatacenterDisasterRecoveryZertoV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/datacenter/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.v6.service.js b/src/dedicatedCloud/datacenter/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.v6.service.js new file mode 100644 index 00000000..c4e94d07 --- /dev/null +++ b/src/dedicatedCloud/datacenter/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.v6.service.js @@ -0,0 +1,52 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterDisasterRecoveryZertoV6", function ($resource, $cacheFactory) { + "use strict"; + + var cache = $cacheFactory("OvhApiDedicatedCloudDatacenterDisasterRecoveryZertoV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + return response.data; + } + }; + + var baseUrl = "/dedicatedCloud/:serviceName/datacenter/:datacenterId/disasterRecovery/zerto"; + + var zertoResource = $resource(baseUrl, { + serviceName: "@serviceName", + datacenterId: "@datacenterId" + }, { + // Method is a POST but acts like a GET + get: { + url: baseUrl + "/state", + method: "POST", + cache: cache, + hasBody: false + }, + disable: { + url: baseUrl + "/disable", + method: "POST", + interceptor: interceptor + }, + enable: { + url: baseUrl + "/enable", + method: "POST", + interceptor: interceptor + }, + generateZsspPassword: { + url: baseUrl + "/generateZsspPassword", + method: "POST", + interceptor: interceptor + } + }); + + zertoResource.resetAllCache = function () { + zertoResource.resetCache(); + }; + + zertoResource.resetCache = function () { + cache.removeAll(); + }; + + return zertoResource; +}); diff --git a/src/dedicatedCloud/dedicatedCloud.service.js b/src/dedicatedCloud/dedicatedCloud.service.js index 04db4bae..264ae360 100644 --- a/src/dedicatedCloud/dedicatedCloud.service.js +++ b/src/dedicatedCloud/dedicatedCloud.service.js @@ -5,14 +5,41 @@ angular.module("ovh-api-services").service("OvhApiDedicatedCloud", function ($in v6: function () { return $injector.get("OvhApiDedicatedCloudV6"); }, - User: function () { - return $injector.get("OvhApiDedicatedCloudUser"); + AllowedNetwork: function () { + return $injector.get("OvhApiDedicatedCloudAllowedNetwork"); + }, + Datacenter: function () { + return $injector.get("OvhApiDedicatedCloudDatacenter"); + }, + Federation: function () { + return $injector.get("OvhApiDedicatedCloudFederation"); }, Filer: function () { return $injector.get("OvhApiDedicatedCloudFiler"); }, - Datacenter: function () { - return $injector.get("OvhApiDedicatedCloudDatacenter"); + Ip: function () { + return $injector.get("OvhApiDedicatedCloudIp"); + }, + Location: function () { + return $injector.get("OvhApiDedicatedCloudLocation"); + }, + Option: function () { + return $injector.get("OvhApiDedicatedCloudOption"); + }, + Task: function () { + return $injector.get("OvhApiDedicatedCloudTask"); + }, + User: function () { + return $injector.get("OvhApiDedicatedCloudUser"); + }, + Vlan: function () { + return $injector.get("OvhApiDedicatedCloudVlan"); + }, + VMEncryption: function () { + return $injector.get("OvhApiDedicatedCloudVMEncryption"); + }, + VRack: function () { + return $injector.get("OvhApiDedicatedCloudVRack"); } }; diff --git a/src/dedicatedCloud/dedicatedCloud.v6.service.js b/src/dedicatedCloud/dedicatedCloud.v6.service.js index 1e37fa50..6444e49f 100644 --- a/src/dedicatedCloud/dedicatedCloud.v6.service.js +++ b/src/dedicatedCloud/dedicatedCloud.v6.service.js @@ -32,6 +32,11 @@ angular.module("ovh-api-services").service("OvhApiDedicatedCloudV6", function ($ url: "/dedicatedCloud/:serviceName/confirmTermination", method: "POST", interceptor: interceptor + }, + hcx: { + url: "/dedicatedCloud/:serviceName/hcx", + method: "GET", + cache: cache } }); diff --git a/src/dedicatedCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.service.js b/src/dedicatedCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.service.js new file mode 100644 index 00000000..dac534b9 --- /dev/null +++ b/src/dedicatedCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudFederationActiveDirectory", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudFederationActiveDirectoryV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.v6.service.js b/src/dedicatedCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.v6.service.js new file mode 100644 index 00000000..9c2fc876 --- /dev/null +++ b/src/dedicatedCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.v6.service.js @@ -0,0 +1,24 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudFederationActiveDirectoryV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudFederationActiveDirectoryV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudFederationActiveDirectoryV6"); + + var activeDirectoryResource = $resource("/dedicatedCloud/:serviceName/federation/activeDirectory/:activeDirectoryId", { + serviceName: "@serviceName", + activeDirectoryId: "@activeDirectoryId" + }, { + query: { method: "GET", cache: queryCache, isArray: true }, + get: { method: "GET", cache: cache } + }); + + activeDirectoryResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + activeDirectoryResource.resetCache = function () { + cache.removeAll(); + }; + + return activeDirectoryResource; +}); diff --git a/src/dedicatedCloud/federation/dedicatedCloud-federation.service.js b/src/dedicatedCloud/federation/dedicatedCloud-federation.service.js new file mode 100644 index 00000000..c4575d1c --- /dev/null +++ b/src/dedicatedCloud/federation/dedicatedCloud-federation.service.js @@ -0,0 +1,13 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudFederation", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudFederationV6"); + }, + ActiveDirectory: function () { + return $injector.get("OvhApiDedicatedCloudFederationActiveDirectory"); + } + }; + +}); diff --git a/src/dedicatedCloud/federation/dedicatedCloud-federation.v6.service.js b/src/dedicatedCloud/federation/dedicatedCloud-federation.v6.service.js new file mode 100644 index 00000000..e4139561 --- /dev/null +++ b/src/dedicatedCloud/federation/dedicatedCloud-federation.v6.service.js @@ -0,0 +1,17 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudFederationV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudFederationV6Query"); + + var federationResource = $resource("/dedicatedCloud/:serviceName/federation", { + serviceName: "@serviceName" + }, { + query: { method: "GET", cache: queryCache } + }); + + federationResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return federationResource; +}); diff --git a/src/dedicatedCloud/ip/dedicatedCloud-ip.service.js b/src/dedicatedCloud/ip/dedicatedCloud-ip.service.js new file mode 100644 index 00000000..449a243d --- /dev/null +++ b/src/dedicatedCloud/ip/dedicatedCloud-ip.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudIp", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudIpV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/ip/dedicatedCloud-ip.v6.service.js b/src/dedicatedCloud/ip/dedicatedCloud-ip.v6.service.js new file mode 100644 index 00000000..8d12c234 --- /dev/null +++ b/src/dedicatedCloud/ip/dedicatedCloud-ip.v6.service.js @@ -0,0 +1,24 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudIpV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudIpV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudIpV6"); + + var ipResource = $resource("/dedicatedCloud/:serviceName/ip/:network", { + serviceName: "@serviceName", + network: "@network" + }, { + query: { method: "GET", cache: queryCache, isArray: true }, + get: { method: "GET", cache: cache } + }); + + ipResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + ipResource.resetCache = function () { + cache.removeAll(); + }; + + return ipResource; +}); diff --git a/src/dedicatedCloud/location/dedicatedCloud-location.service.js b/src/dedicatedCloud/location/dedicatedCloud-location.service.js new file mode 100644 index 00000000..6ba9cf7f --- /dev/null +++ b/src/dedicatedCloud/location/dedicatedCloud-location.service.js @@ -0,0 +1,19 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocation", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudLocationV6"); + }, + Stock: function () { + return $injector.get("OvhApiDedicatedCloudLocationStock"); + }, + Hypervisor: function () { + return $injector.get("OvhApiDedicatedCloudLocationHypervisor"); + }, + HostProfile: function () { + return $injector.get("OvhApiDedicatedCloudLocationHostProfile"); + } + }; + +}); diff --git a/src/dedicatedCloud/location/dedicatedCloud-location.v6.service.js b/src/dedicatedCloud/location/dedicatedCloud-location.v6.service.js new file mode 100644 index 00000000..425f4bc8 --- /dev/null +++ b/src/dedicatedCloud/location/dedicatedCloud-location.v6.service.js @@ -0,0 +1,23 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocationV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudLocationV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudLocationV6"); + + var locationResource = $resource("/dedicatedCloud/location/:pccZone", { + pccZone: "@pccZone" + }, { + get: { method: "GET", cache: cache }, + query: { method: "GET", cache: queryCache, isArray: true } + }); + + locationResource.resetCache = function () { + cache.removeAll(); + }; + + locationResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return locationResource; +}); diff --git a/src/dedicatedCloud/location/host-profile/dedicatedCloud-location-host-profile.service.js b/src/dedicatedCloud/location/host-profile/dedicatedCloud-location-host-profile.service.js new file mode 100644 index 00000000..069f1c46 --- /dev/null +++ b/src/dedicatedCloud/location/host-profile/dedicatedCloud-location-host-profile.service.js @@ -0,0 +1,9 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocationHostProfile", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudLocationHostProfileV6"); + } + }; +}); diff --git a/src/dedicatedCloud/location/host-profile/dedicatedCloud-location-host-profile.v6.service.js b/src/dedicatedCloud/location/host-profile/dedicatedCloud-location-host-profile.v6.service.js new file mode 100644 index 00000000..6028f44c --- /dev/null +++ b/src/dedicatedCloud/location/host-profile/dedicatedCloud-location-host-profile.v6.service.js @@ -0,0 +1,21 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocationHostProfileV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudLocationHostProfileV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudLocationHostProfileV6"); + + + var locationResource = $resource("/dedicatedCloud/location/:pccZone/hostProfile/:id", { + pccZone: "@pccZone", + id: "@id" + }, { + query: { method: "GET", cache: queryCache, isArray: true }, + get: { method: "GET", cache: cache } + }); + + locationResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return locationResource; +}); diff --git a/src/dedicatedCloud/location/hypervisor/dedicatedCloud-location-hypervisor.service.js b/src/dedicatedCloud/location/hypervisor/dedicatedCloud-location-hypervisor.service.js new file mode 100644 index 00000000..f853d9b7 --- /dev/null +++ b/src/dedicatedCloud/location/hypervisor/dedicatedCloud-location-hypervisor.service.js @@ -0,0 +1,9 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocationHypervisor", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudLocationHypervisorV6"); + } + }; +}); diff --git a/src/dedicatedCloud/location/hypervisor/dedicatedCloud-location-hypervisor.v6.service.js b/src/dedicatedCloud/location/hypervisor/dedicatedCloud-location-hypervisor.v6.service.js new file mode 100644 index 00000000..8764bdc2 --- /dev/null +++ b/src/dedicatedCloud/location/hypervisor/dedicatedCloud-location-hypervisor.v6.service.js @@ -0,0 +1,21 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocationHypervisorV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudLocationHypervisorV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudLocationHypervisorV6"); + + + var locationResource = $resource("/dedicatedCloud/location/:pccZone/hypervisor/:id", { + pccZone: "@pccZone", + id: "@id" + }, { + query: { method: "GET", cache: queryCache, isArray: true }, + get: { method: "GET", cache: cache } + }); + + locationResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return locationResource; +}); diff --git a/src/dedicatedCloud/location/stock/dedicatedCloud-location-stock.service.js b/src/dedicatedCloud/location/stock/dedicatedCloud-location-stock.service.js new file mode 100644 index 00000000..54b17a31 --- /dev/null +++ b/src/dedicatedCloud/location/stock/dedicatedCloud-location-stock.service.js @@ -0,0 +1,9 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocationStock", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudLocationStockV6"); + } + }; +}); diff --git a/src/dedicatedCloud/location/stock/dedicatedCloud-location-stock.v6.service.js b/src/dedicatedCloud/location/stock/dedicatedCloud-location-stock.v6.service.js new file mode 100644 index 00000000..883d0a99 --- /dev/null +++ b/src/dedicatedCloud/location/stock/dedicatedCloud-location-stock.v6.service.js @@ -0,0 +1,41 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudLocationStockV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudLocationStockV6Query"); + var baseUrl = "/dedicatedCloud/location/:pccZone/stock"; + + var stockResource = $resource(baseUrl, { + pccZone: "@pccZone" + }, { + queryPcc: { + url: baseUrl + "/pcc", + method: "GET", + cache: queryCache, + isArray: true + }, + queryHost: { + url: baseUrl + "/host", + method: "GET", + cache: queryCache, + isArray: true, + params: { + minYear: "@minYear" + } + }, + queryZpool: { + url: baseUrl + "/zpool", + method: "GET", + cache: queryCache, + isArray: true, + params: { + profileFilter: "@profileFilter" + } + } + }); + + stockResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return stockResource; +}); diff --git a/src/dedicatedCloud/option/dedicatedCloud-option.service.js b/src/dedicatedCloud/option/dedicatedCloud-option.service.js new file mode 100644 index 00000000..fa54f38a --- /dev/null +++ b/src/dedicatedCloud/option/dedicatedCloud-option.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudOption", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudOptionV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/option/dedicatedCloud-option.v6.service.js b/src/dedicatedCloud/option/dedicatedCloud-option.v6.service.js new file mode 100644 index 00000000..fbabbad1 --- /dev/null +++ b/src/dedicatedCloud/option/dedicatedCloud-option.v6.service.js @@ -0,0 +1,47 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudOptionV6", function ($resource, $cacheFactory) { + "use strict"; + + var cache = $cacheFactory("OvhApiDedicatedCloudOptionV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + return response.data; + } + }; + + var baseURL = "/dedicatedCloud/:serviceName/:option"; + + var optionResource = $resource(baseURL, { + serviceName: "@serviceName", + option: "@option" + }, { + get: { method: "GET", cache: cache }, + canBeDisabled: { + url: baseURL + "/canBeDisabled", + method: "GET", + cache: cache + }, + canBeEnabled: { + url: baseURL + "/canBeEnabled", + method: "GET", + cache: cache + }, + disable: { + url: baseURL + "/disable", + method: "POST", + interceptor: interceptor + }, + enable: { + url: baseURL + "/enable", + method: "POST", + interceptor: interceptor + } + }); + + optionResource.resetCache = function () { + cache.removeAll(); + }; + + return optionResource; +}); diff --git a/src/dedicatedCloud/task/dedicatedCloud-task.service.js b/src/dedicatedCloud/task/dedicatedCloud-task.service.js new file mode 100644 index 00000000..38880dd9 --- /dev/null +++ b/src/dedicatedCloud/task/dedicatedCloud-task.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudTask", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudTaskV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/task/dedicatedCloud-task.v6.service.js b/src/dedicatedCloud/task/dedicatedCloud-task.v6.service.js new file mode 100644 index 00000000..714291b2 --- /dev/null +++ b/src/dedicatedCloud/task/dedicatedCloud-task.v6.service.js @@ -0,0 +1,52 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudTaskV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudTaskV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudTaskV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + queryCache.removeAll(); + return response.data; + } + }; + + var baseURL = "/dedicatedCloud/:serviceName/task/:taskId"; + + var taskResource = $resource(baseURL, { + serviceName: "@serviceName", + taskId: "@taskId" + }, { + get: { method: "GET", cache: cache }, + query: { + method: "GET", + cache: queryCache, + isArray: true, + params: { + name: "@name", + state: "@state" + } + }, + changeMaintenanceExecutionDate: { + url: baseURL + "/changeMaintenanceExecutionDate", + method: "POST", + interceptor: interceptor + }, + resetTaskState: { + url: baseURL + "/resetTaskState", + method: "POST", + interceptor: interceptor + } + }); + + taskResource.resetCache = function () { + cache.removeAll(); + }; + + taskResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return taskResource; +}); diff --git a/src/dedicatedCloud/user/dedicatedCloud-user.service.js b/src/dedicatedCloud/user/dedicatedCloud-user.service.js index 1a125851..42431c4d 100644 --- a/src/dedicatedCloud/user/dedicatedCloud-user.service.js +++ b/src/dedicatedCloud/user/dedicatedCloud-user.service.js @@ -4,6 +4,15 @@ angular.module("ovh-api-services").service("OvhApiDedicatedCloudUser", function return { v6: function () { return $injector.get("OvhApiDedicatedCloudUserV6"); + }, + ObjectRight: function () { + return $injector.get("OvhApiDedicatedCloudUserObjectRight"); + }, + Right: function () { + return $injector.get("OvhApiDedicatedCloudUserRight"); + }, + Task: function () { + return $injector.get("OvhApiDedicatedCloudUserTask"); } }; diff --git a/src/dedicatedCloud/user/dedicatedCloud-user.v6.service.js b/src/dedicatedCloud/user/dedicatedCloud-user.v6.service.js index 8781dbde..9a40f9c1 100644 --- a/src/dedicatedCloud/user/dedicatedCloud-user.v6.service.js +++ b/src/dedicatedCloud/user/dedicatedCloud-user.v6.service.js @@ -17,10 +17,21 @@ angular.module("ovh-api-services").service("OvhApiDedicatedCloudUserV6", functio userId: "@userId" }, { get: { method: "GET", cache: cache }, - query: { method: "GET", cache: queryCache, isArray: true }, + query: { + method: "GET", + cache: queryCache, + isArray: true, + params: { + name: "@name" + } + }, save: { method: "POST", interceptor: interceptor }, - put: { method: "PUT", interceptor: interceptor }, - "delete": { method: "DELETE", interceptor: interceptor } + "delete": { method: "DELETE", interceptor: interceptor }, + changeProperties: { + url: "/dedicatedCloud/:serviceName/user/:userId/changeProperties", + method: "POST", + interceptor: interceptor + } }); userResource.resetCache = function () { diff --git a/src/dedicatedCloud/user/objectRight/dedicatedCloud-user-objectRight.service.js b/src/dedicatedCloud/user/objectRight/dedicatedCloud-user-objectRight.service.js new file mode 100644 index 00000000..7ebb4278 --- /dev/null +++ b/src/dedicatedCloud/user/objectRight/dedicatedCloud-user-objectRight.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudUserObjectRight", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudUserObjectRightV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/user/objectRight/dedicatedCloud-user-objectRight.v6.service.js b/src/dedicatedCloud/user/objectRight/dedicatedCloud-user-objectRight.v6.service.js new file mode 100644 index 00000000..6368b79f --- /dev/null +++ b/src/dedicatedCloud/user/objectRight/dedicatedCloud-user-objectRight.v6.service.js @@ -0,0 +1,25 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudUserObjectRightV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudUserObjectRightV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudUserObjectRightV6"); + + var objectRightResource = $resource("/dedicatedCloud/:serviceName/user/:userId/objectRight/:objectRightId", { + serviceName: "@serviceName", + userId: "@userId", + rightId: "@objectRightId" + }, { + get: { method: "GET", cache: cache }, + query: { method: "GET", cache: queryCache, isArray: true } + }); + + objectRightResource.resetCache = function () { + cache.removeAll(); + }; + + objectRightResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return objectRightResource; +}); diff --git a/src/dedicatedCloud/user/right/dedicatedCloud-user-right.service.js b/src/dedicatedCloud/user/right/dedicatedCloud-user-right.service.js new file mode 100644 index 00000000..f4e6fa22 --- /dev/null +++ b/src/dedicatedCloud/user/right/dedicatedCloud-user-right.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudUserRight", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudUserRightV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/user/right/dedicatedCloud-user-right.v6.service.js b/src/dedicatedCloud/user/right/dedicatedCloud-user-right.v6.service.js new file mode 100644 index 00000000..af0e0e37 --- /dev/null +++ b/src/dedicatedCloud/user/right/dedicatedCloud-user-right.v6.service.js @@ -0,0 +1,34 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudUserRightV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudUserRightV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudUserRightV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + queryCache.removeAll(); + return response.data; + } + }; + + var userRightResource = $resource("/dedicatedCloud/:serviceName/user/:userId/right/:rightId", { + serviceName: "@serviceName", + userId: "@userId", + rightId: "@rightId" + }, { + get: { method: "GET", cache: cache }, + query: { method: "GET", cache: queryCache, isArray: true }, + put: { method: "PUT", interceptor: interceptor } + }); + + userRightResource.resetCache = function () { + cache.removeAll(); + }; + + userRightResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return userRightResource; +}); diff --git a/src/dedicatedCloud/user/task/dedicatedCloud-user-task.service.js b/src/dedicatedCloud/user/task/dedicatedCloud-user-task.service.js new file mode 100644 index 00000000..9d7245e9 --- /dev/null +++ b/src/dedicatedCloud/user/task/dedicatedCloud-user-task.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudUserTask", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudUserTaskV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/user/task/dedicatedCloud-user-task.v6.service.js b/src/dedicatedCloud/user/task/dedicatedCloud-user-task.v6.service.js new file mode 100644 index 00000000..e23a5407 --- /dev/null +++ b/src/dedicatedCloud/user/task/dedicatedCloud-user-task.v6.service.js @@ -0,0 +1,53 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudUserTaskV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudUserTaskV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudUserTaskV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + queryCache.removeAll(); + return response.data; + } + }; + + var baseURL = "/dedicatedCloud/:serviceName/user/:userId/task/:taskId"; + + var taskResource = $resource(baseURL, { + serviceName: "@serviceName", + userId: "@userId", + taskId: "@taskId" + }, { + get: { method: "GET", cache: cache }, + query: { + method: "GET", + cache: queryCache, + isArray: true, + params: { + name: "@name", + state: "@state" + } + }, + changeMaintenanceExecutionDate: { + url: baseURL + "/changeMaintenanceExecutionDate", + method: "POST", + interceptor: interceptor + }, + resetTaskState: { + url: baseURL + "/resetTaskState", + method: "POST", + interceptor: interceptor + } + }); + + taskResource.resetCache = function () { + cache.removeAll(); + }; + + taskResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return taskResource; +}); diff --git a/src/dedicatedCloud/vlan/dedicatedCloud-vlan.service.js b/src/dedicatedCloud/vlan/dedicatedCloud-vlan.service.js new file mode 100644 index 00000000..c2a9db81 --- /dev/null +++ b/src/dedicatedCloud/vlan/dedicatedCloud-vlan.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVlan", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudVlanV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/vlan/dedicatedCloud-vlan.v6.service.js b/src/dedicatedCloud/vlan/dedicatedCloud-vlan.v6.service.js new file mode 100644 index 00000000..bd6dd715 --- /dev/null +++ b/src/dedicatedCloud/vlan/dedicatedCloud-vlan.v6.service.js @@ -0,0 +1,24 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVlanV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudVlanV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudVlanV6"); + + var vlanResource = $resource("/dedicatedCloud/:serviceName/vlan/:vlanId", { + serviceName: "@serviceName", + vlandId: "@vlanId" + }, { + get: { method: "GET", cache: cache }, + query: { method: "GET", cache: queryCache, isArray: true } + }); + + vlanResource.resetCache = function () { + cache.removeAll(); + }; + + vlanResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return vlanResource; +}); diff --git a/src/dedicatedCloud/vmEncryption/dedicatedCloud-vmEncryption.service.js b/src/dedicatedCloud/vmEncryption/dedicatedCloud-vmEncryption.service.js new file mode 100644 index 00000000..b5b1fdf3 --- /dev/null +++ b/src/dedicatedCloud/vmEncryption/dedicatedCloud-vmEncryption.service.js @@ -0,0 +1,13 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVMEncryption", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudVMEncryptionV6"); + }, + kms: function () { + return $injector.get("OvhApiDedicatedCloudVMEncryptionKms"); + } + }; + +}); diff --git a/src/dedicatedCloud/vmEncryption/dedicatedCloud-vmEncryption.v6.service.js b/src/dedicatedCloud/vmEncryption/dedicatedCloud-vmEncryption.v6.service.js new file mode 100644 index 00000000..8c4c2bfd --- /dev/null +++ b/src/dedicatedCloud/vmEncryption/dedicatedCloud-vmEncryption.v6.service.js @@ -0,0 +1,17 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVMEncryptionV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudVMEncryptionV6Query"); + + var vmEncryptionResource = $resource("/dedicatedCloud/:serviceName/vmEncryption", { + serviceName: "@serviceName" + }, { + query: { method: "GET", cache: queryCache } + }); + + vmEncryptionResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return vmEncryptionResource; +}); diff --git a/src/dedicatedCloud/vmEncryption/kms/dedicatedCloud-vmEncryption.service.js b/src/dedicatedCloud/vmEncryption/kms/dedicatedCloud-vmEncryption.service.js new file mode 100644 index 00000000..26017504 --- /dev/null +++ b/src/dedicatedCloud/vmEncryption/kms/dedicatedCloud-vmEncryption.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVMEncryptionKms", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudVMEncryptionKmsV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/vmEncryption/kms/dedicatedCloud-vmEncryption.v6.service.js b/src/dedicatedCloud/vmEncryption/kms/dedicatedCloud-vmEncryption.v6.service.js new file mode 100644 index 00000000..faf3584f --- /dev/null +++ b/src/dedicatedCloud/vmEncryption/kms/dedicatedCloud-vmEncryption.v6.service.js @@ -0,0 +1,24 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVMEncryptionKmsV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudVMEncryptionKmsV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudVMEncryptionKmsV6"); + + var kmsResource = $resource("/dedicatedCloud/:serviceName/vmEncryption/kms/:kmsId", { + serviceName: "@serviceName", + kmsId: "@kmsId" + }, { + query: { method: "GET", cache: queryCache, isArray: true }, + get: { method: "GET", cache: cache } + }); + + kmsResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + kmsResource.resetCache = function () { + cache.removeAll(); + }; + + return kmsResource; +}); diff --git a/src/dedicatedCloud/vrack/dedicatedCloud-vrack.service.js b/src/dedicatedCloud/vrack/dedicatedCloud-vrack.service.js new file mode 100644 index 00000000..47afae8f --- /dev/null +++ b/src/dedicatedCloud/vrack/dedicatedCloud-vrack.service.js @@ -0,0 +1,10 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVRack", function ($injector) { + "use strict"; + + return { + v6: function () { + return $injector.get("OvhApiDedicatedCloudVRackV6"); + } + }; + +}); diff --git a/src/dedicatedCloud/vrack/dedicatedCloud-vrack.v6.service.js b/src/dedicatedCloud/vrack/dedicatedCloud-vrack.v6.service.js new file mode 100644 index 00000000..39f30701 --- /dev/null +++ b/src/dedicatedCloud/vrack/dedicatedCloud-vrack.v6.service.js @@ -0,0 +1,33 @@ +angular.module("ovh-api-services").service("OvhApiDedicatedCloudVRackV6", function ($resource, $cacheFactory) { + "use strict"; + + var queryCache = $cacheFactory("OvhApiDedicatedCloudVRackV6Query"); + var cache = $cacheFactory("OvhApiDedicatedCloudVRackV6"); + + var interceptor = { + response: function (response) { + cache.remove(response.config.url); + queryCache.removeAll(); + return response.data; + } + }; + + var vrackResource = $resource("/dedicatedCloud/:serviceName/vrack/:vrack", { + serviceName: "@serviceName", + vrack: "@vrack" + }, { + get: { method: "GET", cache: cache }, + query: { method: "GET", cache: queryCache, isArray: true }, + "delete": { method: "DELETE", interceptor: interceptor } + }); + + vrackResource.resetCache = function () { + cache.removeAll(); + }; + + vrackResource.resetQueryCache = function () { + queryCache.removeAll(); + }; + + return vrackResource; +});