From 68377161605e39c8c74ea77d0b504177480788f3 Mon Sep 17 00:00:00 2001 From: "Gao, Chenfei (cg287m)" Date: Thu, 22 Jun 2017 14:48:41 -0400 Subject: [POLICY-22] Reorganizing drools-apps Change-Id: I5f9bb3908f8d55c466dd847ae5e01a424e9ba364 Signed-off-by: Gao, Chenfei (cg287m) Signed-off-by: Pamela Dragosh --- sdnc/pom.xml | 51 -------------- .../org/openecomp/policy/sdnc/SDNCRequest.java | 42 ----------- .../openecomp/policy/sdnc/SDNCRequestHeader.java | 47 ------------- .../policy/sdnc/SDNCRequestInformation.java | 52 -------------- .../openecomp/policy/sdnc/SDNCRequestInput.java | 46 ------------ .../openecomp/policy/sdnc/SDNCVnfAssignments.java | 50 ------------- .../policy/sdnc/SDNCVnfTopologyIdentifier.java | 53 -------------- .../policy/sdnc/SDNCVnfTopologyInformation.java | 49 ------------- .../openecomp/policy/sdnc/util/Serialization.java | 32 --------- .../java/org/openecomp/policy/sdnc/TestDemo.java | 81 ---------------------- 10 files changed, 503 deletions(-) delete mode 100644 sdnc/pom.xml delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequest.java delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestHeader.java delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInformation.java delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInput.java delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfAssignments.java delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyIdentifier.java delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyInformation.java delete mode 100644 sdnc/src/main/java/org/openecomp/policy/sdnc/util/Serialization.java delete mode 100644 sdnc/src/test/java/org/openecomp/policy/sdnc/TestDemo.java (limited to 'sdnc') diff --git a/sdnc/pom.xml b/sdnc/pom.xml deleted file mode 100644 index e5ca2ee23..000000000 --- a/sdnc/pom.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 4.0.0 - - sdnc - - - org.openecomp.policy.drools-applications - drools-pdp-apps - 1.1.0-SNAPSHOT - - - - - junit - junit - 4.12 - provided - - - com.google.code.gson - gson - 2.5 - provided - - - org.openecomp.policy.drools-applications - rest - ${project.version} - - - diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequest.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequest.java deleted file mode 100644 index fe1588a5b..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequest.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; - -import java.io.Serializable; - -import com.google.gson.annotations.SerializedName; - -public class SDNCRequest implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3283942659786236032L; - - @SerializedName("input") - public SDNCRequestInput input; - - - - public SDNCRequest() { - } - -} diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestHeader.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestHeader.java deleted file mode 100644 index 84c3f3cdc..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestHeader.java +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; - -import java.io.Serializable; - -import com.google.gson.annotations.SerializedName; - -public class SDNCRequestHeader implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3283942659786236032L; - - @SerializedName("svc-request-id") - public String svcRequestId; - - @SerializedName("svc-notification-url") - public String svcNotificationUrl; - - @SerializedName("svc-action") - public String svcAction; - - - public SDNCRequestHeader() { - } - -} diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInformation.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInformation.java deleted file mode 100644 index b895b4afe..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInformation.java +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; - -import java.io.Serializable; - -import com.google.gson.annotations.SerializedName; - -public class SDNCRequestInformation implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3283942659786236032L; - - @SerializedName("request-id") - public String requestId; - - @SerializedName("order-version") - public String orderVersion; - - @SerializedName("notification-url") - public String notificationUrl; - - @SerializedName("order-number") - public String orderNumber; - - @SerializedName("request-action") - public String requestAction; - - public SDNCRequestInformation() { - } - -} diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInput.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInput.java deleted file mode 100644 index cecd0a268..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCRequestInput.java +++ /dev/null @@ -1,46 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; - -import java.io.Serializable; - -import com.google.gson.annotations.SerializedName; - -public class SDNCRequestInput implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3283942659786236032L; - - @SerializedName("vnf-topology-information") - public SDNCVnfTopologyInformation vnfTopolgyInformation; - - @SerializedName("request-information") - public SDNCRequestInformation requestInformation; - - @SerializedName("sdnc-request-header") - public SDNCRequestHeader requestHeader; - - public SDNCRequestInput() { - } - -} diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfAssignments.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfAssignments.java deleted file mode 100644 index 8a32c2121..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfAssignments.java +++ /dev/null @@ -1,50 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; - -import java.io.Serializable; -import java.util.LinkedList; -import java.util.List; - -import com.google.gson.annotations.SerializedName; - -public class SDNCVnfAssignments implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3283942659786236032L; - - - @SerializedName("availability-zones") - public List availabilityZones = new LinkedList(); - - - @SerializedName("vnf-networks") - public List vnfNetworks = new LinkedList(); - - @SerializedName("vnf-vms") - public List vnfVms = new LinkedList(); - - public SDNCVnfAssignments() { - } - -} diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyIdentifier.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyIdentifier.java deleted file mode 100644 index 5b31bd1b2..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyIdentifier.java +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; - -import java.io.Serializable; - -import com.google.gson.annotations.SerializedName; - -public class SDNCVnfTopologyIdentifier implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3283942659786236032L; - - @SerializedName("service-type") - public String serviceType; - - @SerializedName("vnf-name") - public String vnfName; - - @SerializedName("vnf-type") - public String vnfType; - - @SerializedName("generic-vnf-name") - public String genericVnfName; - - @SerializedName("generic-vnf-type") - public String genericVnfType; - - - public SDNCVnfTopologyIdentifier() { - } - -} diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyInformation.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyInformation.java deleted file mode 100644 index 5b3ae2685..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/SDNCVnfTopologyInformation.java +++ /dev/null @@ -1,49 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; - -import java.io.Serializable; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import com.google.gson.annotations.SerializedName; - -public class SDNCVnfTopologyInformation implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3283942659786236032L; - - @SerializedName("vnf-topology-identifier") - public SDNCVnfTopologyIdentifier vnfTopologyIdentifier; - - @SerializedName("vnf-assignments") - public SDNCVnfAssignments vnfAssignments; - - @SerializedName("vnf-parameters") - public List> vnfParameters = new LinkedList>(); - - public SDNCVnfTopologyInformation() { - } - -} diff --git a/sdnc/src/main/java/org/openecomp/policy/sdnc/util/Serialization.java b/sdnc/src/main/java/org/openecomp/policy/sdnc/util/Serialization.java deleted file mode 100644 index 4cc2fb586..000000000 --- a/sdnc/src/main/java/org/openecomp/policy/sdnc/util/Serialization.java +++ /dev/null @@ -1,32 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc.util; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -public final class Serialization { - - final static public Gson gsonPretty = new GsonBuilder().disableHtmlEscaping() - .setPrettyPrinting() - .create(); - -} diff --git a/sdnc/src/test/java/org/openecomp/policy/sdnc/TestDemo.java b/sdnc/src/test/java/org/openecomp/policy/sdnc/TestDemo.java deleted file mode 100644 index 4a616fbfb..000000000 --- a/sdnc/src/test/java/org/openecomp/policy/sdnc/TestDemo.java +++ /dev/null @@ -1,81 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * sdnc - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. 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.openecomp.policy.sdnc; -import java.util.HashMap; -import java.util.Map; - -import org.junit.Test; -import org.openecomp.policy.sdnc.SDNCRequest; -import org.openecomp.policy.sdnc.util.Serialization; - -public class TestDemo { - - @Test - public void test() { - - SDNCRequest request = new SDNCRequest(); - request.input = new SDNCRequestInput(); - request.input.requestHeader = new SDNCRequestHeader(); - request.input.vnfTopolgyInformation = new SDNCVnfTopologyInformation(); - request.input.vnfTopolgyInformation.vnfTopologyIdentifier = new SDNCVnfTopologyIdentifier(); - request.input.vnfTopolgyInformation.vnfAssignments = new SDNCVnfAssignments(); - request.input.requestInformation = new SDNCRequestInformation(); - - request.input.vnfTopolgyInformation.vnfTopologyIdentifier.serviceType = "my_serviceType"; - request.input.vnfTopolgyInformation.vnfTopologyIdentifier.vnfName = "my_vnfName"; - request.input.vnfTopolgyInformation.vnfTopologyIdentifier.vnfType = "my_vnfType"; - request.input.vnfTopolgyInformation.vnfTopologyIdentifier.genericVnfName = "my_genericVnfName"; - request.input.vnfTopolgyInformation.vnfTopologyIdentifier.genericVnfType = "my_genericVnfType"; - - request.input.vnfTopolgyInformation.vnfAssignments.availabilityZones.add("zone1"); - request.input.vnfTopolgyInformation.vnfAssignments.availabilityZones.add("zone2"); - request.input.vnfTopolgyInformation.vnfAssignments.vnfNetworks.add("network1"); - request.input.vnfTopolgyInformation.vnfAssignments.vnfNetworks.add("network2"); - request.input.vnfTopolgyInformation.vnfAssignments.vnfVms.add("vnfVm1"); - request.input.vnfTopolgyInformation.vnfAssignments.vnfVms.add("vnfVm2"); - - Map vnfParams1 = new HashMap(); - vnfParams1.put("name1", "value1"); - request.input.vnfTopolgyInformation.vnfParameters.add(vnfParams1); - - Map vnfParams2 = new HashMap(); - vnfParams2.put("name2", "value2"); - request.input.vnfTopolgyInformation.vnfParameters.add(vnfParams2); - - - request.input.requestInformation.requestId = "ff5256d1-5a33-55df-13ab-12abad84e7ff"; - request.input.requestInformation.orderNumber = "1"; - request.input.requestInformation.orderVersion = "1"; - request.input.requestInformation.notificationUrl = "sdnc.myDomain.com"; - request.input.requestInformation.requestAction = "PreloadVNFRequest"; - - request.input.requestHeader.svcRequestId = "ff5256d1-5a33-55df-13ab-12abad84e7ff"; - request.input.requestHeader.svcNotificationUrl = "some_url.myDomain.com:8080"; - request.input.requestHeader.svcAction = "reserve"; - - String body = Serialization.gsonPretty.toJson(request); - System.out.println(body); - - - - } - -} -- cgit 1.2.3-korg