Allow integer version when using PDP Group Deploy

The policies listed in a "PDP Group Deploy" request may not have
fully qualified versions.  Modified the code to replace the versions
in the request with fully qualified versions.
Also improved performance by avoiding look-ups of policies that
are already in the subgroup.

Change-Id: I37899c2b45228b97a80b7ef44f69694ba57e8f4a
Issue-ID: POLICY-1784
Signed-off-by: jrh3 <jrh3@att.com>
diff --git a/main/src/test/resources/simpleDeploy/createGroupsNewSubNotFound.json b/main/src/test/resources/simpleDeploy/createGroupsNewSubNotFound.json
new file mode 100644
index 0000000..f471700
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/createGroupsNewSubNotFound.json
@@ -0,0 +1,56 @@
+{
+    "groups": [
+        {
+            "name": "groupA",
+            "version": "200.2.3",
+            "description": "my description",
+            "pdpGroupState": "ACTIVE",
+            "properties": {
+                "hello": "world"
+            },
+            "pdpSubgroups": [
+                {
+                    "pdpType": "pdpTypeA",
+                    "desiredInstanceCount": 1,
+                    "properties": {
+                        "abc": "def"
+                    },
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "typeA",
+                            "version": "100.2.3"
+                        }
+                    ],
+                    "pdpInstances": [
+                        {
+                            "instanceId": "pdpA"
+                        }
+                    ],
+                    "policies": [
+                        {
+                            "name": "policy-unknown",
+                            "version": "9.9.9"
+                        }
+                    ]
+                },
+                {
+                    "pdpType": "pdpTypeB",
+                    "desiredInstanceCount": 1,
+                    "currentInstanceCount": 22,
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "typeA",
+                            "version": "100.2.3"
+                        }
+                    ],
+                    "pdpInstances": [
+                        {
+                            "instanceId": "pdpB"
+                        }
+                    ],
+                    "policies": []
+                }
+            ]
+        }
+    ]
+}
diff --git a/main/src/test/resources/simpleDeploy/createGroupsVersPrefix.json b/main/src/test/resources/simpleDeploy/createGroupsVersPrefix.json
new file mode 100644
index 0000000..e53d927
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/createGroupsVersPrefix.json
@@ -0,0 +1,39 @@
+{
+    "groups": [
+        {
+            "name": "groupA",
+            "version": "200.2.3",
+            "description": "my description",
+            "pdpGroupState": "ACTIVE",
+            "properties": {
+                "hello": "world"
+            },
+            "pdpSubgroups": [
+                {
+                    "pdpType": "pdpTypeA",
+                    "desiredInstanceCount": 1,
+                    "properties": {
+                        "abc": "def"
+                    },
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "typeA",
+                            "version": "100.2.3"
+                        }
+                    ],
+                    "pdpInstances": [
+                        {
+                            "instanceId": "pdpA"
+                        }
+                    ],
+                    "policies": [
+                        {
+                            "name": "policyA",
+                            "version": "1"
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
diff --git a/main/src/test/resources/simpleDeploy/createGroupsVersPrefixMismatch.json b/main/src/test/resources/simpleDeploy/createGroupsVersPrefixMismatch.json
new file mode 100644
index 0000000..2bf0641
--- /dev/null
+++ b/main/src/test/resources/simpleDeploy/createGroupsVersPrefixMismatch.json
@@ -0,0 +1,39 @@
+{
+    "groups": [
+        {
+            "name": "groupA",
+            "version": "200.2.3",
+            "description": "my description",
+            "pdpGroupState": "ACTIVE",
+            "properties": {
+                "hello": "world"
+            },
+            "pdpSubgroups": [
+                {
+                    "pdpType": "pdpTypeA",
+                    "desiredInstanceCount": 1,
+                    "properties": {
+                        "abc": "def"
+                    },
+                    "supportedPolicyTypes": [
+                        {
+                            "name": "typeA",
+                            "version": "100.2.3"
+                        }
+                    ],
+                    "pdpInstances": [
+                        {
+                            "instanceId": "pdpA"
+                        }
+                    ],
+                    "policies": [
+                        {
+                            "name": "policyA",
+                            "version": "9"
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}