req_attr_key, flavor_cfa)
if not flavor_feature_attr:
flavor_flag = False
- if not self._compare_attribute(flavor_feature_attr[0],
+ elif not self._compare_attribute(flavor_feature_attr[0],
req_feature_attr):
- flavor_flag = False
+ flavor_flag = False
if not flavor_flag:
continue
else:
candidate_list[i]["flavor_map"] = {}
# Create flavor mapping for label_name to flavor
flavor_name = flavor_info.get("flavor-name")
+ flavor_id = flavor_info.get("flavor-id")
candidate_list[i]["flavor_map"][label_name] = flavor_name
+ candidate_list[i]["flavor_map"]["flavorId"] = flavor_id
# Create directives if not exist already
if not candidate_list[i].get("all_directives"):
candidate_list[i]["all_directives"] = {}
directive= {"id": id,
"type": type,
"directives": ""}
+ flavor_id_attributes = {"attribute_name": "flavorId", "attribute_value": ""}
for ele in directives:
if "flavor_directives" in ele.get("type"):
flag = True
+ ele.get("attributes").append(flavor_id_attributes)
break
else:
flag = False
# 'note': 'do_something called!',
# 'arg': str(arg),
# }
- # return {'response': res, 'error': False}
\ No newline at end of file
+ # return {'response': res, 'error': False}
:param flavor_map: flavor map get
:param directives: All the directives get from request
'''
- flavor_label = flavor_map.keys()
+ keys = flavor_map.keys()
for ele in directives.get("directives"):
for item in ele.get("directives"):
if "flavor_directives" in item.get("type"):
for attr in item.get("attributes"):
attr["attribute_value"] = flavor_map.get(attr["attribute_name"]) \
- if attr.get("attribute_name") in flavor_label else ""
+ if attr.get("attribute_name") in keys else ""
return directives
<parent>
<groupId>org.onap.optf.has</groupId>
- <version>1.2.4-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
<artifactId>optf-has</artifactId>
</parent>
<groupId>org.onap.optf.has</groupId>
<artifactId>optf-has-conductor</artifactId>
- <version>1.2.4-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
<name>optf-has-conductor</name>
<description>Homing Allocation Service/Conductor</description>
<artifactId>optf-has</artifactId>
<name>optf-has</name>
- <version>1.2.4-SNAPSHOT</version>
+ <version>1.2.5-SNAPSHOT</version>
<description>Homing Allocation Service</description>
<modules>
BUILD_ARGS="--no-cache"
ORG="onap"
-VERSION="1.2.4"
+VERSION="1.2.5"
PROJECT="optf-has"
DOCKER_REPOSITORY="nexus3.onap.org:10003"
IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}"
major=1
minor=2
-patch=4
+patch=5
base_version=${major}.${minor}.${patch}