Skip to content

Commit 828c3c0

Browse files
authored
Update configuration-guide.md
score updates
1 parent 160b37c commit 828c3c0

File tree

1 file changed

+37
-35
lines changed

1 file changed

+37
-35
lines changed

articles/operator-service-manager/configuration-guide.md

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ ms.service: azure-operator-service-manager
99
---
1010

1111
# Workload configuration management
12-
This article provides guidelines that NF vendors, telco operators, and their partners can follow to optimize the design of configuration group schemes and the operation of configuration group values. Keep these practices in mind when you onboard and deploy your NFs.
12+
This article provides guidelines that NF vendors, telco operators, and their partners can follow to optimize the design of configuration group schemas (CGS) and the operation of configuration group values (CGV) when using Azure Operator Service Manager (AOSM). Keep these practices in mind when you onboard and deploy your NFs.
1313

1414
## What is JSON schema
15-
JSON Schema is an IETF standard providing a format for what JSON data is required for a given application and how to interact with it. Applying such standards for a JSON document lets you enforce consistency and data validity across JSON data
15+
JSON Schema is an Internet Engineering Task Force (IETF) standard providing a format for what JSON data is required for a given application and how to interact with it. Applying such standards for a JSON document lets you enforce consistency and data validity across JSON data
1616

1717
### Where is JSON schema used
18-
* AOSM service uses JSON schema notation as a meta-schema within CGS `ConfigurationGroupSchemaPropertiesFormat` object `schemaDefinition` properties. For more information on CG schema see the [swagger documentation](https://learn.microsoft.com/en-us/rest/api/hybridnetwork/configuration-group-schemas/create-or-update?view=rest-hybridnetwork-2023-09-01&tabs=HTTP#configurationgroupschemapropertiesformat).
18+
* AOSM service uses JSON schema notation as a meta-schema within CGS `ConfigurationGroupSchemaPropertiesFormat` object `schemaDefinition` properties. For more information on CGS, see the [swagger documentation](https://learn.microsoft.com/en-us/rest/api/hybridnetwork/configuration-group-schemas/create-or-update?view=rest-hybridnetwork-2023-09-01&tabs=HTTP#configurationgroupschemapropertiesformat).
1919
* AOSM service allows the designer and publisher to specify the JSON schema where operator must provide data (JSON Values) when instantiating an SNS/NF.
2020
* AOSM service allows the meta-schema properties be optional or required. Where a property is marked required, it must be specified in the values Json.
2121

2222
### What JSON keywords are supported
23-
For the CG meta-schema, AOSM implements supports for JSON standard keywoards on a type by type basis.
23+
For the CG meta-schema, AOSM implements supports for JSON standard keywords on a type by type basis.
2424

2525
* For object types, keyword supported is limited by filter policy. See JSON Schema - [object](https://json-schema.org/understanding-json-schema/reference/object)
26-
* For string types, keyword support is not limited or filtered. See JSON Schema - [string](https://json-schema.org/understanding-json-schema/reference/string)
27-
* For numeric types, keyword support is not limited or filtered. See JSON Schema - [numeric](https://json-schema.org/understanding-json-schema/reference/numeric)
26+
* For string types, keyword support isn't limited or filtered. See JSON Schema - [string](https://json-schema.org/understanding-json-schema/reference/string)
27+
* For numeric types, keyword support isn't limited or filtered. See JSON Schema - [numeric](https://json-schema.org/understanding-json-schema/reference/numeric)
2828

2929
## Optional and Required fields
30-
A property can be declared as an optional field if publisher/designer explicitly provides a required section and the required section does not contain the property that needs to be optional. An optional property can also have defaults to it. A property is required if the designer/publisher has not specified the required section and the property does not have defaults.
30+
An optional property is declared by including a required keywork which doesn't contain the optional property. An optional property can also have defaults to it. A property is required if the designer/publisher hasn't specified the required section and the property doesn't have defaults.
3131

3232
```json
3333
{
@@ -48,10 +48,10 @@ A property can be declared as an optional field if publisher/designer explicitly
4848

4949

5050
## Defaults Values in JSON Schema
51-
AOSM service implements a custom method of default value handling, which can be provided for optional properties. When the publisher or designer define default values in CG meta-schema, AOSM uses these value for properties that are missing or undefined in the input CG values data. AOSM service validator logic essemtially hydrates the CG value input with default where no optional value has been provided by operator.
51+
For optional properties, AOSM implements a custom method of default value handling. When a default value is defined in CGS meta-schema, AOSM uses that value where the property is missing or undefined in the input CGV data. AOSM validator logic essentially hydrates the CGV value with the default value when no value has been provided by operator.
5252

5353
### How to define defaults
54-
Defaults must be specified either inside properties or inside items of array. The following example demonstrates defaults with integer and strying property types.
54+
Defaults must be specified either inside properties or inside items of array. The following example demonstrates defaults with integer and trying property types.
5555

5656
```json
5757
{
@@ -70,18 +70,20 @@ Defaults must be specified either inside properties or inside items of array. Th
7070
```
7171

7272
### Rules for defining defaults
73-
A field which has a “default” should not be defined in the required section of the schema. During the validation process (CGV creation and NF creation), if a property is missing or undefined in the input data, the validator will assign values from default keyword in the schemas of properties and items (when it is the array of schemas) to the missing properties and items.
73+
The following rules are applied when validating a default value. Consider these rules when using default values to ensure expected outcomes:
7474

75-
Defaults are evaluated in top-down order from where the property is seen. If a property exists in input Json, only its child properties will be evaluated for defaults. If the property does not exist in input Json, then its default will be evaluated along with any child properties which do not exist in the defaults of the property.
76-
77-
If default for an object is not specified and the input json does not contain the object key, then no defaults which are provided under the properties of the object are evaluated.
75+
* A default value shouldn't be applied to a required property.
76+
* A default value is evaluated in top-down order, from where the keyword is first seen.
77+
* Where a property value exist in the input CGV, only children of those properties are evaluated for defaults.
78+
* Where a property value doesn't exist in the input CGV, it is evaluated for a default, along with any children.
79+
* Where a proerty value is type object, and neither it nor it's key exist in the input CGV, then no defaults for the object are evaluated.
7880

7981
## Configuration Group Schema considerations
8082
We recommend that you always start with a single CGS for the entire NF. If there are site-specific or instance-specific parameters, we still recommend that you keep them in a single CGS. We recommend splitting into multiple CGSs when there are multiple components (rarely NFs, more commonly, infrastructure) or configurations that are shared across multiple NFs. The number of CGSs defines the number of CGVs.
8183

8284
### Scenario
8385

84-
- FluentD, Kibana, and Splunk (common third-party components) are always deployed for all NFs within an NSD. We recommend grouping these components into a single NFDG.
86+
- FluentD, Kibana, and Splunk (common third-party components) are always deployed for all NFs within an network service design (NSD). We recommend grouping these components into a single network function design group (NFDG).
8587
- NSD has multiple NFs that all share a few configurations (deployment location, publisher name, and a few chart configurations).
8688

8789
In this scenario, we recommend that you use a single global CGS to expose the common NF and third-party component configurations. You can define NF-specific CGS as needed.
@@ -97,43 +99,43 @@ In this scenario, we recommend that you use a single global CGS to expose the co
9799

98100
CGS payload:
99101

100-
<pre>
102+
```json
101103
{
102-
  "type": "object",
103-
  "properties": {
104-
    "abc": {
105-
    "type": "integer",
106-
    <b>"default": 30</b>
107-
    },
108-
    "xyz": {
109-
    "type": "integer",
110-
    <b>"default": 40</b>
111-
    },
112-
    "qwe": {
113-
    "type": "integer" //doesn't have defaults
114-
    }
115-
  }
116-
  "required": "qwe"
104+
"type": "object",
105+
"properties": {
106+
"abc": {
107+
"type": "integer",
108+
"default": 30
109+
},
110+
"xyz": {
111+
"type": "integer",
112+
"default": 40
113+
},
114+
"qwe": {
115+
"type": "integer"
116+
}
117+
}
118+
"required": "qwe"
117119
}
118-
</pre>
120+
```
119121

120122
Corresponding CGV payload passed by the operator:
121123

122-
<pre>
124+
```json
123125
{
124126
"qwe": 20
125127
}
126-
</pre>
128+
```
127129

128130
Resulting CGV payload generated by Azure Operator Service Manager:
129131

130-
<pre>
132+
```json
131133
{
132134
"abc": 30,
133135
"xyz": 40,
134136
"qwe": 20
135137
}
136-
</pre>
138+
```
137139

138140
## Configuration Group Values considerations
139141

0 commit comments

Comments
 (0)