2 # ============LICENSE_START===============================================
3 # Copyright (C) 2020 Nordix Foundation. All rights reserved.
4 # ========================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ============LICENSE_END=================================================
19 # Different commands for the simulator.
20 # By running this, nothing should return an error.
23 curl -v "http://localhost:8085/"
25 # PUT a policy type STD_QoSNudging_0.2.0
26 curl -X PUT -v "http://localhost:8085/policytypes/STD_QoSNudging_0.2.0" -H "accept: application/json" -H "Content-Type: application/json" --data-binary @example_files/policy_type_STD_QoSNudging_0.2.0.json
29 curl -v "http://localhost:8085/A1-P/v1/policytypes"
31 # GET policy type STD_QoSNudging_0.2.0
32 curl -v "http://localhost:8085/A1-P/v1/policytypes/STD_QoSNudging_0.2.0"
34 # PUT a policy instance pi1
35 curl -X PUT -v "http://localhost:8085/A1-P/v1/policies/pi1?policyTypeId=STD_QoSNudging_0.2.0" -H "accept: application/json" -H "Content-Type: application/json" --data-binary @example_files/policy_instance_1_STD_QoSNudging_0.2.0.json
37 # PUT a policy instance pi2
38 curl -X PUT -v "http://localhost:8085/A1-P/v1/policies/pi2?policyTypeId=STD_QoSNudging_0.2.0" -H "accept: application/json" -H "Content-Type: application/json" --data-binary @example_files/policy_instance_2_STD_QoSNudging_0.2.0.json
40 # SET status for pi1 and pi2
41 curl -X PUT "http://localhost:8085/pi1/NOT_ENFORCED/300"
42 curl -X PUT "http://localhost:8085/pi2/ENFORCED"
45 curl -v "http://localhost:8085/A1-P/v1/policies"
47 # DELETE policy instance pi2
48 curl -X DELETE -v "http://localhost:8085/A1-P/v1/policies/pi2"
50 # PUT a different policy instance pi1 (i.e. update it)
51 curl -X PUT -v "http://localhost:8085/A1-P/v1/policies/pi1?policyTypeId=STD_QoSNudging_0.2.0" -H "accept: application/json" -H "Content-Type: application/json" --data-binary @example_files/policy_instance_1_bis_STD_QoSNudging_0.2.0.json
53 # GET policy instance pi1
54 curl -v "http://localhost:8085/A1-P/v1/policies/pi1"
56 # GET policy status for pi1
57 curl -v "http://localhost:8085/A1-P/v1/policystatus/pi1"