-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into TELCO-723-creating-fiveg-gnb-identity-interface
- Loading branch information
Showing
9 changed files
with
190 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
docs/json_schemas/interfaces/sdcore_management/provider.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"title": "ProviderSchema", | ||
"description": "The schema for the provider side of the sdcore_management interface.", | ||
"type": "object", | ||
"properties": { | ||
"unit": { | ||
"$ref": "#/definitions/BaseModel" | ||
}, | ||
"app": { | ||
"$ref": "#/definitions/SdcoreManagementProviderAppData" | ||
} | ||
}, | ||
"required": [ | ||
"app" | ||
], | ||
"definitions": { | ||
"BaseModel": { | ||
"title": "BaseModel", | ||
"type": "object", | ||
"properties": {} | ||
}, | ||
"SdcoreManagementProviderAppData": { | ||
"title": "SdcoreManagementProviderAppData", | ||
"type": "object", | ||
"properties": { | ||
"management_url": { | ||
"title": "Management Url", | ||
"description": "The endpoint to use to manage SD-Core network.", | ||
"examples": [ | ||
"http://1.2.3.4:1234" | ||
], | ||
"minLength": 1, | ||
"maxLength": 2083, | ||
"format": "uri", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"management_url" | ||
] | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
docs/json_schemas/interfaces/sdcore_management/requirer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"title": "RequirerSchema", | ||
"description": "The schema for the requirer side of the sdcore_management interface.", | ||
"type": "object", | ||
"properties": { | ||
"unit": { | ||
"$ref": "#/definitions/BaseModel" | ||
}, | ||
"app": { | ||
"$ref": "#/definitions/BaseModel" | ||
} | ||
}, | ||
"definitions": { | ||
"BaseModel": { | ||
"title": "BaseModel", | ||
"type": "object", | ||
"properties": {} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# `sdcore_management` | ||
|
||
## Usage | ||
|
||
Within Charmed-5G, the components that makes configuration changes to the network require access to the configuration and management service. | ||
|
||
The `sdcore_management` relation interface describes the expected behavior of any charm claiming to provide or consume the information to access the configuration service in SD-Core. | ||
|
||
SD-Core Webui Operator that is responsible for the configuration of the SD-Core network within Charmed-5G is a typical provider and SD-Core NMS (Network Management System) Operator that provides a user interface to manage and configure the network is a typical requirer of this relation. | ||
|
||
## Direction | ||
|
||
```mermaid | ||
flowchart TD | ||
Provider -- management_url --> Requirer | ||
``` | ||
|
||
As with all Juju relations, the `sdcore_management` interface consists of two parties: a Provider and a Requirer. | ||
|
||
## Behavior | ||
|
||
Both the Requirer and the Provider need to adhere to criteria to be considered compatible with the interface. | ||
|
||
### Provider | ||
|
||
- Is expected to provide the address to access the SD-Core configuration service endpoint. | ||
|
||
### Requirer | ||
|
||
- Is expected to use the endpoint address provided to connect to the configuration service. | ||
|
||
## Relation Data | ||
|
||
[\[Pydantic Schema\]](./schema.py) | ||
|
||
#### Example | ||
|
||
```yaml | ||
provider: | ||
app: { | ||
"management_url": "http://1.2.3.4:1234", | ||
} | ||
unit: {} | ||
requirer: | ||
app: {} | ||
unit: {} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
providers: [] | ||
requirers: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""This file defines the schemas for the provider and requirer sides of the `sdcore_management` relation interface. | ||
It must expose two interfaces.schema_base.DataBagSchema subclasses called: | ||
- ProviderSchema | ||
- RequirerSchema | ||
Examples: | ||
ProviderSchema: | ||
unit: <empty> | ||
app: { | ||
"management_endpoint": "http://1.2.3.4:1234", | ||
} | ||
RequirerSchema: | ||
unit: <empty> | ||
app: <empty> | ||
""" | ||
|
||
from interface_tester.schema_base import DataBagSchema | ||
from pydantic import BaseModel, Field, HttpUrl | ||
|
||
|
||
class SdcoreManagementProviderAppData(BaseModel): | ||
management_url: HttpUrl = Field( | ||
description="The endpoint to use to manage SD-Core network.", | ||
examples=["http://1.2.3.4:1234"], | ||
) | ||
|
||
|
||
class ProviderSchema(DataBagSchema): | ||
"""The schema for the provider side of the sdcore_management interface.""" | ||
|
||
app: SdcoreManagementProviderAppData | ||
|
||
|
||
class RequirerSchema(DataBagSchema): | ||
"""The schema for the requirer side of the sdcore_management interface.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters