From: Ankitkumar Patel Date: Mon, 26 Mar 2018 19:03:48 +0000 (-0400) Subject: Updated the schematics models of the HAS API X-Git-Tag: v1.1.1~28 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=4de3bb8c9f62f15d6aeb965f9d4c47edb7efd2e9;p=optf%2Fosdf.git Updated the schematics models of the HAS API Updated the validation models and related testcases. Issue-ID: OPTFRA-203 Change-Id: I02219e64543eb7a9a7933322bf19f21e070496f4 Signed-off-by: Ankitkumar Patel --- diff --git a/osdf/models/api/placementResponse.py b/osdf/models/api/placementResponse.py index 75d33f0..063a9a8 100644 --- a/osdf/models/api/placementResponse.py +++ b/osdf/models/api/placementResponse.py @@ -17,8 +17,8 @@ # from .common import OSDFModel -from schematics.types import StringType -from schematics.types.compound import ModelType, ListType +from schematics.types import BaseType, StringType +from schematics.types.compound import ModelType, ListType, DictType # TODO: update osdf.models @@ -41,7 +41,7 @@ class Candidates(OSDFModel): class AssignmentInfo(OSDFModel): key = StringType(required=True) - value = StringType(required=True) + value = BaseType(required=True) class PlacementSolution(OSDFModel): diff --git a/test/placement-tests/response.json b/test/placement-tests/response.json index f6c1bea..92751ac 100644 --- a/test/placement-tests/response.json +++ b/test/placement-tests/response.json @@ -17,7 +17,8 @@ { "key": "cloudOwner", "value": "amazon" }, { "key": "vnfHostName", "value": "ahr344gh" }, { "key": "isRehome", "value": "False" }, - { "key": "cloudRegionId", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" } + { "key": "cloudRegionId", "value": "1ac71fb8-ad43-4e16-9459-c3f372b8236d" }, + { "key":"flavors", "value": { "flavorLabel1": "vimFlavorX", "flavorLabel2": "vimFlavorY"}} ] }, {