X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=nonrtric%2Fdata%2Frun_in_k8s%2Fpopulate_data.sh;h=d3e3f8b4a8ea20ed9869d8e39879ec6ead42d20d;hb=refs%2Fchanges%2F76%2F5376%2F4;hp=69cd28c0dd3bf5d31972397914c54394dd7391d3;hpb=56292b9bd56be402b961a083f68d5b56c7b92192;p=it%2Fdep.git diff --git a/nonrtric/data/run_in_k8s/populate_data.sh b/nonrtric/data/run_in_k8s/populate_data.sh index 69cd28c0..d3e3f8b4 100755 --- a/nonrtric/data/run_in_k8s/populate_data.sh +++ b/nonrtric/data/run_in_k8s/populate_data.sh @@ -23,6 +23,8 @@ # one service in policy agent # five policies in a1-sim-OSC_0 # one policy in a1-sim-STD_0 +# one policy type in a1-sim-STD2_0 +# one policy in a1-sim-STD2_0 policy_agent_host="policymanagementservice" policy_agent_port="9080" @@ -34,6 +36,10 @@ a1_sim_std_0_host="a1-sim-std-0.a1-sim" a1_sim_std_0_port="8085" a1_sim_std_1_host="a1-sim-std-1.a1-sim" a1_sim_std_1_port="8085" +a1_sim_std2_0_host="a1-sim-std2-0.a1-sim" +a1_sim_std2_0_port="8085" +a1_sim_std2_1_host="a1-sim-std2-1.a1-sim" +a1_sim_std2_1_port="8085" httpx=http echo "policy agent status:" @@ -56,6 +62,14 @@ echo "ric4 version:" curl -skw " %{http_code}" $httpx://$a1_sim_std_1_host:$a1_sim_std_1_port/counter/interface echo -e "\n" +echo "ric5 version:" +curl -skw " %{http_code}" $httpx://$a1_sim_std2_0_host:$a1_sim_std_0_port/counter/interface +echo -e "\n" + +echo "ric6 version:" +curl -skw " %{http_code}" $httpx://$a1_sim_std2_1_host:$a1_sim_std_1_port/counter/interface +echo -e "\n" + echo "create policy type 1 to ric1:" curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_osc_0_host:$a1_sim_osc_0_port/policytype?id=1 -H Content-Type:application/json --data-binary @testdata/OSC/policy_type.json echo -e "\n" @@ -64,12 +78,20 @@ echo "create policy type 1 to ric2:" curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_osc_1_host:$a1_sim_osc_1_port/policytype?id=1 -H Content-Type:application/json --data-binary @testdata/OSC/policy_type.json echo -e "\n" +echo "create policy type 2 to STD2 ric5:" +curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_std2_0_host:$a1_sim_std2_0_port/policytype?id=2 -H Content-Type:application/json --data-binary @testdata/STD/policy_type.json +echo -e "\n" + +echo "create policy type 2 to STD2 ric6:" +curl -X PUT -skw " %{http_code}" $httpx://$a1_sim_std2_1_host:$a1_sim_std2_1_port/policytype?id=2 -H Content-Type:application/json --data-binary @testdata/STD/policy_type.json +echo -e "\n" + for i in {1..12}; do echo "policy types from policy agent:" curlString="curl -skw %{http_code} $httpx://$policy_agent_host:$policy_agent_port/policy_types" res=$($curlString) echo "$res" - expect="[\"\",\"1\"]200" + expect="[\"\",\"1\",\"2\"]200" if [ "$res" == "$expect" ]; then echo -e "\n" break; @@ -102,6 +124,10 @@ echo "create policy 2004 to ric1 with type1 and service1 via policy agent:" curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://$policy_agent_host:$policy_agent_port/policy?id=2004&ric=ric1&service=service1&type=1" --data '{"scope": {"ueId": "ue3100","qosId": "qos3100"},"qosObjective": {"priorityLevel": 3104}}' echo -e "\n" +echo "create policy 2200 to ric5 with type1 and service1 via policy agent:" +curl -k -X PUT -sw " %{http_code}" -H accept:application/json -H Content-Type:application/json "$httpx://$policy_agent_host:$policy_agent_port/v2/policies" --data-binary @testdata/STD/policy.json +echo -e "\n" + echo "policy numbers from ric1:" curl -skw " %{http_code}" $httpx://$a1_sim_osc_0_host:$a1_sim_osc_0_port/counter/num_instances echo -e "\n" @@ -120,4 +146,4 @@ echo -e "\n" echo "policy id 2100 from policy agent:" curl -k -X GET -sw " %{http_code}" $httpx://$policy_agent_host:$policy_agent_port/policy?id=2100 -echo -e "\n" \ No newline at end of file +echo -e "\n"