/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2019 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
import org.onap.policy.common.endpoints.http.client.HttpClientFactoryInstance;
import org.onap.policy.common.endpoints.parameters.RestServerParameters;
import org.onap.policy.common.endpoints.parameters.TopicParameterGroup;
-import org.onap.policy.common.gson.GsonMessageBodyHandler;
import org.onap.policy.common.utils.network.NetworkUtil;
import org.onap.policy.common.utils.resources.ResourceUtils;
import org.onap.policy.models.decisions.concepts.DecisionRequest;
import org.onap.policy.models.errors.concepts.ErrorResponse;
import org.onap.policy.pdpx.main.PolicyXacmlPdpException;
import org.onap.policy.pdpx.main.parameters.CommonTestData;
+import org.onap.policy.pdpx.main.parameters.XacmlApplicationParameters;
import org.onap.policy.pdpx.main.parameters.XacmlPdpParameterGroup;
import org.onap.policy.pdpx.main.startstop.Main;
import org.onap.policy.pdpx.main.startstop.XacmlPdpActivator;
//
RestServerParameters rest =
testData.toObject(testData.getRestServerParametersMap(port), RestServerParameters.class);
- RestServerParameters policyApiParameters =
- testData.toObject(testData.getPolicyApiParametersMap(false), RestServerParameters.class);
+ BusTopicParams policyApiParameters =
+ testData.toObject(testData.getPolicyApiParametersMap(false), BusTopicParams.class);
TopicParameterGroup topicParameterGroup =
testData.toObject(testData.getTopicParametersMap(false), TopicParameterGroup.class);
+ final XacmlApplicationParameters xacmlApplicationParameters =
+ testData.toObject(testData.getXacmlapplicationParametersMap(false,
+ apps.getAbsolutePath().toString()), XacmlApplicationParameters.class);
XacmlPdpParameterGroup params =
- new XacmlPdpParameterGroup("XacmlPdpParameters", "XacmlPdpGroup", rest, policyApiParameters,
- topicParameterGroup, apps.getAbsolutePath());
+ new XacmlPdpParameterGroup("XacmlPdpParameters", "XacmlPdpGroup", "xacml", rest, policyApiParameters,
+ topicParameterGroup, xacmlApplicationParameters);
final Gson gson = new GsonBuilder().create();
File fileParams = appsFolder.newFile("params.json");
String jsonParams = gson.toJson(params);
private static HttpClient getNoAuthHttpClient() throws HttpClientConfigException {
return HttpClientFactoryInstance.getClientFactory().build(BusTopicParams.builder()
.clientName("testDecisionClient")
- .serializationProvider(GsonMessageBodyHandler.class.getName())
.useHttps(false).allowSelfSignedCerts(false).hostname("localhost").port(port)
.basePath("policy/pdpx/v1")
.userName("healthcheck").password("zb!XztG34").managed(true).build());