Skip to content
Snippets Groups Projects
Commit 1a835c3a authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Merge branch 'OCF138-fixes-discover-api-supported-feature-negotiation' into 'staging'

Add inversion and change order of supported features in return bracket

See merge request !118
parents 02fd8276 cbf9f71a
No related branches found
No related tags found
1 merge request!118Add inversion and change order of supported features in return bracket
Pipeline #12975 passed
......@@ -56,7 +56,6 @@ def all_service_apis_get(api_invoker_id, api_name=None, api_version=None, comm_t
if supported_features is not None:
supp_feat_dict = return_negotiated_supp_feat_dict(supported_features)
current_app.logger.info(supp_feat_dict)
if supp_feat_dict['VendSpecQueryParams']:
for q_params in request.args:
if "vend-spec" in q_params:
......
......@@ -29,13 +29,13 @@ def filter_fields(filtered_apis):
def return_negotiated_supp_feat_dict(supp_feat):
final_supp_feat = bin(int(supp_feat, 16) & int(SUPPORTED_FEATURES_HEX, 16))[2:].zfill(TOTAL_FEATURES)
final_supp_feat = bin(int(supp_feat, 16) & int(SUPPORTED_FEATURES_HEX, 16))[2:].zfill(TOTAL_FEATURES)[::-1]
return {
"ApiSupportedFeatureQuery": True if final_supp_feat[3] == "1" else False,
"VendSpecQueryParams": True if final_supp_feat[2] == "1" else False,
"RNAA": True if final_supp_feat[1] == "1" else False,
"SliceBasedAPIExposure": True if final_supp_feat[0] == "1" else False
"ApiSupportedFeatureQuery": True if final_supp_feat[0] == "1" else False,
"VendSpecQueryParams": True if final_supp_feat[1] == "1" else False,
"RNAA": True if final_supp_feat[2] == "1" else False,
"SliceBasedAPIExposure": True if final_supp_feat[3] == "1" else False
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment