diff options
author | Jim Hahn <jrh3@att.com> | 2019-05-08 14:33:57 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2019-05-08 16:24:35 -0400 |
commit | 10b21aae2bde224ab7f91f4b5ab1b89369c8fd1c (patch) | |
tree | 0417099e379e8be69f90221e8fd066fc40def62b /controlloop/common/model-impl/sdnc/src/main | |
parent | 01841878936986bc80a974977ccdeaceaf7f9a78 (diff) |
Add payload to vFW policy yaml
Added new "streams" payload to vFW policy yaml files.
Removed references to pg-streams.
Also deleted directories that were moved to policy/models.
Also removed references to trafficgenerator.
Updated licenses.
Removed some trailing whitespace.
Change-Id: I6becaa573628eee677f0959fadf86f9a9f032f88
Issue-ID: POLICY-1752
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/model-impl/sdnc/src/main')
16 files changed, 0 insertions, 961 deletions
diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java deleted file mode 100644 index 4039d9441..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealNetworkInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealNetworkInfo implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("network-id") - private String networkId; - - public SdncHealNetworkInfo() { - // Default constructor for SdncHealActionVmInfo - } - - public String getNetworkId() { - return networkId; - } - - public void setNetworkId(String networkId) { - this.networkId = networkId; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java deleted file mode 100644 index 983084878..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequest.java +++ /dev/null @@ -1,98 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealRequest implements Serializable { - - private static final long serialVersionUID = -7341931593089709247L; - - @SerializedName("sdnc-request-header") - private SdncHealRequestHeaderInfo requestHeaderInfo; - - @SerializedName("request-information") - private SdncHealRequestInfo requestInfo; - - @SerializedName("service-information") - private SdncHealServiceInfo serviceInfo; - - @SerializedName("network-information") - private SdncHealNetworkInfo networkInfo; - - @SerializedName("vnf-information") - private SdncHealVnfInfo vnfInfo; - - @SerializedName("vf-module-request-input") - private SdncHealVfModuleRequestInput vfModuleRequestInput; - - public SdncHealRequest() { - // Default constructor for SdncHealRequest - } - - public SdncHealRequestHeaderInfo getRequestHeaderInfo() { - return requestHeaderInfo; - } - - public void setRequestHeaderInfo(SdncHealRequestHeaderInfo requestHeaderInfo) { - this.requestHeaderInfo = requestHeaderInfo; - } - - public SdncHealRequestInfo getRequestInfo() { - return requestInfo; - } - - public void setRequestInfo(SdncHealRequestInfo requestInfo) { - this.requestInfo = requestInfo; - } - - public SdncHealServiceInfo getServiceInfo() { - return serviceInfo; - } - - public void setServiceInfo(SdncHealServiceInfo serviceInfo) { - this.serviceInfo = serviceInfo; - } - - public SdncHealNetworkInfo getNetworkInfo() { - return networkInfo; - } - - public void setNetworkInfo(SdncHealNetworkInfo networkInfo) { - this.networkInfo = networkInfo; - } - - public SdncHealVnfInfo getVnfInfo() { - return vnfInfo; - } - - public void setVnfInfo(SdncHealVnfInfo vnfInfo) { - this.vnfInfo = vnfInfo; - } - - public SdncHealVfModuleRequestInput getVfModuleRequestInput() { - return vfModuleRequestInput; - } - - public void setVfModuleRequestInput(SdncHealVfModuleRequestInput input) { - this.vfModuleRequestInput = input; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java deleted file mode 100644 index 97426b40e..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestHeaderInfo.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealRequestHeaderInfo implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("svc-request-id") - private String svcRequestId; - - @SerializedName("svc-action") - private String svcAction; - - public SdncHealRequestHeaderInfo() { - // Default constructor for SdncHealActionVmInfo - } - - public String getSvcRequestId() { - return svcRequestId; - } - - public void setSvcRequestId(String svcRequestId) { - this.svcRequestId = svcRequestId; - } - - public String getSvcAction() { - return svcAction; - } - - public void setSvcAction(String svcAction) { - this.svcAction = svcAction; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java deleted file mode 100644 index 91de4b2d2..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealRequestInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealRequestInfo implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("request-action") - private String requestAction; - - public SdncHealRequestInfo() { - // Default constructor for SdncHealActionVmInfo - } - - public String getRequestAction() { - return requestAction; - } - - public void setRequestAction(String requestAction) { - this.requestAction = requestAction; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java deleted file mode 100644 index d86d32fea..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealServiceInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealServiceInfo implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("service-instance-id") - private String serviceInstanceId; - - public SdncHealServiceInfo() { - // Default constructor for SdncHealActionVmInfo - } - - public String getServiceInstanceId() { - return serviceInstanceId; - } - - public void setServiceInstanceId(String serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java deleted file mode 100644 index 0ad772301..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParameter.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealVfModuleParameter implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("name") - private String name; - - @SerializedName("value") - private String value; - - public SdncHealVfModuleParameter() { - // Default constructor for SdncHealVfModuleParameter - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java deleted file mode 100644 index 0463c6a5a..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleParametersInfo.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; -import java.util.LinkedList; -import java.util.List; - -public class SdncHealVfModuleParametersInfo implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("param") - private List<SdncHealVfModuleParameter> parameters; - - public SdncHealVfModuleParametersInfo() { - // Default constructor for SdncHealVfModuleParametersInfo - parameters = new LinkedList<>(); - } - - public List<SdncHealVfModuleParameter> getParameters() { - return parameters; - } - - public void setParameters(List<SdncHealVfModuleParameter> parameters) { - this.parameters = parameters; - } - - public void addParameters(SdncHealVfModuleParameter parameter) { - parameters.add(parameter); - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java deleted file mode 100644 index 98cfc7ee7..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVfModuleRequestInput.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealVfModuleRequestInput implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("vf-module-input-parameters") - private SdncHealVfModuleParametersInfo vfModuleParametersInfo; - - public SdncHealVfModuleRequestInput() { - // Default constructor for SdncHealVfModuleRequestInput - } - - public SdncHealVfModuleParametersInfo getVfModuleParametersInfo() { - return vfModuleParametersInfo; - } - - public void setVfModuleParametersInfo(SdncHealVfModuleParametersInfo info) { - this.vfModuleParametersInfo = info; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java deleted file mode 100644 index 16a6203ec..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncHealVnfInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncHealVnfInfo implements Serializable { - - private static final long serialVersionUID = 3208673205100673119L; - - @SerializedName("vnf-id") - private String vnfId; - - public SdncHealVnfInfo() { - // Default constructor for SdncHealVnfInfo - } - - public String getVnfId() { - return vnfId; - } - - public void setVnfId(String vnfId) { - this.vnfId = vnfId; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java deleted file mode 100644 index c5ce6b295..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncManager.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 Samsung Electronics Co., Ltd. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - - -import com.google.gson.JsonSyntaxException; - -import java.util.HashMap; -import java.util.Map; - -import org.drools.core.WorkingMemory; -import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure; -import org.onap.policy.common.endpoints.utils.NetLoggerUtil; -import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; -import org.onap.policy.drools.system.PolicyEngine; -import org.onap.policy.rest.RestManager; -import org.onap.policy.rest.RestManager.Pair; -import org.onap.policy.sdnc.util.Serialization; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public final class SdncManager implements Runnable { - - private String sdncUrlBase; - private String username; - private String password; - private SdncRequest sdncRequest; - private WorkingMemory workingMem; - private static final Logger logger = LoggerFactory.getLogger(SdncManager.class); - - // The REST manager used for processing REST calls for this Sdnc manager - private RestManager restManager; - - /** - * Constructor. - * - * @param wm Drools working memory - * @param request request - */ - public SdncManager(WorkingMemory wm, SdncRequest request) { - if (wm == null || request == null) { - throw new IllegalArgumentException( - "the parameters \"wm\" and \"request\" on the SdncManager constructor may not be null" - ); - } - workingMem = wm; - sdncRequest = request; - - restManager = new RestManager(); - - setSdncParams(getPeManagerEnvProperty("sdnc.url"), getPeManagerEnvProperty("sdnc.username"), - getPeManagerEnvProperty("sdnc.password")); - } - - /** - * Set the parameters. - * - * @param baseUrl base URL - * @param name username - * @param pwd password - */ - public void setSdncParams(String baseUrl, String name, String pwd) { - sdncUrlBase = baseUrl; - username = name; - password = pwd; - } - - @Override - public void run() { - Map<String, String> headers = new HashMap<>(); - Pair<Integer, String> httpDetails; - - SdncResponse responseError = new SdncResponse(); - SdncResponseOutput responseOutput = new SdncResponseOutput(); - responseOutput.setResponseCode("404"); - responseError.setResponseOutput(responseOutput); - - headers.put("Accept", "application/json"); - String sdncUrl = sdncUrlBase + sdncRequest.getUrl(); - - try { - String sdncRequestJson = Serialization.gsonPretty.toJson(sdncRequest); - NetLoggerUtil.log(EventType.OUT, CommInfrastructure.REST, sdncUrl, sdncRequestJson); - logger.info("[OUT|{}|{}|]{}{}", CommInfrastructure.REST, sdncUrl, NetLoggerUtil.SYSTEM_LS, sdncRequestJson); - - httpDetails = restManager.post(sdncUrl, username, password, headers, "application/json", - sdncRequestJson); - } catch (Exception e) { - logger.info(e.getMessage(), e); - workingMem.insert(responseError); - return; - } - - if (httpDetails == null) { - workingMem.insert(responseError); - return; - } - - try { - SdncResponse response = Serialization.gsonPretty.fromJson(httpDetails.second, SdncResponse.class); - NetLoggerUtil.log(EventType.IN, CommInfrastructure.REST, sdncUrl, httpDetails.second); - logger.info("[IN|{}|{}|]{}{}", "Sdnc", sdncUrl, NetLoggerUtil.SYSTEM_LS, httpDetails.second); - String body = Serialization.gsonPretty.toJson(response); - logger.info("Response to Sdnc Heal post:"); - logger.info(body); - response.setRequestId(sdncRequest.getRequestId().toString()); - - if (!response.getResponseOutput().getResponseCode().equals("200")) { - logger.info( - "Sdnc Heal Restcall failed with http error code {} {}", httpDetails.first, httpDetails.second - ); - } - - workingMem.insert(response); - } catch (JsonSyntaxException e) { - logger.info("Failed to deserialize into SdncResponse {}", e.getLocalizedMessage(), e); - } catch (Exception e) { - logger.info("Unknown error deserializing into SdncResponse {}", e.getLocalizedMessage(), e); - } - } - - /** - * Protected setter for rest manager to allow mocked rest manager to be used for testing. - * @param restManager the test REST manager - */ - protected void setRestManager(final RestManager restManager) { - this.restManager = restManager; - } - - /** - * This method reads and validates environmental properties coming from the policy engine. Null properties cause - * an {@link IllegalArgumentException} runtime exception to be thrown - * @param enginePropertyName name of the parameter to retrieve - * @return the property value - */ - - private String getPeManagerEnvProperty(String enginePropertyName) { - String enginePropertyValue = PolicyEngine.manager.getEnvironmentProperty(enginePropertyName); - if (enginePropertyValue == null) { - throw new IllegalArgumentException( - "The value of policy engine manager environment property \"" - + enginePropertyName + "\" may not be null" - ); - } - return enginePropertyValue; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java deleted file mode 100644 index 7590c0da4..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncRequest.java +++ /dev/null @@ -1,72 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018-2019 Huawei Technologies Co., Ltd. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; -import java.util.UUID; - -public class SdncRequest implements Serializable { - - private static final long serialVersionUID = 3736300970326332512L; - // These fields are not serialized and not part of JSON - private transient String nsInstanceId; - private transient UUID requestId; - private transient String url; - - @SerializedName("input") - private SdncHealRequest healRequest; - - public SdncRequest() { - // Default constructor for SdncRequest - } - - public String getNsInstanceId() { - return nsInstanceId; - } - - public void setNsInstanceId(String nsInstanceId) { - this.nsInstanceId = nsInstanceId; - } - - public UUID getRequestId() { - return requestId; - } - - public void setRequestId(UUID requestId) { - this.requestId = requestId; - } - - public SdncHealRequest getHealRequest() { - return healRequest; - } - - public void setHealRequest(SdncHealRequest healRequest) { - this.healRequest = healRequest; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java deleted file mode 100644 index c0f244413..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponse.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncResponse implements Serializable { - - private static final long serialVersionUID = 9151443891238218455L; - - @SerializedName("output") - private SdncResponseOutput responseOutput; - - private transient String requestId; - - public SdncResponse() { - // Default constructor for SdncResponse - } - - public String getRequestId() { - return requestId; - } - - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - public SdncResponseOutput getResponseOutput() { - return responseOutput; - } - - public void setResponseOutput(SdncResponseOutput responseOutput) { - this.responseOutput = responseOutput; - } - -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java deleted file mode 100644 index 75582ff45..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseNetworkInfo.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncResponseNetworkInfo implements Serializable { - - private static final long serialVersionUID = 6827782899144150158L; - - @SerializedName("instance-id") - private String instanceId; - - @SerializedName("object-path") - private String objectPath; - - public SdncResponseNetworkInfo() { - // Default constructor for SdncResponseNetworkInfo - } - - public String getInstanceId() { - return instanceId; - } - - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; - } - - public String getObjectPath() { - return objectPath; - } - - public void setObjectPath(String objectPath) { - this.objectPath = objectPath; - } -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java deleted file mode 100644 index 48acc5e9a..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseOutput.java +++ /dev/null @@ -1,67 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; -import java.util.List; - -public class SdncResponseOutput implements Serializable { - - private static final long serialVersionUID = 6827782899144150158L; - - @SerializedName("svc-request-id") - private String svcRequestId; - - @SerializedName("response-code") - private String responseCode; - - @SerializedName("ack-final-indicator") - private String ackFinalIndicator; - - public SdncResponseOutput() { - // Default constructor for SdncResponseDescriptor - } - - public String getSvcRequestId() { - return svcRequestId; - } - - public void setSvcRequestId(String svcRequestId) { - this.svcRequestId = svcRequestId; - } - - public String getResponseCode() { - return responseCode; - } - - public void setResponseCode(String responseCode) { - this.responseCode = responseCode; - } - - public String getAckFinalIndicator() { - return ackFinalIndicator; - } - - public void setAckFinalIndicator(String ackFinalIndicator) { - this.ackFinalIndicator = ackFinalIndicator; - } - -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java deleted file mode 100644 index 745ba2475..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/SdncResponseServiceInfo.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc; - -import com.google.gson.annotations.SerializedName; - -import java.io.Serializable; - -public class SdncResponseServiceInfo implements Serializable { - - private static final long serialVersionUID = 6827782899144150158L; - - @SerializedName("instance-id") - private String instanceId; - - public SdncResponseServiceInfo() { - // Default constructor for SdncResponseServiceInfo - } - - public String getInstanceId() { - return instanceId; - } - - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; - } - -} diff --git a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java b/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java deleted file mode 100644 index 260407af2..000000000 --- a/controlloop/common/model-impl/sdnc/src/main/java/org/onap/policy/sdnc/util/Serialization.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2018 Huawei Corp. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.sdnc.util; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -public final class Serialization { - private Serialization() { - } - - public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping() - .setPrettyPrinting() - .create(); - -} |