Skip to content

feat(pcf): Implement individual SM Policy, implements Issue #2

Stefan Spettel requested to merge individual_sm_policy_feature into develop
  • Implement receiving and deleting policy associations
  • Implement update procedures based on triggers: Currently only PLMN_CH, AC_TY_CH, UE_IP_CH, RAT_TY_CH are handled. The reply is always the original policy

Sample Requests

Prerequisite: Create a policy association (see MR !2 (merged))
Then, store the URI from the Location Header in the response. (The ID in the examples is always 1)

Sample CURL request GET

curl -X GET http://host:port/npcf-smpolicycontrol/v1/sm-policies/1

Response

SmPolicyControl (contains context and policy decision):

{
  "context": {
    "dnn": "default",
    "notificationUri": "not_supported_right_now",
    "pduSessionId": 42,
    "pduSessionType": "IPV4",
    "sliceInfo": {
      "sd": "123",
      "sst": 222
    },
    "supi": "imsi-208950000000032"
  },
  "policy": {
    "pccRules": {
      "supi-rule-edge": {
        "flowInfos": [
          {
            "flowDescription": "permit out ip from 8.8.8.8 to assigned"
          }
        ],
        "pccRuleId": "supi-rule-edge",
        "precedence": 9,
        "refTcData": [
          "edge-traffic"
        ]
      },
      "supi-rule-internet": {
        "flowInfos": [
          {
            "flowDescription": "permit out ip from any to assigned"
          }
        ],
        "pccRuleId": "supi-rule-internet",
        "precedence": 10,
        "refTcData": [
          "default-traffic"
        ]
      }
    },
    "traffContDecs": {
      "default-traffic": {
        "routeToLocs": [
          {
            "dnai": "internet-dn",
            "routeProfId": "route-internet"
          }
        ],
        "tcId": "default-traffic"
      },
      "edge-traffic": {
        "routeToLocs": [
          {
            "dnai": "edge-dn",
            "routeProfId": "route-edge1"
          }
        ],
        "tcId": "edge-traffic"
      }
    }
  }
}

Sample DELETE request

The body of the request is ignored for now

curl -i -X POST  http://host:port/npcf-smpolicycontrol/v1/sm-policies/1/delete -H 'Content-Type: application/json' -d '{}'

Response

204 No Content when deleted or 404 when ID is not found. (No body)

Sample Update request

curl -i -X POST  http://host:port/npcf-smpolicycontrol/v1/sm-policies/1/update -H 'Content-Type: application/json' -d '{"repPolicyCtrlReqTriggers": ["UE_IP_CH"], "ipv4Address": "10.20.30.40"}'

Response

Policy Decision (the same as the one which is contained in "policy" from the GET request)

Edited by Stefan Spettel

Merge request reports

Loading