This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dedicatedCloud): add routes (#94)
- Loading branch information
1 parent
7d44fc2
commit c923ca8
Showing
44 changed files
with
893 additions
and
7 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
angular.module("ovh-api-services").service("OvhApiDedicatedCloudAllowedNetwork", function ($injector) { | ||
"use strict"; | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiDedicatedCloudAllowedNetworkV6"); | ||
} | ||
}; | ||
|
||
}); |
35 changes: 35 additions & 0 deletions
35
src/dedicatedCloud/allowedNetwork/dedicatedCloud-allowedNetwork.v6.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}); |
11 changes: 11 additions & 0 deletions
11
src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterBackup", function ($injector) { | ||
|
||
"use strict"; | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiDedicatedCloudDatacenterBackupV6"); | ||
} | ||
}; | ||
|
||
}); |
46 changes: 46 additions & 0 deletions
46
src/dedicatedCloud/datacenter/backup/dedicatedCloud-datacenter-backup.v6.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...edCloud/datacenter/disasterRecovery/dedicatedCloud-datacenter-disasterRecovery.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterDisasterRecovery", function ($injector) { | ||
|
||
"use strict"; | ||
|
||
return { | ||
Zerto: function () { | ||
return $injector.get("OvhApiDedicatedCloudDatacenterDisasterRecoveryZerto"); | ||
} | ||
}; | ||
|
||
}); |
11 changes: 11 additions & 0 deletions
11
...center/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
angular.module("ovh-api-services").service("OvhApiDedicatedCloudDatacenterDisasterRecoveryZerto", function ($injector) { | ||
|
||
"use strict"; | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiDedicatedCloudDatacenterDisasterRecoveryZertoV6"); | ||
} | ||
}; | ||
|
||
}); |
52 changes: 52 additions & 0 deletions
52
...ter/disasterRecovery/zerto/dedicatedCloud-datacenter-disasterRecovery-zerto.v6.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...atedCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
angular.module("ovh-api-services").service("OvhApiDedicatedCloudFederationActiveDirectory", function ($injector) { | ||
"use strict"; | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiDedicatedCloudFederationActiveDirectoryV6"); | ||
} | ||
}; | ||
|
||
}); |
24 changes: 24 additions & 0 deletions
24
...dCloud/federation/activeDirectory/dedicatedCloud-federation-activeDirectory.v6.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}); |
13 changes: 13 additions & 0 deletions
13
src/dedicatedCloud/federation/dedicatedCloud-federation.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} | ||
}; | ||
|
||
}); |
17 changes: 17 additions & 0 deletions
17
src/dedicatedCloud/federation/dedicatedCloud-federation.v6.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
angular.module("ovh-api-services").service("OvhApiDedicatedCloudIp", function ($injector) { | ||
"use strict"; | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiDedicatedCloudIpV6"); | ||
} | ||
}; | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}); |
19 changes: 19 additions & 0 deletions
19
src/dedicatedCloud/location/dedicatedCloud-location.service.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); | ||
} | ||
}; | ||
|
||
}); |
Oops, something went wrong.