Merge "Upgrade dmaap client"
diff --git a/ONAP-PAP-REST/src/main/resources/Decision_GuardMinMaxPolicyTemplate.xml b/ONAP-PAP-REST/src/main/resources/Decision_GuardMinMaxPolicyTemplate.xml
index afb118a..184cec6 100644
--- a/ONAP-PAP-REST/src/main/resources/Decision_GuardMinMaxPolicyTemplate.xml
+++ b/ONAP-PAP-REST/src/main/resources/Decision_GuardMinMaxPolicyTemplate.xml
@@ -64,6 +64,41 @@
             </AnyOf>
         </Target>
         <Condition>
+            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
+                <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
+                    <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
+                        <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" MustBePresent="false"/>
+                    </Apply>
+                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveStart}</AttributeValue>
+                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveEnd}</AttributeValue>
+                </Apply>
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than-or-equal">
+                    <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="vfCount" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="false"/>
+                    </Apply>
+                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">${min}</AttributeValue>
+                </Apply>
+                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-less-than-or-equal">
+                    <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="vfCount" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="false"/>
+                    </Apply>
+                    <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">${max}</AttributeValue>
+                </Apply>
+            </Apply>
+        </Condition>
+    </Rule>
+    <Rule RuleId="urn:com:xacml:rule:id:284d9393-f861-4250-b62d-fc36640a363a" Effect="Deny">
+        <Target>
+            <AnyOf>
+                <AllOf>
+                    <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
+                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DECIDE</AttributeValue>
+                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
+                    </Match>
+                </AllOf>
+            </AnyOf>
+        </Target>
+        <Condition>
             <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
                 <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
                     <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
@@ -88,45 +123,6 @@
                 </Apply>
             </Apply>
         </Condition>
-    </Rule>
-    <Rule RuleId="urn:com:xacml:rule:id:284d9393-f861-4250-b62d-fc36640a363a" Effect="Deny">
-        <Target>
-            <AnyOf>
-                <AllOf>
-                    <Match MatchId="urn:oasis:names:tc:xacml:3.0:function:string-equal-ignore-case">
-                        <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">DECIDE</AttributeValue>
-                        <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:action" AttributeId="urn:oasis:names:tc:xacml:1.0:action:action-id" DataType="http://www.w3.org/2001/XMLSchema#string" MustBePresent="false"/>
-                    </Match>
-                </AllOf>
-            </AnyOf>
-        </Target>
-        <Condition>
-            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
-                <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:not">
-                    <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:and">
-                        <Apply FunctionId="urn:oasis:names:tc:xacml:2.0:function:time-in-range">
-                            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:time-one-and-only">
-                                <AttributeDesignator AttributeId="urn:oasis:names:tc:xacml:1.0:environment:current-time" DataType="http://www.w3.org/2001/XMLSchema#time" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:environment" MustBePresent="false"/>
-                            </Apply>
-                            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveStart}</AttributeValue>
-                            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#time">${guardActiveEnd}</AttributeValue>
-                        </Apply>
-                        <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-greater-than-or-equal">
-                            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
-                                <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="vfCount" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="false"/>
-                            </Apply>
-                            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">${min}</AttributeValue>
-                        </Apply>
-                        <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-less-than-or-equal">
-                            <Apply FunctionId="urn:oasis:names:tc:xacml:1.0:function:integer-one-and-only">
-                                <AttributeDesignator Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" AttributeId="vfCount" DataType="http://www.w3.org/2001/XMLSchema#integer" MustBePresent="false"/>
-                            </Apply>
-                            <AttributeValue DataType="http://www.w3.org/2001/XMLSchema#integer">${max}</AttributeValue>
-                        </Apply>
-                    </Apply>
-                </Apply>
-            </Apply>
-        </Condition>
         <AdviceExpressions>
             <AdviceExpression AdviceId="GUARD_MIN_MAX" AppliesTo="Deny">
                 <AttributeAssignmentExpression AttributeId="guard.response" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource">
diff --git a/packages/base/src/files/install/mysql/data/181002_upgrade_script.sql b/packages/base/src/files/install/mysql/data/181002_upgrade_script.sql
index 022a311..854297d 100644
--- a/packages/base/src/files/install/mysql/data/181002_upgrade_script.sql
+++ b/packages/base/src/files/install/mysql/data/181002_upgrade_script.sql
@@ -69,4 +69,7 @@
 update fn_function set type = 'url'  , action = '*' where function_cd = 'login';
 update fn_function set type = 'url'  , action = '*' where function_cd = 'quantum_bd';
     
+INSERT INTO `onap_sdk`.`microservicemodels` (`modelname`, `description`, `dependency`, `imported_by`, `attributes`, `ref_attributes`, `sub_attributes`, `version`, `enumValues`, `dataOrderInfo`, `annotation`) 
+VALUES ('SDNC_GenerateName', 'SRIOV 1806 Model', '[]', 'demo', 'policy-instance-name=string:defaultValue-null:required-null:MANY-false:description-null', 'naming-models=naming-model-entity:MANY-true:description-null,', '{"naming-property":{"property-value":"string:defaultValue-null:required-false:MANY-false:description-null","property-operation":"string:defaultValue-null:required-false:MANY-false:description-null","source-endpoint":"string:defaultValue-null:required-false:MANY-false:description-null","property-name":"string:defaultValue-null:required-true:MANY-false:description-null","increment-sequence":"increment-sequence:required-false:MANY-false:description-null","source-system":"string:defaultValue-null:required-false:MANY-false:description-null"},"increment-sequence":{"max":"string:defaultValue-null:required-false:MANY-false:description-null","scope":"SCOPE:defaultValue-null:required-true:MANY-false:description-null","start-value":"string:defaultValue-null:required-true:MANY-false:description-null","length":"integer:defaultValue-null:required-true:MANY-false:description-null","increment":"string:defaultValue-null:required-true:MANY-false:description-null","sequence-type":"string:defaultValue-null:required-false:MANY-false:description-null"},"naming-model-entity":{"naming-properties":"naming-property:required-true:MANY-true:description-null","name-operation":"string:defaultValue-null:required-false:MANY-false:description-null","naming-type":"string:defaultValue-null:required-true:MANY-false:description-null","nfRole":"string:defaultValue-null:required-false:MANY-false:description-null","naming-recipe":"String:defaultValue-null:required-true:MANY-false:description-null"}}', 'CSIT', 'SCOPE=[CLOUD_REGION_ID,LOCATION_CLLI,VNF,VM,VFMODULE,PRECEEDING,TRAILING,ENTIRETY,]', '\"[policy-instance-name,naming-models,nfRole,naming-type,naming-recipe,name-operation,naming-properties,property-name,property-value,property-operation,source-system,source-endpoint,increment-sequence,scope,sequence-type,start-value,max,increment,length]\"','naming-type=matching-true, nfRole=matching-true, property-name=matching-true');
+
 commit;
\ No newline at end of file