Change-Id: Ie94ed551e68cc6bb764aaaccb0ed824554392b91
Issue-ID: NONRTRIC-78
Signed-off-by: maximesson <maxime.bonneau@est.tech>
Build and run
-------------
-Go to the near-rt-ric-simulator/ directory and run this command::
+Go to the near-rt-ric-simulator/ric-plt-a1/ directory and run this command::
mvn clean install
The docker image can be built using::
docker build -t {desiredImageName} .
Different error codes can be thrown back according to the yaml file. In order to simulate an error code, simply add the query ?code={desiredCodeNumber} at the end of the address in the curl request.
+For running the simulator outside of a docker container, run ./run_me.sh. It is possible to use the port of your choice, by adding it in the command: ./run_me.sh {desiredPort}.
+After that, it is the exact same use with or without a container.
+
End-to-end call
===============
if 'code' in request.args:
return(send_error_code(request.args))
+ if policyId in policy_instances.keys():
+ code = 201
+ else:
+ code = 200
+
policy_instances[policyId] = data
policy_status[policyId] = set_status("UNDEFINED")
if 'policyTypeId' in request.args:
else:
policy_type_per_instance[policyId] = "UNDEFINED"
- if policyId in policy_instances.keys():
- code = 201
- else:
- code = 200
-
response = make_response(policy_instances[policyId], code)
if code == 201:
response.headers['Location'] = "http://localhost:8085/A1-P/v1/policies/" + policyId