Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-801

fields mismatch about flavor features between implementation and wiki

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Medium Medium
    • Casablanca Release
    • Beijing Release
    • None

      Per the description in https://wiki.onap.org/display/DW/Policy+Specification+and+Retrieval+for+OOF , the format/schema of flavorProperties should as follows:
      "flavorFeatures": [
      {
      "flavorLabel": "

      {VM/VFC id}

      ",
      "flavorProperties":[
      {
      "hpa-feature" : "

      {HPA feature type}

      ",
      "mandatory" : "

      {mandatoriness of the feature}

      ",
      "score" : "

      {priority of this feature if the feature is not mandatory for VM}

      "
      "architecture": "

      {supported architecuture}

      ",
      "hpa-version": "

      {version for hpa capability}

      ",
      "hpa-feature-attributes": [
      {
      "hpa-attribute-key": "

      {attribute name}

      ",
      "hpa-attribute-value": "

      {attribute value}

      ",
      "operator": "

      {comparison operator}

      ",
      "unit": "

      {the unit of an attribute}

      "}
      ]
      }
      ]

      But in the GUI and currently implementation in Policy, it seems like as below, there are some mismatch with yellow color marked:
      "flavorFeatures": [
      {
      "flavorLabel": "flavor3",
      "flavorProperties": [
      {
      "score": "7",
      "featureAttributes": [

      { "attribute": "logicalCpuThreadPinningPolicy", "value": "prefer", "operator": "=" }

      ],
      "mandatory": "True",
      "hpaFeature": "hugePages",
      "architecture": "generic"
      },
      After checking the code engine/packages/base/src/files/install/mysql/data/180601_upgrade_script.sql, it seems to be caused by below sql statements:
      INSERT INTO `onap_sdk`.`optimizationmodels` (`modelname`, `description`, `dependency`, `imported_by`, `attributes`, `ref_attributes`, `sub_attributes`, `version`, `annotation`, `enumValues`, `dataOrderInfo`) VALUES ('hpaPolicy', 'CSIT Tests Model', '[]', 'demo', 'identity=string:defaultValue-null:required-true:MANY-false,resources=string:defaultValue-null:required-true:MANY-false', 'policyScope=MANY-true,policyType=POLICYTYPE:MANY-false,flavorFeatures=flavorFeatures-properties:MANY-true', '{\"flavorProperties-properties\":

      {\"score\":\"string:defaultValue-null:required-true:MANY-false\",\"featureAttributes\":\"featureAttributes-properties:required-false:MANY-true\",\"mandatory\":\"string:defaultValue-null:required-true:MANY-false\",\"hpaFeature\":\"string:defaultValue-null:required-true:MANY-false\",\"architecture\":\"string:defaultValue-null:required-true:MANY-false\"}

      ,\"flavorFeatures-properties\":

      {\"flavorProperties\":\"flavorProperties-properties:required-false:MANY-true\",\"flavorLabel\":\"string:defaultValue-null:required-true:MANY-false\"}

      ,\"featureAttributes-properties\":{\"unit\":\"string:defaultValue-null:required-true:MANY-false\",\"attribute\":\"string:defaultValue-null:required-true:MANY-false\",\"value\":\"string:defaultValue-null:required-true:MANY-false\",\"operator\":\"OPERATOR:required-true:MANY-false\"}}\n', 'CSIT', 'policyScope=matching-true', 'OPERATOR=[<,<equal-sign,>,>equal-sign,equal-sign,!equal-sign,any,all,subset,], POLICYTYPE=[hpaPolicy,]', '\"[resources,identity,policyScope,policyType,flavorFeatures,flavorLabel,flavorProperties,architecture,hpaFeature,mandatory,score,featureAttributes,attribute,operator,unit,value]\"');

            pdragosh pdragosh
            libonet libonet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: