From a41ddbe556055ee8d450c86f90d1353636c3139c Mon Sep 17 00:00:00 2001
From: liboNet <libo.zhu@intel.com>
Date: Fri, 9 Nov 2018 09:20:42 +0800
Subject: Fix R3 model for OOF Policy Optimization

Models with duplicate keys(directives) cannot use dataOrderInfo,
it's a limitation so update the data from the record which is
generated after use GUI to load the model first.

Change-Id: Ie01872858e3ed8728ada90ba3205075b41a74703
Issue-ID: POLICY-1236
Signed-off-by: liboNet <libo.zhu@intel.com>
---
 packages/base/src/files/install/mysql/data/181030_upgrade_script.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/base/src/files/install/mysql/data/181030_upgrade_script.sql')

diff --git a/packages/base/src/files/install/mysql/data/181030_upgrade_script.sql b/packages/base/src/files/install/mysql/data/181030_upgrade_script.sql
index 4c31c293b..ea6f1428d 100644
--- a/packages/base/src/files/install/mysql/data/181030_upgrade_script.sql
+++ b/packages/base/src/files/install/mysql/data/181030_upgrade_script.sql
@@ -18,4 +18,4 @@
 
 use onap_sdk;
 
-INSERT INTO `onap_sdk`.`optimizationmodels` (`modelname`, `description`, `dependency`, `imported_by`, `attributes`, `ref_attributes`, `sub_attributes`, `version`, `annotation`, `enumValues`, `dataOrderInfo`) VALUES ('hpaPolicy', 'HPA Tests Model', '[]', 'demo', 'identity=string:defaultValue-null:required-true:MANY-false,resources=string:defaultValue-null:required-true:MANY-false', 'policyScope=MANY-true,policyType=POLICYTYPE1:MANY-false,flavorFeatures=flavorFeatures-properties:MANY-true', '{\"flavorProperties-properties\":{\"hpa-feature-attributes\":\"hpa-feature-attributes-properties:required-false:MANY-true\",\"mandatory\":\"string:defaultValue-null:required-true:MANY-false\",\"hpa-feature\":\"string:defaultValue-null:required-true:MANY-false\",\"hpa-version\":\"string:defaultValue-null:required-true:MANY-false\",\"architecture\":\"string:defaultValue-null:required-true:MANY-false\",\"directives\":\"directives-properties:required-false:MANY-true\"},\"directives-properties\":{\"type\":\"string:defaultValue-flavor_directives:required-false:MANY-false\",\"attributes\":\"directives-attributes-properties:MANY-false\"},\"directives-attributes-properties\":{\"attribute_name":\"MANY-false\",\"attribute_value\":\"MANY-false\"},\"flavorFeatures-properties\":{\"flavorProperties\":\"flavorProperties-properties:required-false:MANY-true\",\"id\":\"string:defaultValue-null:required-true:MANY-false\",\"type\":\"string:defaultValue-tosca.nodes.nfv.Vdu.Compute:required-true:MANY-false\"},\"hpa-feature-attributes-properties\":{\"unit\":\"string:defaultValue-null:required-false:MANY-false\",\"hpa-attribute-key\":\"string:defaultValue-null:required-false:MANY-false\",\"hpa-attribute-value\":\"string:defaultValue-null:required-true:MANY-false\",\"operator\":\"OPERATOR:required-false:MANY-false\"}}\n', '1.0', 'policyScope=matching-true', 'OPERATOR=[<,<equal-sign,>,>equal-sign,equal-sign,!equal-sign,any,all,subset,], POLICYTYPE1=[hpaPolicy]', '\"[resources,identity,policyScope,policyType,flavorFeatures,id,type,flavorProperties,hpa-feature,mandatory,architecture,hpa-version,directives,type,attributes,attribute_name,attribute_value,hpa-feature-attributes,hpa-attribute-key,operator,unit,hpa-attribute-value]\"');
+INSERT INTO `onap_sdk`.`optimizationmodels` (`modelname`, `description`, `dependency`, `imported_by`, `attributes`, `ref_attributes`, `sub_attributes`, `version`, `annotation`, `enumValues`, `dataOrderInfo`) VALUES ('hpaPolicy', 'HPA Tests Model', '[]', 'demo', 'identity=string:defaultValue-null:required-true:MANY-false:description-null', 'policyScope=MANY-true,policyType=POLICYTYPE:MANY-false,resources=MANY-true,flavorFeatures=flavorFeatures_properties:MANY-true:description-null', '{"directives_properties":{"attributes":"directives_attributes_properties:required-false:MANY-true:description-null","type":"string:defaultValue-null:required-false:MANY-false:description-null"},"directives_attributes_properties":{"attribute_name":"string:defaultValue-null:required-false:MANY-false:description-null","attribute_value":"string:defaultValue-null:required-false:MANY-false:description-null"},"flavorProperties_properties":{"score":"string:defaultValue-null:required-false:MANY-false:description-null","hpa-feature-attributes":"hpa-feature-attributes_properties:required-true:MANY-true:description-null","directives":"directives_properties:required-true:MANY-true:description-null","hpa-version":"string:defaultValue-null:required-true:MANY-false:description-null","hpa-feature":"string:defaultValue-null:required-true:MANY-false:description-null","mandatory":"string:defaultValue-null:required-true:MANY-false:description-null","architecture":"string:defaultValue-null:required-true:MANY-false:description-null"},"flavorFeatures_properties":{"directives":"directives_properties:required-true:MANY-true:description-null","flavorProperties":"flavorProperties_properties:required-true:MANY-true:description-null","id":"string:defaultValue-null:required-true:MANY-false:description-null","type":"string:defaultValue-null:required-true:MANY-false:description-null"},"hpa-feature-attributes_properties":{"unit":"string:defaultValue-null:required-false:MANY-false:description-null","hpa-attribute-value":"string:defaultValue-null:required-true:MANY-false:description-null","hpa-attribute-key":"string:defaultValue-null:required-true:MANY-false:description-null","operator":"OPERATOR:defaultValue-null:required-false:MANY-false:description-null"}}', '1.0', 'policyScope=matching-true, policyType=matching-true', 'OPERATOR=[<,<equal-sign,>,>equal-sign,equal-sign,!equal-sign,any,all,subset,], POLICYTYPE=[hpa,]', '""');
-- 
cgit 1.2.3-korg

