Επεξεργασία

Κοινή χρήση μέσω


About parameter exposure using the Azure Operator Service Manager (AOSM) CLI extension

This document explains how the Azure Operator Service Manager (AOSM) Azure CLI extension translates helm values and parameters in ARM templates into a configuration model exposed to an operator.

Background

AOSM allows the publisher of a Network Function Definition Version (NFDV) to choose which parameters are configurable when deploying the Network Function (NF). AOSM also allows the designer of a Network Service Design Version (NSDV) to choose which parameters are configurable when deploying the Site Network Service (SNS).

The choice of which parameters are exposed is encoded in one or more schemas. The publisher defines the schema in a property of the NFDV (the deployParameters property); the designer defines the schema in a separate Azure resource - the Configuration Group Schema (CGS). The CGS and NSDV must pass a set of parameters and values to the NFDV that match the schema in the NFDV.

The Azure CLI AOSM extension contains support for automatic generation of the NFDV deployParameters property, the CGS, and the mappings that ensure all parameters are correctly passed to the NF at deployment time.

Input file configuration

The Azure CLI AOSM extension az aosm nfd generate-config command generates an input file. The input file varies based on the --definition-type parameter. All variants contain the following parameter:

  // If set to true, all NFD configuration parameters are made available to the designer, including optional parameters and those with defaults.
  // If not set or set to false, only required parameters without defaults will be exposed.
  "expose_all_parameters": false,

This parameter controls the parameter exposure behavior in the AOSM CLI extension.

Warning

By exposing all parameters you are also exposing all your defaults. Make sure your defaults do not contain any sensitive information.

Default behavior

expose_all_parameters is always set to false by default. The AOSM CLI:

  • parses the Containerized Network Function (CNF) helm values or the Virtualized Network Function (VNF) Azure Resource Manager (ARM) template parameters
  • generates a deployParameters schema in the NFDV that contains any required parameters that don't have a default value

For example, this excerpt of a VNF ARM template defines two parameters. One is required and one is optional.

  "parameters": {
    "required": {
      "type": "string",
      "metadata": {
        "description": "A required parameter."
      }
    },
    "optional": {
      "type": "string",
      "defaultValue": "optional"
      "metadata": {
        "description": "An optional parameter."
      }
    },
  }

The AOSM CLI builds an NFDV that exposes the required parameter in the deployParameters property. The optional parameter isn't exposed. At deployment time, the VNF deploys with optional set to the default value of optional. The user triggering the deployment must provide a value for required.

The behavior is similar for CNFs. The AOSM CLI allows the user to provide a values.yaml file that overrides the default values.yaml file in the helm chart. This override values.yaml file can contain parameters with or without values. The following excerpt of a values.yaml override file shows a parameter with a value and a parameter without a value.

optional: "optional"
required:

The AOSM CLI builds an NFDV that exposes the required parameter in the deployParameters property. The optional parameter isn't exposed. At deployment time, the CNF deploys with optional set to the default value of optional. The user triggering the deployment must provide a value for required.

Important

The AOSM CLI validates that the default values.yaml file in the helm chart is consistent with the chart by running helm template. The CLI raises an error if this helm template command fails.

Expose all parameters

The Azure AOSM CLI Extension supports making all parameters configurable. The required configuration in the input file generated by az aosm nfd generate-config is:

  // If set to true, all NFD configuration parameters are made available to the designer, including optional parameters and those with defaults.
  // If not set or set to false, only required parameters without defaults will be exposed.
  "expose_all_parameters": true,

The AOSM CLI Extension, if expose_all_parameters is set to true:

  • parses the Containerized Network Function (CNF) helm values or the Virtualized Network Function (VNF) Azure Resource Manager (ARM) template parameters
  • generates a deployParameters schema in the NFDV that contains all of the parsed parameters
  • any defaults in the ARM template or values configured in the helm values are configured as defaults in the NFDV deployParameters schema.

CGS construction

In all cases, all parameters exposed by the az aosm nfd build command are added to the CGS during the az aosm nsd build command. The AOSM CLI extension also adds some extra parameters to the CGS, not parsed from the ARM Template or helm values, such as customLocationId and managedIdentityId. These parameters are needed to deploy the Site Network Service on the target environment.

Next Steps