Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Since there's big change in the config that we send to Policy framework for policy retrieving, we need to modify our code accordingly to match that logic.

Config changes in policy retrieval

Legacy Config Example

The legacy config we sent for policy retrieval contains the prefix for each release, the geography info as well as the service information. 

#Scope with geography
{ "policyName": "OSDF_DUBLIN.*",
  "configAttributes": {"policyScope": "us"} 

#Scope with service name
{ "policyName": "OSDF_DUBLIN.*",
  "configAttributes": {"policyScope": "vfw"} 

New Config Example

In the new config we sent for policy retrieval, the prefix is no longer needed. And for the geography and service name, the values need to be put under certain keys.

{"ONAPName": "OOF",
 "ONAPComponent": "OSDF",
 "ONAPInstance": "",
 "action": "optimize",
 "resource": {
     "geography": "us",
     "services": "vfw"
     "scope": "xxx" //Optional
 }}

Change in OSDF common config

Legacy configuration in common.config and also a draft config according to the new payload.


...
policy_info:
    prioritization_attributes:
        policy_type:
            - content.policyType
        resources:
            - content.resources
            - content.objectiveParameter.parameterAttributes.resources
        service_name:
            - content.serviceName

    placement:
        policy_fetch: by_scope
        policy_scope:
            default_scope: OSDF_DUBLIN            //This part could be removed
            vcpe_scope: OSDF_DUBLIN
            vfw_scope: OSDF_DUBLIN
            td_scope: OSDF_DUBLIN
            secondary_scopes:
                -
                    - get_param: service_name      //This part is better to be changed as KV pair
                    - US
    #            -
    #                - get_param: service_name
    #                - get_param: subscriber_role
    default:  # if no explicit service related information is needed
        policy_fetch: by_name
        policy_scope: none
...
policy_info:
    prioritization_attributes:
        policy_type:
            - content.policyType
        resources:
            - content.resources
            - content.objectiveParameter.parameterAttributes.resources
        service_name:
            - content.serviceName

    placement:
        policy_fetch: by_scope
        policy_scope:
            - scopes:
                - geography:
                    - US
                - services:
                    - get_param: service_name
                - scope
                    - get_param: subscriber_role
    #            -
    #                - get_param: service_name
    #                - get_param: subscriber_role
    default:  # if no explicit service related information is needed
        policy_fetch: by_name
        policy_scope: none









  • No labels