Uploaded image for project: 'Common Controller SDK'
  1. Common Controller SDK
  2. CCSDK-1307

Naming MS integration with new Policy Model Driven API

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: High High
    • Frankfurt Release
    • None
    • None

      New Policy Life cycle APIhttps://onap.readthedocs.io/en/elalto/submodules/policy/parent.git/docs/offeredapis.html

       

       Network Naming mS will call a new Policy api to retrieve the content of naming policies. 

      GET /policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/latest

      Retrieve the latest version of a particular policy

      • Produces: [u’application/json’]
      • Description: Returns the latest version of specified policy

      Parameters

      Name Position Description Type
      policyTypeId path ID of policy type string
      policyTypeVersion path Version of policy type string
      policyId path ID of policy string
      X-ONAP-RequestID header RequestID for http transaction string

      Responses

      200 - successful operation; Latest version of specified policy matching specified policy type will be returned.

      404 - Resource Not Found

      403 - Authorization Error

      500 - Internal Server Error

      401 - Authentication Error

       

       

       

       

       

       

       

       

       

       

       

       

       

      I also wanted to mention that we are using the legacy api.

       

      Lets plan for El Alto release to migrate to the new API.

       

       

       

       

      Yuriy Malakov

      SDN-CP Lead Engineer

      732-420-3030, [Q-Chat|qto://talk/ym9479]

      Yuriy.Malakov@ATT.COM

       

      From: MALAKOV, YURIY
      Sent: Monday, May 06, 2019 11:27 AM
      To: PLATANIA, MARCO <platania@research.att.com>; MOKRY, MICHAEL A <mm117s@att.com>; HERNANDEZ-HERRERO, JORGE <jh1730@att.com>; DRAGOSH, PAM <pdragosh@research.att.com>
      Cc: 'de Talhouet, Alexis' <alexis.de_talhouet@bell.ca>; THOMAS, BIJU <bt2983@att.com>; RAMASAMY, MUTHUMANOHAR <mm3481@att.com>
      Subject: RE: CDS naming policies

       

      There is no changes to the model.

      Just update to the instance.

       

       

       

      Yuriy Malakov

      SDN-CP Lead Engineer

      732-420-3030, [Q-Chat|qto://talk/ym9479]

      Yuriy.Malakov@ATT.COM

       

      From: PLATANIA, MARCO
      Sent: Monday, May 06, 2019 11:25 AM
      To: MOKRY, MICHAEL A <mm117s@att.com>; HERNANDEZ-HERRERO, JORGE <jh1730@att.com>; DRAGOSH, PAM <pdragosh@research.att.com>; MALAKOV, YURIY <ym9479@att.com>
      Subject: Re: CDS naming policies

       

      Adding Yuriy to double check, but I think the SDNC-GenerateName model is the same, we just get rid of “nf-role” in the naming properties, even because that nf-role was there in Casablanca but only used in one naming-recipe. CDS can handle this internally. Please see the new vs. the old naming policy. Deleted elements are highlighted in the old naming policy.

       

      Thanks,

      Marco

       

      NEW

       

      {

        "configBody": {

          "service": "SDNC-GenerateName",

          "version": "CSIT",

          "content": {

            "policy-instance-name": "ONAP_VNF _NAMING_TIMESTAMP",

            "naming-models": [

              {

                "naming-properties": [

                 

      {               "property-name": "AIC_CLOUD_REGION"             }

      ,

                 

      {               "property-name": "nfRole"             }

      ,

                 

      {               "property-name": "TIMESTAMP"             }

      ,

                 

      {               "property-value": "_",               "property-name": "DELIMITER"             }

                ],

                "naming-type": "VNF",

                "naming-recipe" "AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP"

              },

              {

                "naming-properties": [

                 

      {               "property-name": "VNF_NAME"             }

      ,

                  {

                    "property-name": "SEQUENCE",

                    "increment-sequence":

      {                 "max": "zzz",                 "scope": "ENTIRETY",                 "start-value": "001",                 "length": "3",                 "increment": "1",                 "sequence-type": "alpha-numeric"               }

                  },

                 

      {               "property-name": "NFC_NAMING_CODE"             }

      ,

                 

      {               "property-value": "_",               "property-name": "DELIMITER"             }

                ],

                "naming-type": "VNFC",

                "naming-recipe": "VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE"

              },

              {

                "naming-properties": [

                 

      {               "property-name": "VNF_NAME"             }

      ,

                 

      {               "property-value": "_",               "property-name": "DELIMITER"             }

      ,

                 

      {               "property-name": "VF_MODULE_LABEL"             }

      ,

                 

      {               "property-name": "VF_MODULE_TYPE"             }

      ,

                  {

                    "property-name": "SEQUENCE",

                    "increment-sequence":

      {                 "max": "zzz",                 "scope": "PRECEEDING",                 "start-value": "01",                 "length": "3",                 "increment": "1",                 "sequence-type": "alpha-numeric"               }

                  }

                ],

                "naming-type": "VF-MODULE",

                "naming-recipe": "VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE"

              }

            ]

          }

        }

      }

       

       

      OLD

       

      {

         "configBody":{

            "service":"SDNC-GenerateName",

            "version":"CSIT",

            "content":{

               "policy-instance-name":"ONAP_VNF _NAMING_TIMESTAMP",

               "naming-models":[

                  {

                     "naming-properties":[

                       

      {                      "property-name":"AIC_CLOUD_REGION"                   }

      ,

                        

      {                      "property-name":"nfRole"                   }

      ,

                       

      {                      "property-name":"TIMESTAMP"                   }

      ,

                       

      {                      "property-value":"_",                      "property-name":"DELIMITER"                   }

                     ],

                     "naming-type":"VNF",

                     "nfRole":"vFW",

                     "naming-recipe":"AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP"

                  },

                  {

                     "naming-properties":[

                       

      {                      "property-name":"VNF_NAME"                   }

      ,

                        {

                           "property-name":"SEQUENCE",

                           "increment-sequence":

      {                         "max":"zzz",                         "scope":"ENTIRETY",                         "start-value":"001",                         "length":"3",                         "increment":"1",                         "sequence-type":"alpha-numeric"                      }

                        },

                       

      {                      "property-name":"NFC_NAMING_CODE"                   }

      ,

                       

      {                      "property-value":"_",                      "property-name":"DELIMITER"                   }

                     ],

                     "naming-type":"VNFC",

                     "nfRole":"vFW",

                     "naming-recipe":"VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE"

                  },

                  {

                     "naming-properties":[

                       

      {                      "property-name":"VNF_NAME"                   }

      ,

                       

      {                      "property-value":"_",                      "property-name":"DELIMITER"                   }

      ,

                       

      {                      "property-name":"VF_MODULE_LABEL"                   }

      ,

                       

      {                      "property-name":"VF_MODULE_TYPE"                   }

      ,

                        {

                           "property-name":"SEQUENCE",

                           "increment-sequence":

      {                         "max":"zzz",                         "scope":"PRECEEDING",                         "start-value":"01",                         "length":"3",                         "increment":"1",                         "sequence-type":"alpha-numeric"                      }

                        }

                     ],

                     "naming-type":"VF-MODULE",

                     "nfRole":"vFW",

                     "naming-recipe":"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE"

                  },

                  {

                     "naming-properties":[

                       

      {                      "property-name":"VNF_NAME"                   }

                     ],

                     "naming-type":"KEY",

                     "nfRole":"vFW",

                     "naming-recipe":"VNF_NAME"

                  },

                  {

                     "naming-properties":[

                       

      {                      "property-name":"VNF_NAME"                   }

      ,

                       

      {                      "property-value":"protected",                      "property-name":"CONSTANT"                   }

      ,

                       

      {                      "property-value":"_",                      "property-name":"DELIMITER"                   }

                     ],

                     "naming-type":"protected_private_net_id",

                     "nfRole":"vFW",

                     "naming-recipe":"VNF_NAME|DELIMITER|CONSTANT"

                  },

                  {

                     "naming-properties":[

                       

      {                      "property-name":"VNF_NAME"                   }

      ,

                       

      {                     "property-value":"unprotected",                      "property-name":"CONSTANT"                   }

      ,

                       

      {                      "property-value":"_",                      "property-name":"DELIMITER"                   }

                     ],

                     "naming-type":"unprotected_private_net_id",

                     "nfRole":"vFW",

                     "naming-recipe":"VNF_NAME|DELIMITER|CONSTANT"

                  }

               ]

            }

         }

      }

       

       

       

      From: "MOKRY, MICHAEL A" <mm117s@att.com>
      Date: Monday, May 6, 2019 at 11:17 AM
      To: "HERNANDEZ-HERRERO, JORGE" <jh1730@att.com>, "PLATANIA, MARCO (MARCO)" <platania@research.att.com>, "DRAGOSH, PAMELA L (PAM)" <pdragosh@research.att.com>
      Subject: RE: CDS naming policies

       

      If there are no changes to the “SDNC-GenerateName” model/service then it is simply removing those extra preloaded policies from the script and adding the new one.  If there are changes to the model/service then we need to modify the sql scripts to insert the new model into the db during startup.

       

      Either way its not a huge effort from policy/engine end in my opinion.

       

       

      Regards,

       ** 

      Michael A. Mokry

      Senior – Software Engineer

      AT&T Services Inc.

      Network Cloud & Infrastructure | ECOMP Platform & Systems

      Office:  815.426.7006 | Mobile: 630.234.8676

       

      From: HERNANDEZ-HERRERO, JORGE
      Sent: Monday, May 06, 2019 9:25 AM
      To: PLATANIA, MARCO <platania@research.att.com>; DRAGOSH, PAM <pdragosh@research.att.com>
      Cc: MOKRY, MICHAEL A <mm117s@att.com>
      Subject: RE: CDS naming policies

       

      Mike, can you assess if there’s impact on Marco’s work?

      Jorge

       

      From: PLATANIA, MARCO
      Sent: Monday, May 6, 2019 9:00 AM
      To: DRAGOSH, PAM <pdragosh@research.att.com>; HERNANDEZ-HERRERO, JORGE <jh1730@att.com>
      Subject: Re: CDS naming policies

       

      I think CDS will do the same job as Casablanca, the only difference is that instead of 5 policies we’ll have only 1. I’m not sure if and how model changes will impact CDS work.

       

      Marco

       

      From: "DRAGOSH, PAMELA L (PAM)" <pdragosh@research.att.com>
      Date: Monday, May 6, 2019 at 9:50 AM
      To: "HERNANDEZ-HERRERO, JORGE" <jh1730@att.com>, "PLATANIA, MARCO (MARCO)" <platania@research.att.com>
      Subject: Re: CDS naming policies

       

      That’s fine – we did not migrate naming policies this release and they are not proposing that.

       

      But you will have to see if the old legacy api can handle model changes. Cross your fingers on that.

       

      Pam

       

      From: "HERNANDEZ-HERRERO, JORGE" <jh1730@att.com>
      Date: Monday, May 6, 2019 at 9:45 AM
      To: "PLATANIA, MARCO (MARCO)" <platania@research.att.com>
      Cc: "DRAGOSH, PAMELA L (PAM)" <pdragosh@research.att.com>
      Subject: RE: CDS naming policies

       

      Hi Marco,

       

      Just a note that the push-policies.sh uses the legacy APIs.   We are moving away from them, but still available in this release.    To use the legacy apis, putting it in the push-policies.sh would work.    Note that policies using the legacy apis and the new ones are not compatible.   So, if you create the vFW policy with new apis, won’t be available with the old api.

       

      Jorge

       

      From: PLATANIA, MARCO
      Sent: Monday, May 6, 2019 8:13 AM
      To: HERNANDEZ-HERRERO, JORGE <jh1730@att.com>
      Cc: DRAGOSH, PAM <pdragosh@research.att.com>
      Subject: CDS naming policies

       

      Jorge,

       

      We want to modify the naming policies used by CDS. Instead of a naming policy per VNF, we have a single policy that all the VNFs can share, while VNF-specific parameters will be resolved internally by CDS. My guess is that I have to change the push-policies.sh script in OOM only. Am I correct, or is there something else to change?

       

      BTW, the new policy is below.

       

      Thanks,

      Marco

       

       

      {

        "configBody": {

          "service": "SDNC-GenerateName",

          "version": "CSIT",

          "content": {

            "policy-instance-name": "ONAP_VNF _NAMING_TIMESTAMP",

            "naming-models": [

              {

                "naming-properties": [

                 

      {               "property-name": "AIC_CLOUD_REGION"             }

      ,

                 

      {               "property-name": "nfRole"             }

      ,

                 

      {               "property-name": "TIMESTAMP"             }

      ,

                 

      {               "property-value": "_",               "property-name": "DELIMITER"             }

                ],

                "naming-type": "VNF",

                "naming-recipe": "AIC_CLOUD_REGION|DELIMITER|nfRole|DELIMITER|TIMESTAMP"

              },

              {

                "naming-properties": [

                 

      {               "property-name": "VNF_NAME"             }

      ,

                  {

                    "property-name": "SEQUENCE",

                    "increment-sequence":

      {                 "max": "zzz",                 "scope": "ENTIRETY",                 "start-value": "001",                 "length": "3",                 "increment": "1",                 "sequence-type": "alpha-numeric"               }

                  },

                 

      {               "property-name": "NFC_NAMING_CODE"             }

      ,

                 

      {               "property-value": "_",               "property-name": "DELIMITER"             }

                ],

                "naming-type": "VNFC",

                "naming-recipe": "VNF_NAME|DELIMITER|NFC_NAMING_CODE|DELIMITER|SEQUENCE"

              },

              {

                "naming-properties": [

                 

      {               "property-name": "VNF_NAME"             }

      ,

                 

      {               "property-value": "_",               "property-name": "DELIMITER"             }

      ,

                 

      {               "property-name": "VF_MODULE_LABEL"             }

      ,

                 

      {               "property-name": "VF_MODULE_TYPE"             }

      ,

                  {

                    "property-name": "SEQUENCE",

                    "increment-sequence":

      {                 "max": "zzz",                 "scope": "PRECEEDING",                 "start-value": "01",                 "length": "3",                 "increment": "1",                 "sequence-type": "alpha-numeric"               }

                  }

                ],

                "naming-type": "VF-MODULE",

                "naming-recipe": "VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE"

              }

            ]

          }

        }

      }

       

            bt2983 bt2983
            ym9479 ym9479
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: