summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/PolicyToscaService.js
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-04-26 14:04:20 +0200
committersebdet <sebastien.determe@intl.att.com>2021-04-26 15:12:08 +0200
commit4423d367c47d818493fbad627a43ba68f87d15f2 (patch)
tree77c5deabfa27dccd74f70ed0d45b7a77a9c56778 /ui-react/src/api/PolicyToscaService.js
parent48a2a182fe73768af38774df3596719ed2b087a1 (diff)
Remove dead code
Remove dead code due to change done to add tosca file to PEF directly. Issue-ID: POLICY-3229 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I4e48fd5401e304b131406b739268134dd7e7997f Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/api/PolicyToscaService.js')
-rw-r--r--ui-react/src/api/PolicyToscaService.js60
1 files changed, 2 insertions, 58 deletions
diff --git a/ui-react/src/api/PolicyToscaService.js b/ui-react/src/api/PolicyToscaService.js
index c54e768a9..e2a1f45e4 100644
--- a/ui-react/src/api/PolicyToscaService.js
+++ b/ui-react/src/api/PolicyToscaService.js
@@ -56,9 +56,9 @@ export default class PolicyToscaService {
console.error("getToscaPolicyModelYaml error received", error);
return "";
});
- }
+ }
- static getToscaPolicyModel(policyModelType, policyModelVersion) {
+ static getToscaPolicyModel(policyModelType, policyModelVersion) {
return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels/' + policyModelType + "/" + policyModelVersion, {
method: 'GET',
credentials: 'same-origin'
@@ -77,60 +77,4 @@ export default class PolicyToscaService {
return {};
});
}
-
- static createPolicyModelFromToscaModel(jsonData) {
- return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels', {
- method: 'POST',
- credentials: 'same-origin',
- headers: {
- "Content-Type": "a",
- },
- body: JSON.stringify(jsonData)
- })
- .then(function(response) {
- console.debug("createPolicyModelFromToscaModel response received: ", response.status);
- if (response.ok) {
- var message = {
- status: response.status,
- message: 'Tosca Policy Model successfully uploaded'
- };
- return message;
- } else {
- console.error("createPolicyModelFromToscaModel failed");
- return response.text();
- }
- })
- .catch(function(error) {
- console.error("createPolicyModelFromToscaModel error received", error);
- return "";
- });
- }
-
- static updatePolicyModelTosca(policyModelType, policyModelVersion, jsonData) {
- return fetch(window.location.pathname + 'restservices/clds/v2/policyToscaModels/' + policyModelType + '/' + policyModelVersion, {
- method: 'PUT',
- credentials: 'same-origin',
- headers: {
- "Content-Type": "a",
- },
- body: JSON.stringify(jsonData)
- })
- .then(function(response) {
- console.debug("updatePolicyModelTosca response received: ", response.status);
- if (response.ok) {
- var message = {
- status: response.status,
- message: 'Tosca Policy Model successfully uploaded'
- };
- return message;
- } else {
- console.error("updatePolicyModelTosca failed");
- return response.text();
- }
- })
- .catch(function(error) {
- console.error("updatePolicyModelTosca error received", error);
- return "";
- });
- }
}