\r
import com.att.eelf.configuration.EELFLogger;\r
import com.att.eelf.configuration.EELFManager;\r
+import com.fasterxml.jackson.databind.node.ObjectNode;\r
\r
import java.io.BufferedReader;\r
import java.io.DataOutputStream;\r
Date startTime = new Date();\r
LoggingUtils.setTargetContext("DCAE", "createNewDeployment");\r
try {\r
- String apiBodyString = "{\"serviceTypeId\": \"" + serviceTypeId + "\"}";\r
+ ObjectNode rootNode = (ObjectNode) refProp.getJsonTemplate("dcae.deployment.template");\r
+ ((ObjectNode) rootNode).put("serviceTypeId", serviceTypeId);\r
+ String apiBodyString = rootNode.toString();\r
+\r
logger.info("Dcae api Body String - " + apiBodyString);\r
String url = refProp.getStringValue("DCAE_DISPATCHER_URL") + "/dcae-deployments/" + deploymentId;\r
logger.info("Dcae Dispatcher Service url - " + url);\r
Global global = prop.getGlobal();\r
String invariantServiceUuid = global.getService();\r
List<String> resourceUuidList = global.getResourceVf();\r
- String serviceUuid = sdcCatalogServices.getServiceUuidFromServiceInvariantId(invariantServiceUuid);\r
String resourceUuid = "";\r
if (resourceUuidList != null && !resourceUuidList.isEmpty()) {\r
resourceUuid = resourceUuidList.get(0);\r
}\r
/* Invemtory service url is called in this method */\r
- isDcaeInfoAvailable = getDcaeInformation(artifactName, serviceUuid, resourceUuid);\r
+ isDcaeInfoAvailable = getDcaeInformation(artifactName, invariantServiceUuid, resourceUuid);\r
/* set dcae events */\r
dcaeEvent.setArtifactName(artifactName);\r
dcaeEvent.setEvent(DcaeEvent.EVENT_DISTRIBUTION);\r
throws IOException, ParseException {\r
Date startTime = new Date();\r
LoggingUtils.setTargetContext("DCAE", "getDcaeInformation");\r
- String queryString = "?sdcResourceId=" + resourceUuid + "&sdcServiceId=" + serviceUuid + "&typeName="\r
+ String queryString = "?asdcResourceId=" + resourceUuid + "&asdcServiceId=" + serviceUuid + "&typeName="\r
+ artifactName;\r
String fullUrl = refProp.getStringValue("DCAE_INVENTORY_URL") + "/dcae-service-types" + queryString;\r
logger.info("Dcae Inventory Service full url - " + fullUrl);\r
Tca tca = modelProperties.getType(Tca.class);
modelProperties.setCurrentModelElementId(tca.getId());
ObjectNode rootNode = (ObjectNode) refProp.getJsonTemplate("tca.policy.template", service);
- String policyName = refProp.getStringValue("tca.policyid.prefix") + modelProperties.getCurrentPolicyScopeAndPolicyName();
+ String policyName = modelProperties.getCurrentPolicyScopeAndPolicyName();
((ObjectNode) rootNode).put("policyName", policyName);
((ObjectNode) rootNode).put("description", "MicroService vCPE Policy");
((ObjectNode) rootNode.get("content")).replace("tca_policy", createPolicyContent(refProp, modelProperties, service, policyName, tca));
modelProperties.setCurrentModelElementId(tca.getId());
}
if (null == policyName) {
- policyName = refProp.getStringValue("tca.policyid.prefix") + modelProperties.getCurrentPolicyScopeAndPolicyName();
+ policyName = modelProperties.getCurrentPolicyScopeAndPolicyName();
}
ObjectNode rootNode = (ObjectNode) refProp.getJsonTemplate("tca.template", service);
((ObjectNode) rootNode.get("metricsPerEventName").get(0)).put("eventName", tca.getTcaItem().getEventName());
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
+import org.springframework.core.annotation.Order;
+import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;
/**
*
*/
@Component("CryptoUtils")
+@Order(Ordered.HIGHEST_PRECEDENCE)
public final class CryptoUtils {
public static final String AES = "AES";
public static final String KEY_PARAM = "org.onap.clamp.encryption.aes.key";
$scope
.cldsConfirmPerformAction("RESTART");
} else if (name == "Refresh Status") {
- $scope.cldsPerformAction("REFRESH");
+ $scope.refreshStatus();
} else if (name == "Properties CL") {
$scope.cldsOpenModelProperties();
} else if (name == "Deploy") {
// + data);
});
};
-
+ $scope.refreshStatus = function() {
+ var modelName = selected_model;
+ var svgXml = "";
+ console.log(abootDiagram.saveSVG({
+ format: true
+ }, function(err, xml) {
+ if (err)
+ console.log("error")
+ else
+ console.log(xml)
+ svgXml = xml;
+ }));
+ console.log("refreStatus modelName=" + modelName);
+ cldsModelService
+ .getModel(modelName)
+ .then(
+ function(pars) {
+ console
+ .log("refreStatus: pars=" +
+ pars);
+ cldsModelService
+ .processRefresh(pars);
+ },
+ function(data) {
+ });
+ };
$scope.cldsConfirmPerformAction = function(uiAction) {
var dlg = dialogs.confirm('Message',
'Do you want to ' +
#\r
dcae.template={"properties":{"service_name":"","service_ids":[],"vnf_ids":[],"location_ids":[]},"template":{"tca":{"dcae":{"inputTopic":"","outputTopic":"","closedLoopControlName":"","closedLoopEventClient":"configuration.dcae.microservice.tca.xml","policyName":"","policyScope":"service=vSCP;resource=F5;type=configuration","policyVersion":"v0.0.1","serviceConfigurations":{}}}}}\r
dcae.decode.service_ids={"vUSP":["vUSP - vCTS"],"Trinity":["ASBGv TLS VNF","ASBGv No TLS","ASBGv (NO TLS) VNF","ASBGv TLS","NSBGv VNF","NSBGv"],"vSCP":["AKRON_vSCP_F5_FW-SVC/vSCP_F5_FW 1","ALLEN_vSCP_F5_FW-SVC/vSCP_F5_FW 1"],"vProbes":["vProbes - FW"]}\r
+dcae.deployment.template={"serviceTypeId": "???", "inputs": {"aaiEnrichmentHost": "10.0.1.1", "enableAAIEnrichment": "true", "subscriberHostName" : "10.0.11.1", "publisherHostName" : "10.0.11.1"}}\r
#\r
# SDC request blueprint properties\r
#\r
#\r
dcae.template={"properties":{"service_name":"","service_ids":[],"vnf_ids":[],"location_ids":[]},"template":{"tca":{"dcae":{"inputTopic":"","outputTopic":"","closedLoopControlName":"","closedLoopEventClient":"configuration.dcae.microservice.tca.xml","policyName":"","policyScope":"service=vSCP;resource=F5;type=configuration","policyVersion":"v0.0.1","serviceConfigurations":{}}}}}\r
dcae.decode.service_ids={"vUSP":["vUSP - vCTS"],"Trinity":["ASBGv TLS VNF","ASBGv No TLS","ASBGv (NO TLS) VNF","ASBGv TLS","NSBGv VNF","NSBGv"],"vSCP":["AKRON_vSCP_F5_FW-SVC/vSCP_F5_FW 1","ALLEN_vSCP_F5_FW-SVC/vSCP_F5_FW 1"],"vProbes":["vProbes - FW"]}\r
+dcae.deployment.template={"serviceTypeId": "???", "inputs": {"aaiEnrichmentHost": "10.0.1.1", "enableAAIEnrichment": "true", "subscriberHostName" : "10.0.11.1", "publisherHostName" : "10.0.11.1"}}\r
#\r
# SDC request blueprint properties\r
#\r
subscriberMessageLimit: '-1', subscriberPollingInterval: '20000', subscriberProtocol: https,
subscriberTimeoutMS: '-1', subscriberTopicName: com.att.dcae.dmaap.mtnje2.DcaeTestVESSub,
subscriberUserName: m00502@tca.af.dcae.att.com, subscriberUserPassword: Te5021abc,
- tca_policy: '{"domain":"measurementsForVfScaling","metricsPerEventName":[{"eventName":"vFirewallBroadcastPackets","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_example_model01.ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_TCA_1jy9to4","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_null","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta","thresholdValue":123,"direction":"GREATER_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"},{"closedLoopControlName":"ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_null","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta","thresholdValue":123,"direction":"GREATER_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"}]}]}'}
+ tca_policy: '{"domain":"measurementsForVfScaling","metricsPerEventName":[{"eventName":"vFirewallBroadcastPackets","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"example_model01.ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_TCA_1jy9to4","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_null","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta","thresholdValue":123,"direction":"GREATER_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"},{"closedLoopControlName":"ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_null","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta","thresholdValue":123,"direction":"GREATER_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"}]}]}'}
artifact_name: dcae-analytics-tca
artifact_version: 1.0.0
connections:
"uuid": "test",
"policyScope": "resource=SampleResource,service=SampleService,type=SampleType,closedLoopControlName=ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
"templateVersion": "OpenSource.version.1",
- "policyName": "DCAE.Config_example_model01.ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_TCA_1jy9to4",
+ "policyName": "example_model01.ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_TCA_1jy9to4",
"description": "MicroService vCPE Policy",
"priority": "1",
"riskType": "SampleRiskType",
"eventName": "vFirewallBroadcastPackets",
"controlLoopSchemaType": "VNF",
"policyScope": "DCAE",
- "policyName": "DCAE.Config_example_model01.ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_TCA_1jy9to4",
+ "policyName": "example_model01.ClosedLoop_FRWL_SIG_fad4dcae_e498_11e6_852e_0050568c4ccf_TCA_1jy9to4",
"policyVersion": "v0.0.1",
"thresholds": [
{