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

Commit

Permalink
feat(cloud): add aapi kube route
Browse files Browse the repository at this point in the history
  • Loading branch information
marie-j committed Mar 26, 2019
1 parent b5e5a66 commit 7e37999
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 15 deletions.
41 changes: 41 additions & 0 deletions dist/ovh-api-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,9 @@ angular.module("ovh-api-services").service("OvhApiCloudProject", ["$injector", "
Ip: function () {
return $injector.get("OvhApiCloudProjectIp");
},
Kube: function () {
return $injector.get("OvhApiCloudProjectKube");
},
Region: function () {
return $injector.get("OvhApiCloudProjectRegion");
},
Expand Down Expand Up @@ -1474,6 +1477,44 @@ angular.module("ovh-api-services").service("OvhApiCloudProjectIplbV6", ["$resour

}]);

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

var cache = $cacheFactory("OvhApiCloudProjectKubeAapi");

var cloudProjectKubeResource = $resource("/cloud/project/:serviceName/kube", {
serviceName: "@serviceName"
}, {
query: {
method: "GET",
isArray: true,
serviceType: "aapi",
cache: cache
}
});

cloudProjectKubeResource.resetAllCache = function () {
cloudProjectKubeResource.resetCache();
};

cloudProjectKubeResource.resetCache = function () {
cache.removeAll();
};

return cloudProjectKubeResource;
}]);

angular.module("ovh-api-services").service("OvhApiCloudProjectKube", ["$injector", function ($injector) {
"use strict";

return {
Aapi: function () {
return $injector.get("OvhApiCloudProjectKubeAapi");
}
};

}]);

angular.module("ovh-api-services").service("OvhApiCloudProjectMigration", ["$injector", function ($injector) {

"use strict";
Expand Down
31 changes: 16 additions & 15 deletions dist/ovh-api-services.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/cloud/project/cloud-project.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ angular.module("ovh-api-services").service("OvhApiCloudProject", function ($inje
Ip: function () {
return $injector.get("OvhApiCloudProjectIp");
},
Kube: function () {
return $injector.get("OvhApiCloudProjectKube");
},
Region: function () {
return $injector.get("OvhApiCloudProjectRegion");
},
Expand Down
26 changes: 26 additions & 0 deletions src/cloud/project/kube/cloud-project-kube.aapi.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
angular.module("ovh-api-services").service("OvhApiCloudProjectKubeAapi", function ($cacheFactory, $resource) {
"use strict";

var cache = $cacheFactory("OvhApiCloudProjectKubeAapi");

var cloudProjectKubeResource = $resource("/cloud/project/:serviceName/kube", {
serviceName: "@serviceName"
}, {
query: {
method: "GET",
isArray: true,
serviceType: "aapi",
cache: cache
}
});

cloudProjectKubeResource.resetAllCache = function () {
cloudProjectKubeResource.resetCache();
};

cloudProjectKubeResource.resetCache = function () {
cache.removeAll();
};

return cloudProjectKubeResource;
});
10 changes: 10 additions & 0 deletions src/cloud/project/kube/cloud-project-kube.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
angular.module("ovh-api-services").service("OvhApiCloudProjectKube", function ($injector) {
"use strict";

return {
Aapi: function () {
return $injector.get("OvhApiCloudProjectKubeAapi");
}
};

});

0 comments on commit 7e37999

Please sign in to comment.