Changes include Metadata support, Upload tosca policy model and Loop Template
CLAMP Metadata support to parse policy_model_type, acronym and clamp_possible_values from the Tosca Policy Model
UI and Backend changes to support Loop Template
Backend APIs for Dictionary referenced in the Tosca Policy Model.
Upload Tosca Model UI changes to allow user to upload policy models.
DB Schema changes for the Loop Element Model and updated schema for the Dictionary
Added Jest test cases and snapshots
checkstyle issues fix and Junits
Issue-ID: CLAMP-580
Signed-off-by: ash74268 <ashwin.shyam.sharma@att.com>
Change-Id: I57521bc1c3afaf4ca5a2acf4c59823df05fd4cd6
Signed-off-by: ash74268 <ashwin.shyam.sharma@att.com>
diff --git a/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js b/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js
index 1445e88..952e888 100644
--- a/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js
+++ b/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP CLAMP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights
+ * Copyright (C) 2020 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,12 +39,12 @@
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -60,11 +60,12 @@
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -95,12 +96,12 @@
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -108,12 +109,12 @@
const component = shallow(<ViewToscaPolicyModal/>);
component.setState({ toscaNames: {
"index": "1",
- "toscaModelYaml": "MTCA",
- "toscaModelName": "DCAE_MTCAConfig",
- "version" : "16",
- "userId" : "aj928f",
- "policyType" : "mtca",
- "lastUpdatedDate" : "05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
}
});
expect(component).toMatchSnapshot();
@@ -127,12 +128,12 @@
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -149,17 +150,17 @@
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym":"TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
});
- const yamlContent = 'MTCA Tosca model details';
+ const yamlContent = 'TCA Tosca model details';
const component = shallow(<ViewToscaPolicyModal/>);
component.find('[value="Please select Tosca model to view the details"]').prop('onChange')({ target: { value: yamlContent }});
expect(component.state('content')).toEqual(yamlContent);
@@ -173,12 +174,12 @@
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});