Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat(iplb): add out in quota
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Manson committed Oct 5, 2017
1 parent dc5a13e commit f0e077d
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 15 deletions.
29 changes: 26 additions & 3 deletions dist/ovh-api-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -4588,15 +4588,38 @@ angular.module("ovh-api-services").service("OvhApiIpLoadBalancing", ["$injector"
};
}]);

angular.module("ovh-api-services").service("OvhApiIpLoadBalancingQuotaLexi", ["$resource", function ($resource) {
angular.module("ovh-api-services").service("OvhApiIpLoadBalancingQuotaLexi", ["$resource", "$cacheFactory", function ($resource, $cacheFactory) {
"use strict";

var ipLoadBalancingTask = $resource("/ipLoadbalancing/:serviceName/quota/:zoneName", {
var cache = $cacheFactory("OvhApiIpLoadBalancingQuotaLexi");
var queryCache = $cacheFactory("OvhApiIpLoadBalancingQuotaLexiQuery");

var interceptor = {
response: function (response) {
cache.remove(response.config.url);
queryCache.removeAll();
return response.resource;
}
};

var ipLoadBalancingQuota = $resource("/ipLoadbalancing/:serviceName/quota/:zoneName", {
serviceName: "@serviceName",
zoneName: "@zoneName"
}, {
query: { method: "GET", isArray: true, cache: queryCache },
get: { method: "GET", cache: cache },
put: { method: "PUT", interceptor: interceptor }
});

return ipLoadBalancingTask;
ipLoadBalancingQuota.resetCache = function () {
cache.removeAll();
};

ipLoadBalancingQuota.resetQueryCache = function () {
queryCache.removeAll();
};

return ipLoadBalancingQuota;
}]);

angular.module("ovh-api-services").service("OvhApiIpLoadBalancingQuota", ["$injector", function ($injector) {
Expand Down
Loading

0 comments on commit f0e077d

Please sign in to comment.