Ocf133 logging api supported feature negotiation

Proposers

  • name-of-proposer-1 (institution-of-proposer-1)
  • name-of-proposer-2 (institution-of-proposer-2) ...

Description

Describe your proposal in ~1000 characters. You can reference external content listed in section "References" as [Ref-1].

Demo or definition of done

Describe which high level conditions needs to be fulfilled to demonstrate this feature implementation is completed. You can reference external content (example, demo paper) listed in section "References" as [Ref-2].

References

  1. Reference name
  2. Author1, Author2, Author3, et. al., “My demo using feature,” in Conference-Name Demo Track, 20XX.

Acknowledgements

This work is funded by the European Commission through the project with Grant Agreement number . example HORIZON-JU-SNS-2022 FLEX-SCALE project with Grant Agreement number 101096909.

Merge request reports

Loading
+13 −0
Changes for services/TS29222_CAPIF_Logging_API_Invocation_API/api_invocation_logs/core/invocationlogs.py: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,17 @@ from .redis_event import RedisEvent
from .resources import Resource
from .responses import internal_server_error, make_response, not_found_error, unauthorized_error

TOTAL_FEATURES = 1
SUPPORTED_FEATURES_HEX = "0"

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)[::-1]

    return {
        "SliceBasedAPIExposure": True if final_supp_feat[0] == "1" else False,
        "Final": hex(int(final_supp_feat[::-1], 2))[2:]
    }

class LoggingInvocationOperations(Resource):

@@ -78,6 +89,8 @@ class LoggingInvocationOperations(Resource):
            if result is not None:
                return result

            invocationlog.supported_features = return_negotiated_supp_feat_dict(invocationlog.supported_features)["Final"]

            current_app.logger.debug("Check service apis")
            event = None
            invocation_log_base = json.loads(json.dumps(
+2 −2
Changes for tests/libraries/api_logging_service/bodyRequests.py: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ def create_log_entry(aefId, apiInvokerId, apiId, apiName, results=['200','500'],
    "aefId": aefId,
    "apiInvokerId": apiInvokerId,
    "logs": [],
    "supportedFeatures": "ffff"
    "supportedFeatures": "0"
    }
    if len(results) > 0:
        count=0
@@ -52,7 +52,7 @@ def create_log_entry_bad_service(aefId, apiInvokerId, result='500'):
        "fwdInterface": "string"
        }
    ],
    "supportedFeatures": "ffff"
    "supportedFeatures": "0"
    }
    return data 

Loading