summaryrefslogtreecommitdiffstats
path: root/main/src/test/resources
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-04-05 09:52:35 -0400
committerJim Hahn <jrh3@att.com>2019-04-05 11:51:26 -0400
commit287e9d464e487ed5ae5fe5250ab960194f179c01 (patch)
tree4e1d9295b308f4328c894bafe2190c0728089f46 /main/src/test/resources
parent457c9b19c058877ca59c9b0826d22f3f97392daf (diff)
Flesh out policy deployment REST API
Also moved the controller, the provider, and supporting classes to their own dep_undep package. Change-Id: Ifea1c4dd2ecbf93a8f4d45e130830cf9271103d3 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'main/src/test/resources')
-rw-r--r--main/src/test/resources/simpleDeploy/daoPolicyList.json10
-rw-r--r--main/src/test/resources/simpleDeploy/emptyGroups.json3
-rw-r--r--main/src/test/resources/simpleDeploy/emptyRequest.json3
-rw-r--r--main/src/test/resources/simpleDeploy/emptyRequestBase.json2
-rw-r--r--main/src/test/resources/simpleDeploy/getGroupDao.json84
-rw-r--r--main/src/test/resources/simpleDeploy/getPolicyReqNullVersion.json7
-rw-r--r--main/src/test/resources/simpleDeploy/groups.json25
-rw-r--r--main/src/test/resources/simpleDeploy/policy.json6
-rw-r--r--main/src/test/resources/simpleDeploy/request.json8
-rw-r--r--main/src/test/resources/simpleDeploy/requestBase.json4
-rw-r--r--main/src/test/resources/simpleDeploy/updateGroupReqMultiple.json20
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroupDao.json72
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroupGroup1.json40
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroupGroup2.json25
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroupPolicy2.json10
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroupPolicy3.json10
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroupPolicy4.json10
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroup_NoPdpsDao.json21
-rw-r--r--main/src/test/resources/simpleDeploy/upgradeGroup_NothingUpdatedDao.json25
19 files changed, 385 insertions, 0 deletions
diff --git a/main/src/test/resources/simpleDeploy/daoPolicyList.json b/main/src/test/resources/simpleDeploy/daoPolicyList.json
new file mode 100644
index 00000000..93ee9146
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/daoPolicyList.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "name": "policyA",
+ "version": "1.2.3",
+ "type": "typeA",
+ "typeVersion": "100.2.3"
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/emptyGroups.json b/main/src/test/resources/simpleDeploy/emptyGroups.json
new file mode 100644
index 00000000..44e05c87
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/emptyGroups.json
@@ -0,0 +1,3 @@
+{
+ "groups": []
+}
diff --git a/main/src/test/resources/simpleDeploy/emptyRequest.json b/main/src/test/resources/simpleDeploy/emptyRequest.json
new file mode 100644
index 00000000..4c458a32
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/emptyRequest.json
@@ -0,0 +1,3 @@
+{
+ "policies": []
+}
diff --git a/main/src/test/resources/simpleDeploy/emptyRequestBase.json b/main/src/test/resources/simpleDeploy/emptyRequestBase.json
new file mode 100644
index 00000000..2c63c085
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/emptyRequestBase.json
@@ -0,0 +1,2 @@
+{
+}
diff --git a/main/src/test/resources/simpleDeploy/getGroupDao.json b/main/src/test/resources/simpleDeploy/getGroupDao.json
new file mode 100644
index 00000000..2e74d1bf
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/getGroupDao.json
@@ -0,0 +1,84 @@
+{
+ "groups": [
+ {
+ "name": "groupA",
+ "version": "0.0.0",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpA"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "groupA",
+ "version": "200.2.3",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpA"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "groupA",
+ "version": "0.0.1",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpA"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "groupA",
+ "version": "non-numeric-version",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpA"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/getPolicyReqNullVersion.json b/main/src/test/resources/simpleDeploy/getPolicyReqNullVersion.json
new file mode 100644
index 00000000..bf2d132b
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/getPolicyReqNullVersion.json
@@ -0,0 +1,7 @@
+{
+ "policies": [
+ {
+ "name": "policyA"
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/groups.json b/main/src/test/resources/simpleDeploy/groups.json
new file mode 100644
index 00000000..7fd7684b
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/groups.json
@@ -0,0 +1,25 @@
+{
+ "groups": [
+ {
+ "name": "groupA",
+ "version": "200.2.3",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpA"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/policy.json b/main/src/test/resources/simpleDeploy/policy.json
new file mode 100644
index 00000000..7786aab7
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/policy.json
@@ -0,0 +1,6 @@
+{
+ "name": "policyA",
+ "version": "1.2.3",
+ "type": "typeA",
+ "typeVersion": "100.2.3"
+}
diff --git a/main/src/test/resources/simpleDeploy/request.json b/main/src/test/resources/simpleDeploy/request.json
new file mode 100644
index 00000000..060637cc
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/request.json
@@ -0,0 +1,8 @@
+{
+ "policies": [
+ {
+ "name": "policyA",
+ "version": "1.2.3"
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/requestBase.json b/main/src/test/resources/simpleDeploy/requestBase.json
new file mode 100644
index 00000000..67fcdcb6
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/requestBase.json
@@ -0,0 +1,4 @@
+{
+ "name": "policyA",
+ "version": "1.2.3"
+}
diff --git a/main/src/test/resources/simpleDeploy/updateGroupReqMultiple.json b/main/src/test/resources/simpleDeploy/updateGroupReqMultiple.json
new file mode 100644
index 00000000..3d4684cc
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/updateGroupReqMultiple.json
@@ -0,0 +1,20 @@
+{
+ "policies": [
+ {
+ "name": "policyA",
+ "version": "1.2.3"
+ },
+ {
+ "name": "policyB",
+ "version": "1.2.3"
+ },
+ {
+ "name": "policyC",
+ "version": "1.2.3"
+ },
+ {
+ "name": "policyD",
+ "version": "1.2.3"
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroupDao.json b/main/src/test/resources/simpleDeploy/upgradeGroupDao.json
new file mode 100644
index 00000000..278b69a6
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroupDao.json
@@ -0,0 +1,72 @@
+{
+ "groups": [
+ {
+ "name": "groupA",
+ "version": "200.2.3",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpA"
+ }
+ ],
+ "policies": []
+ },
+ {
+ "pdpType": "pdpTypeB",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpB"
+ }
+ ],
+ "policies": []
+ },
+ {
+ "pdpType": "pdpTypeC",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpC"
+ }
+ ],
+ "policies": [
+ {
+ "name": "policyA",
+ "version": "1.2.3",
+ "type": "typeA",
+ "typeVersion": "100.2.3"
+ }
+ ]
+ },
+ {
+ "pdpType": "pdpTypeD",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpD"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroupGroup1.json b/main/src/test/resources/simpleDeploy/upgradeGroupGroup1.json
new file mode 100644
index 00000000..a63eadd9
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroupGroup1.json
@@ -0,0 +1,40 @@
+{
+ "groups": [
+ {
+ "name": "groupA",
+ "version": "200.2.3",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpA"
+ }
+ ],
+ "policies": []
+ },
+ {
+ "pdpType": "pdpTypeC",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeC",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpC"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroupGroup2.json b/main/src/test/resources/simpleDeploy/upgradeGroupGroup2.json
new file mode 100644
index 00000000..d4946579
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroupGroup2.json
@@ -0,0 +1,25 @@
+{
+ "groups": [
+ {
+ "name": "groupB",
+ "version": "300.2.3",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeB",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeB",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpB"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroupPolicy2.json b/main/src/test/resources/simpleDeploy/upgradeGroupPolicy2.json
new file mode 100644
index 00000000..3a13d0c3
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroupPolicy2.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "name": "policyB",
+ "version": "1.2.3",
+ "type": "typeB",
+ "typeVersion": "100.2.3"
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroupPolicy3.json b/main/src/test/resources/simpleDeploy/upgradeGroupPolicy3.json
new file mode 100644
index 00000000..bf5602ea
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroupPolicy3.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "name": "policyC",
+ "version": "1.2.3",
+ "type": "typeC",
+ "typeVersion": "100.2.3"
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroupPolicy4.json b/main/src/test/resources/simpleDeploy/upgradeGroupPolicy4.json
new file mode 100644
index 00000000..3c0fb72f
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroupPolicy4.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "name": "policyD",
+ "version": "1.2.3",
+ "type": "typeA",
+ "typeVersion": "100.2.3"
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroup_NoPdpsDao.json b/main/src/test/resources/simpleDeploy/upgradeGroup_NoPdpsDao.json
new file mode 100644
index 00000000..72563d47
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroup_NoPdpsDao.json
@@ -0,0 +1,21 @@
+{
+ "groups": [
+ {
+ "name": "groupA",
+ "version": "200.2.3",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeA",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}
diff --git a/main/src/test/resources/simpleDeploy/upgradeGroup_NothingUpdatedDao.json b/main/src/test/resources/simpleDeploy/upgradeGroup_NothingUpdatedDao.json
new file mode 100644
index 00000000..60d6a68c
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/upgradeGroup_NothingUpdatedDao.json
@@ -0,0 +1,25 @@
+{
+ "groups": [
+ {
+ "name": "groupA",
+ "version": "200.2.3",
+ "pdpSubgroups": [
+ {
+ "pdpType": "pdpTypeB",
+ "supportedPolicyTypes": [
+ {
+ "name": "typeX",
+ "version": "100.2.3"
+ }
+ ],
+ "pdpInstances": [
+ {
+ "instanceId": "pdpB"
+ }
+ ],
+ "policies": []
+ }
+ ]
+ }
+ ]
+}