chore: gnpy yang models

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I68502e76e27b43d2a6f6a5741045df3095fc7ccd
This commit is contained in:
EstherLerouzic
2025-05-30 16:37:57 +02:00
parent b76c529c0c
commit 6603a50e78
7 changed files with 3375 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
module gnpy-api {
yang-version 1.1;
namespace "urn:gnpy-api";
prefix gapi;
organization
"Telecom Infra Project OOPT PSE Working Group";
contact
"WG Web: <https://github.com/Telecominfraproject/oopt-gnpy>
contact: <mailto:esther.lerouzic@orange.com>
";
description
"YANG model for gnpy network input for path computation simulation params- 2025";
revision 2025-06-13 {
description
"First yang model for api";
reference
"YANG model for network input for API path computation with gnpy";
}
container api {
description
"Top container for the API data.";
list extra-configs {
key name;
description
"List of extra configurations for the amplifiers defined in the
equipment libraries.";
leaf name {
type string;
description "Unique name used in the equipment library to reference this config.";
}
}
list extra-eqpts {
key name;
description
"List of additional libraries, eg for third party pluggables definitions.";
leaf name {
type string;
description "Unique name of the extra library.";
}
}
}
}

View File

@@ -0,0 +1,95 @@
module gnpy-edfa-config {
yang-version 1.1;
namespace "urn:gnpy-edaf-config";
prefix edfa-config;
import gnpy-api {
prefix "gapi";
revision-date 2025-06-13;
}
import gnpy-eqpt-config {
prefix "geqpt";
revision-date 2025-05-26;
}
organization
"Telecom Infra Project OOPT PSE Working Group";
contact
"WG Web: <https://github.com/Telecominfraproject/oopt-gnpy>
contact: <mailto:esther.lerouzic@orange.com>
";
description
"YANG model for gnpy network input for path computation extra edfa config- 2025";
revision 2025-04-10 {
description
"First yang model for extra edfa config option";
reference
"YANG model for network input for path computation with gnpy";
}
grouping edfa-config-grouping {
description
"Attributes for detailed configuration of EDFA.";
leaf f_min {
type decimal64 {
fraction-digits 1;
}
mandatory true;
description " Minimum and maximum frequency range for the amplifier.
Signal must fit entirely within this range (center frequency and spectrum width
";
}
leaf f_max {
type decimal64 {
fraction-digits 1;
}
mandatory true;
}
leaf-list nf_ripple {
config false;
type decimal64 {
fraction-digits 18;
}
}
leaf-list dgt {
config false;
type decimal64 {
fraction-digits 18;
}
}
leaf-list gain_ripple {
config false;
type decimal64 {
fraction-digits 18;
}
}
list nf_fit_coeff {
key coef_order;
config false;
uses geqpt:polynomial-coef;
must "./coef_order <= 3";
description "3rd order polynomial NF = f(-dg) coeficients list";
}
}
grouping edfa-config {
container edfa-config {
uses edfa-config-grouping;
}
}
container edfa-config {
uses edfa-config-grouping;
}
augment "/gapi:api/gapi:extra-configs" {
description "Add the list of additional configuration of EDFA in the API request.";
when "/gapi:api/gapi:extra-configs" ;
uses edfa-config;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,877 @@
module gnpy-network-topology {
yang-version 1.1;
namespace "gnpy:gnpy-network-topology";
prefix gnpynt;
import gnpy-api {
prefix "gapi";
revision-date 2025-06-13;
}
import gnpy-eqpt-config {
prefix "geqpt";
revision-date 2025-05-26;
}
organization
"Telecom Infra Project OOPT PSE Working Group";
contact
"WG Web: <https://github.com/Telecominfraproject/oopt-gnpy>
contact: <mailto:ahmed.triki@orange.com>
contact: <mailto:esther.lerouzic@orange.com>
";
description
"YANG model for gnpy network input for path computation - 2020 - candi preversion";
revision 2025-03-01 {
description
"spacing for design band and pmd_coef";
reference
"YANG model for network input for path computation with gnpy";
}
revision 2025-01-20 {
description
"Add RamanFiber, design bands, impairments";
reference
"YANG model for network input for path computation with gnpy";
}
revision 2024-02-21 {
description
"fix namespaces for identity-ref,
add roadm impairment";
reference
"YANG model for network input for path computation with gnpy";
}
revision 2023-02-01 {
description
"change per-degree roadm targets
set 6 digits for fiber length
set 6 digits for loss_coef
add type empty for con_in and con_out";
reference
"YANG model for network input for path computation with gnpy";
}
revision 2022-11-21 {
description
"draft for detecon - GNPy API";
reference
"YANG model for network input for path computation with gnpy";
}
revision 2020-10-22 {
description
"draft for experimental/2020-candi";
reference
"YANG model for network input for path computation with gnpy";
}
identity type-element {
description
"Base identity for element type";
}
identity Transceiver {
base type-element;
description
" Transceiver element";
}
identity Fiber {
base type-element;
description
"Fiber element (unidirectional)";
}
identity RamanFiber {
base type-element;
description
"RamanFiber element (unidirectional)";
}
identity Roadm {
base type-element;
description
"Roadm element";
}
identity Edfa {
base type-element;
description
"Edfa element";
}
identity Fused {
base type-element;
description
"Fused element ; non amplified connection between two fiber spans ;
can be used to model optical distribution frame, or losses due to
connectors or fused in a span";
}
identity Multiband_amplifier {
base type-element;
description
"Multiband_amplifier element";
}
identity length-unit {
description
"length unit";
}
identity km {
base length-unit;
description
"kilometers";
}
identity m {
base length-unit;
description
"meter";
}
typedef Coordinate {
type decimal64 {
fraction-digits 6;
}
description
"Latitude or longitude type";
}
identity pumping-direction {
description
"Raman pumping direction";
}
identity coprop {
base pumping-direction;
description
"forward pumping";
}
identity counterprop {
base pumping-direction;
description
"backward pumping";
}
grouping location-attributes {
description
"grouping for location imformation: city, region names
and coordinates.";
container location {
description
"Information for a node location: city, region names
and coordinates.";
leaf city {
type union {
type string;
type empty;
}
description
"City name.";
}
leaf region {
type union {
type string;
type empty;
}
description
"Region name. Used for filtering purpose.";
}
leaf latitude {
type Coordinate;
description
"Latitude coordinate.";
}
leaf longitude {
type Coordinate;
description
"Longitude coordinate.";
}
}
}
grouping fiber-common-params {
description
"Common attributes to fiber and raman fiber.";
leaf length {
type decimal64 {
fraction-digits 6;
}
mandatory true;
description
"Length of the fiber span.";
}
leaf pmd_coef {
type decimal64 {
fraction-digits 18;
}
units "s/km^0.5";
description "PMD coefficient of the fiber span (s/km^0.5)";
}
choice ref_freq_or_wl {
description
"Definition of the reference: frequency or wavelength.";
case frequency {
leaf ref_frequency {
type decimal64 {
fraction-digits 1;
}
units "Hz";
description
"Reference frequency for all parameters evaluation
(unique for all parameters: beta2, beta3, gamma, effective_area)";
}
}
case wavelength {
leaf ref_wavelength {
type decimal64 {
fraction-digits 12;
}
units "m";
description
"Reference wavelength for all parameters evaluation
(unique for all parameters: beta2, beta3, gamma, effective_area)";
}
}
}
choice dispersion-vector-or-scalar {
description
"Dispersion definition: scalar with its slope or array of
values and the slope is computed based on the values.";
case scalar {
leaf dispersion {
type decimal64 {
fraction-digits 8;
}
units "s.m-1.m-1";
description "Dispersion of the span fiber.";
}
leaf dispersion_slope {
type decimal64 {
fraction-digits 11;
}
units "s.m-1.m-1.m-1";
description "Dispersion slope of the span fiber.";
}
}
case vector {
list dispersion_per_frequency {
key "frequency";
description
"Dispersion per frequency value.";
leaf frequency {
type decimal64 {
fraction-digits 1;
}
units "Hz";
description "Frequency of the loss coef.";
}
leaf dispersion {
type decimal64 {
fraction-digits 8;
}
units "s.m-1.m-1";
description "Dispersion of the span fiber.";
}
}
}
}
leaf effective_area {
type decimal64 {
fraction-digits 14;
}
units "m^2";
description "Effective Area of the span fibery.";
}
leaf gamma{
type decimal64 {
fraction-digits 8;
}
units "w-1.m-1" ;
description "2pi.n2/(lambda*Aeff) (w-2.m-1)";
}
container raman_coefficient {
description
"Raman coeeficient definition (for Stimulated Raman Scattering
and Raman amplification)";
leaf reference_frequency {
type decimal64 {
fraction-digits 1;
}
units "Hz";
description
"Reference frequency used with frequency offset values
for Raman coefficient evaluation.";
}
list g0_per_frequency {
key frequency_offset;
description
"Raman gain coefficient in terms of optical power defined per frequency.";
leaf frequency_offset {
type decimal64 {
fraction-digits 1;
}
units "Hz";
description
"Frequency offset.";
}
leaf g0 {
type decimal64 {
fraction-digits 14;
}
units "1/(m.W)";
description "Raman gain coefficient in terms of optical power.";
}
}
}
list lumped_losses {
key "position";
description "Places along the fiber length with extra
losses. Specified as a loss in dB at each relevant position (in km).";
leaf position {
type decimal64 {
fraction-digits 6;
}
units "km";
mandatory true;
description "Position of the lumped loss on the fiber.";
}
leaf loss {
type decimal64 {
fraction-digits 2;
}
units "dB";
mandatory true;
description "Loss of the lumped loss on the fiber.";
}
}
choice loss_coef-vector-or-scalar {
description
"Loss coef definition: scalar or per frequency vector";
case scalar {
leaf loss_coef {
type decimal64 {
fraction-digits 6;
}
units "dB/km";
mandatory true;
description "Loss coefficient of the fiber span (dB/km)";
}
}
case vector {
list loss_coef_per_frequency {
key frequency;
description
"Per frequency loss_coef definition.";
leaf frequency {
type decimal64 {
fraction-digits 1;
}
units "Hz";
description
"Frequency of the loss coef value.";
}
leaf loss_coef_value {
type decimal64 {
fraction-digits 16;
}
units "dB/km";
description
"Loss coef oat the frequency value.";
}
}
}
}
leaf length_units {
type identityref {
base length-unit;
}
mandatory true;
description
"Length unit used for the length definition (m or km)";
}
leaf att_in {
type decimal64 {
fraction-digits 2;
}
units "dB";
description
"Padding attenuation placed at span input to reach min loss
target defined in the library.";
}
leaf con_in {
type union {
type decimal64 {
fraction-digits 2;
}
type empty;
}
units "dB";
description
"Input connector loss.";
}
leaf con_out {
type union {
type decimal64 {
fraction-digits 2;
}
type empty;
}
units "dB";
description
"Output connector loss.";
}
}
grouping raman-fiber-operational {
description
"Raman pumps definition of the Raman Fiber.";
leaf temperature {
type decimal64 {
fraction-digits 2;
}
description
"Temperature of the fiber.";
}
list raman_pumps {
description
"Definition of Raman pumps.";
key "frequency";
leaf power {
type decimal64 {
fraction-digits 9;
}
units "W";
description
"Total pump power considering a depolarized pump.";
}
leaf frequency {
type decimal64 {
fraction-digits 1;
}
units "Hz";
description
"Pump central frequency.";
}
leaf propagation_direction {
type identityref {
base pumping-direction;
}
description
"Pump injection direction: the pumps can propagate in
the same or opposite direction with respect the signal.
Valid choices are coprop and counterprop";
}
}
}
grouping edfa-params {
description
"Common parameters for amplifiers definition.";
leaf gain_target {
type union {
type decimal64 {
fraction-digits 6;
}
type empty;
}
units "dB";
description
"gain target of the amplifier (before VOA and after att_in)";
}
leaf tilt_target {
type union {
type decimal64 {
fraction-digits 6;
}
type empty;
}
units "dB";
description
"Tilt target on the whole wavelength range of the amplifier.";
}
leaf out_voa {
type union {
type decimal64 {
fraction-digits 2;
}
type empty;
}
units "dB";
description
"Output variable optical attenuator loss";
}
leaf in_voa {
type union {
type decimal64 {
fraction-digits 2;
}
type empty;
}
units "dB";
description
"Input variable optical attenuator loss";
}
leaf delta_p {
type union {
type decimal64 {
fraction-digits 6;
}
type empty;
}
units "dB";
description
"Per channel target output power deviation with respect to power settings in SI.";
}
}
grouping multiband-params {
description
"Attributes for multiband amplifiers";
list amplifiers {
key "type_variety";
description
"Definition of attributes of each amplifier of the multiband amplifier.";
leaf type_variety {
type string;
description
"Type_variety definition.";
}
container operational {
description
"Operational values for the Edfa ";
uses edfa-params;
uses geqpt:frequency-band;
}
}
}
grouping design-bands {
description "Values used to compute the maximum power in
amplifier during autodesign phase";
choice parameter-used-for-design {
description
"Values used to compute the maximum power in
amplifier during autodesign phase";
case spacing {
leaf spacing {
type decimal64 {
fraction-digits 2;
}
units "Hz";
description
"Spacing used to compute max power in the spans
during autodesign.";
}
}
case number-of-channels {
leaf number-of-channels {
type uint16 {
range "1 .. max";
}
description
"Number of channels used to compute max power in the spans
during autodesign.";
}
}
}
}
grouping roadm-trx-params {
description
"Design band attributes common to ROADM and Transceivers,
Used for autodesign";
list design_bands {
key "f_min";
uses geqpt:frequency-band;
uses design-bands;
description
"Value used to compute the maximum power in
amplifier during autodesign phase, same for all degrees.";
}
list per_degree_design_bands_targets {
key "degree_uid";
description
"Per degree definition of design bands used to compute the maximum power in
amplifier during autodesign phase.";
leaf degree_uid {
type leafref {
path "../../../../elements/uid";
}
description
"Degree identifier (= uid of the next element on this direction).";
}
list design_bands {
key "f_min";
uses geqpt:frequency-band;
uses design-bands;
description
"Value used to compute the maximum power in
amplifier during autodesign phase, same for all degrees.";
}
}
}
grouping roadm-params {
description
"Definition of ROADM configuration parameters.";
uses geqpt:roadm-equalization-params;
uses geqpt:restrictions;
list per_degree_power_targets {
key "degree_uid";
description
"Equalization strategy for this degree. If not defined, use the
one defined in ROADM.";
leaf degree_uid {
type leafref {
path "../../../../elements/uid";
}
description
"Degree identifier (= uid of the next element on this direction).";
}
choice per_degree_target_type {
description
"Equalization strategy for this ROADM. If not defined, the
one defined in library for this type_variety is used.";
case constant_power {
leaf per_degree_pch_out_db {
type decimal64 {
fraction-digits 2;
}
units "dBm";
description
"Equalization applied on all channels on this degree.
This target replaces the one defined for all degrees";
}
}
case constant_psd {
leaf per_degree_psd_out_mWperGHz {
type decimal64 {
fraction-digits 10;
}
units "mW/GHz";
description
"Equalization applied on all channels on this degree.
This target replaces the one defined for all degrees";
}
}
case constant_psw {
leaf per_degree_psd_out_mWperSlotWidth {
type decimal64 {
fraction-digits 10;
}
units "mW/GHz";
description
"Equalization applied on all channels on this degree.
This target replaces the one defined for all degrees";
}
}
}
}
list per_degree_impairments {
key "from_degree to_degree";
description
"Definition of impairments for this ROADM.";
leaf from_degree {
type leafref {
path "../../../../elements/uid";
}
description
"Degree identifier (= uid of the next element on this direction).";
}
leaf to_degree {
type leafref {
path "../../../../elements/uid";
}
description
"Degree identifier (= uid of the next element on this direction).";
}
leaf impairment_id {
type uint32;
description
"Reference to the impairment ID defined in the library.";
}
}
}
grouping fused-params{
description
"Parameters for Fused elements.";
leaf loss {
type union {
type decimal64 {
fraction-digits 2;
}
type empty;
}
units "dB";
description
"Concentrated loss of the fused element";
}
}
grouping element-type-choice {
description
"Definition of operational container for RamanFiber or Edfa, and of
params container for all elements.";
container operational {
when "../type = 'gnpynt:Edfa' or ../type = 'gnpynt:RamanFiber'";
description
"Operational values for the Edfa and the RamanFiber";
choice ramanfiber {
description
"Definition of operational parameters for RamanFibers";
case RamanFiber {
when "../type = 'gnpynt:RamanFiber'";
uses raman-fiber-operational;
}
case Edfa {
when "../type = 'gnpynt:Edfa'";
uses edfa-params;
uses geqpt:frequency-band;
}
}
}
choice element-type {
description
"Params content depending on element type.";
case FiberRoadm {
container params {
description
"parameters definition in case of Fiber, RamanFiber, Roadm, Fused, Transceivers";
choice fiberroadmfused {
description
"parameters definition in case of Fiber, RamanFiber, Roadm, Fused, Transceivers";
case Fiber {
when "../type = 'gnpynt:Fiber' or ../type = 'gnpynt:RamanFiber'";
uses fiber-common-params;
}
case RoadmTransceiver {
when "../type = 'gnpynt:Roadm' or ../type = 'gnpynt:Transceiver'";
uses roadm-trx-params;
choice roadm {
description
"parameters definition only in case of Roadm.";
case roadm {
when "../type = 'gnpynt:Roadm'";
uses roadm-params;
}
}
}
case Fused {
when "../type = 'gnpynt:Fused'";
uses fused-params;
}
case Multiband_amplifier {
when "../type = 'gnpynt:Multiband_amplifier'";
leaf-list variety_list {
type string;
description
"List of authorized type-variety";
}
}
}
}
}
case Multiband_amplifier {
when "type = 'gnpynt:Multiband_amplifier'";
uses multiband-params;
}
}
}
grouping topo {
description
"Definition of the topology: list of elements and connections.";
list elements {
description
"element definition.";
key "uid";
leaf uid {
type string;
description
"element unique identifier";
}
leaf type {
type identityref {
base type-element;
}
mandatory true;
description
"element type among possible types (Fiber, RamanFiber, Edfa,
Multiband_amplifier, Fused, Roadm, Transceiver).";
}
leaf type_variety {
type string;
description
"Valid reference to a library reference type variety for (Fiber,
RamanFiber, Edfa, Multiband_amplifier, Roadm).";
}
container metadata {
description
"Metadata definitions.";
uses location-attributes;
}
uses element-type-choice;
}
list connections {
key "from_node to_node";
description
"List on connections between elements.";
leaf from_node {
type leafref {
path "../../elements/uid";
}
description
"Ingress node of the connection, reference to a defined element in the topology";
}
leaf to_node {
type leafref {
path "../../elements/uid";
}
description
"Egress node of the connection, reference to a defined element in the topology";
}
}
}
grouping gnpytopo {
description
"Reusable grouping for topology definition.";
container topology {
description
"Describe the topology gnpy-formated for release 2.6 toaster (including mixed rate and multiband)";
uses topo;
leaf network_name {
type string;
}
}
}
container topology {
description
"Describe the topology gnpy-formated for release 2.6 toaster (including mixed rate and multiband)";
uses topo;
leaf network_name {
type string;
}
}
augment "/gapi:api" {
description "Add the gnpy-network-topology input in the API request.";
uses gnpytopo;
}
}

View File

@@ -0,0 +1,728 @@
module gnpy-path-computation {
yang-version 1.1;
namespace "gnpy:gnpy-path-computation";
prefix "gnpypc";
import gnpy-api {
prefix "gapi";
revision-date 2025-06-13;
}
organization
"Telecom Infra Project OOPT PSE Working Group";
contact
"WG Web: <https://github.com/Telecominfraproject/oopt-gnpy>
contact: <mailto:ahmed.triki@orange.com>
contact: <mailto:esther.lerouzic@orange.com>
";
description "YANG model for gnpy path computation simplified for - 2020 - candi preversion";
revision "2025-01-20" {
description
"Add tx_power";
reference
"YANG model for path computation with gnpy inputs";
}
revision "2022-12-01" {
description
"draft for detecon - GNPy API";
reference
"YANG model for path computation with gnpy inputs";
}
grouping effective-freq-slot{
/* content copied from ietf-flexi-grid-media-channel, because only M and N are needed
from the initial grouping.
*/
description "The effective frequency slot is an attribute
of a media channel and, being a frequency slot, it is
described by its nominal central frequency and slot
width";
reference "rfc7698";
leaf N {
type union {
type int32;
type empty;
}
description
"Is used to determine the Nominal Central
Frequency. The set of nominal central frequencies
can be built using the following expression:
f = 193.1 THz + n x 0.00625 THz,
where 193.1 THz is ITU-T ''anchor frequency'' for
transmission over the C band, n is a positive or
negative integer including 0.";
reference "rfc7698";
}
leaf M {
type union {
type uint32;
type empty;
}
description
"Is used to determine the slot width. A slot width
is constrained to be M x SWG (that is, M x 12.5 GHz),
where M is an integer greater than or equal to 1.";
reference "rfc7698";
}
}
grouping gnpy-specific-parameters{
description
"This grouping defines the gnpy specific parameters for requests.";
leaf technology {
type string;
default "flexi-grid";
description
"Data plane technology type.";
}
leaf trx_type {
type string ;
mandatory true;
description "name of the transceiver type (to be read from equipment library";
}
leaf trx_mode {
type union {
type string;
type empty;
}
description "name of the transceiver mode (to be read from equipment library";
}
list effective-freq-slot {
key "N";
description
"Definition of a list of frequency slots using n and m values (ITU T G694.1)";
uses effective-freq-slot ;
}
leaf spacing {
type decimal64 {
fraction-digits 2;
}
units Hz;
mandatory true;
description
"It is the spacing between channels assuming full load with
same channels as the requested one. multiple of 12.5 GHz";
}
leaf max-nb-of-channel{
type union {
type int32;
type empty;
}
description "Nb of channel to take into account for the full load case.
";
}
leaf output-power{
type union {
type decimal64 {
fraction-digits 8;
}
type empty;
}
units W;
description "optical power setting to be used for the propagation";
}
leaf tx_power{
type union {
type decimal64 {
fraction-digits 5;
}
type empty;
}
units W;
description "optical power out of transceiver";
}
leaf path_bandwidth{
type decimal64 {
fraction-digits 1;
}
units bit/s;
mandatory true;
description "Capacity required";
}
}
identity SNR-bandwidth {
base path-metric-type;
description
"A metric that records SNR in signal bandwidth";
}
identity OSNR-bandwidth {
base path-metric-type;
description
"A metric that records OSNR in signal bandwidth";
}
identity SNR-0.1nm {
base path-metric-type;
description
"A metric that records SNR in 0.1nm";
}
identity OSNR-0.1nm {
base path-metric-type;
description
"A metric that records OSNR in 0.1nm";
}
identity lowest_SNR-0.1nm {
base path-metric-type;
description
"A metric that records the lowest SNR in 0.1nm in spectrum";
}
identity biggest_SNR-0.1nm {
base path-metric-type;
description
"A metric that records the lowest SNR in 0.1nm in spectrum";
}
identity PDL_penalty {
base path-metric-type;
description
"A metric that records the PDL penalty.";
}
identity PMD_penalty {
base path-metric-type;
description
"A metric that records the PMD penalty.";
}
identity CD_penalty {
base path-metric-type;
description
"A metric that records the CD penalty.";
}
identity reference_power {
base path-metric-type;
description
"to be revised";
}
identity path_bandwidth {
base path-metric-type;
description
"to be revised";
}
grouping transponder{
description
"Transponder type and mode used in the hop.";
leaf transponder-type {
type string ;
description
"transceiver type.";
}
leaf transponder-mode {
type string ;
description
"transceiver mode.";
}
}
grouping hop-attribute{
description
"This grouping defines the hop attribute parameters for request or response";
choice hop-type{
description
"Hop may be a regenerator or a terminal.";
case tsp {
container transponder {
description
"Transponder hop in the path. (at source and at destination)";
uses transponder ;
}
}
case regen {
container regenerator{
description
"Regenerator hop in the path.";
uses transponder ;
}
}
}
}
identity no-path-type {
description
"base for blocking reasons";
}
identity NO_PATH {
base no-path-type;
description
"Cause of feasibility failure: no path could be computed.";
}
identity NO_PATH_WITH_CONSTRAINT {
base no-path-type;
description
"Cause of feasibility failure: no path can meet the includec
node constraint.";
}
identity NO_FEASIBLE_BAUDRATE_WITH_SPACING {
base no-path-type;
description
"Cause of feasibility failure: no mode can fit in the
requested spectrum.";
}
identity NO_COMPUTED_SNR {
base no-path-type;
description
"Cause of feasibility failure: requests SNR performance
could not be computed";
}
identity MODE_NOT_FEASIBLE {
base no-path-type;
description
"Cause of feasibility failure: requested mode does not provide
enough performance for this path.";
}
identity NO_FEASIBLE_MODE {
base no-path-type;
description
"Cause of feasibility failure: no mode of this transceiver
can achieve enough performance for the path.";
}
identity NO_SPECTRUM {
base no-path-type;
description
"Cause of feasibility failure: requests requires more spectrum
than the actual available spectrum on the path.";
}
identity NOT_ENOUGH_RESERVED_SPECTRUM {
base no-path-type;
description
"Cause of feasibility failure: signal requires more spectrum
than the one defined in the request.";
}
identity path-metric-type {
description
"Base identity for path metric type";
}
identity route-usage-type {
description
"Base identity for route usage";
}
identity route-include-ero {
base route-usage-type;
description
"Include ERO from route";
}
identity route-exclude-ero {
base route-usage-type;
description
"Exclude ERO from route";
}
identity route-exclude-srlg {
base route-usage-type;
description
"Exclude SRLG from route";
}
typedef te-hop-type {
type enumeration {
enum LOOSE {
description
"loose hop in an explicit path";
}
enum STRICT {
description
"strict hop in an explicit path";
}
}
description
"enumerated type for specifying loose or strict
paths";
reference "RFC3209: section-4.3.2";
}
typedef te-path-disjointness {
type bits {
bit node {
position 0;
description "Node disjoint.";
}
bit link {
position 1;
description "Link disjoint.";
}
bit srlg {
position 2;
description "SRLG (Shared Risk Link Group) disjoint.";
}
}
description
"Type of the resource disjointness for a TE tunnel path.";
reference
"RFC4872: RSVP-TE Extensions in Support of End-to-End
Generalized Multi-Protocol Label Switching (GMPLS)
Recovery";
} // te-path-disjointness
typedef accumulated-metric-type {
type union {
type uint64;
type decimal64 {
fraction-digits 2;
}
}
description
"type useable for accumulative-value";
}
grouping path-route-objects {
description
"List of EROs to be included or excluded when performing
the path computation.";
container explicit-route-objects {
description
"Container for the route object list";
list route-object-include-exclude {
key "index";
config false;
description
"List of explicit route objects to include or
exclude in path computation";
leaf explicit-route-usage {
type identityref {
base route-usage-type;
}
description "Explicit-route usage.";
}
uses explicit-route-hop ;
}
}
}
grouping generic-path-disjointness {
description "Path disjointness grouping";
leaf disjointness {
type te-path-disjointness;
description
"The type of resource disjointness.
Under primary path, disjointness level applies to
all secondary LSPs. Under secondary, disjointness
level overrides the one under primary";
}
}
grouping common-path-constraints-attributes {
description
"Common path constraints configuration grouping";
uses common-constraints_config;
}
grouping generic-path-constraints {
description
"Global named path constraints configuration
grouping";
container path-constraints {
description "TE named path constraints container";
uses common-path-constraints-attributes;
}
}
grouping explicit-route-hop {
description
"The explicit route subobject grouping";
leaf index {
type uint32;
description "ERO subobject index";
}
choice subobject-type {
description
"The explicit route subobject type";
case num-unnum-hop {
container num-unnum-hop {
leaf node-id {
//type te-node-id;
type string;
description
"The identifier of a node in the TE topology.";
}
leaf link-tp-id {
//type te-tp-id;
type string;
description
"TE link termination point identifier. The combination
of TE link ID and the TE node ID is used to identify an
unnumbered TE link.";
}
leaf hop-type {
type te-hop-type;
description "strict or loose hop";
}
description
"Numbered and Unnumbered link/node explicit route
subobject";
}
}
case label {
list label-hop {
key "N";
config false;
description "Label hop type";
uses effective-freq-slot;
}
description
"The Label ERO subobject";
}
case hop-attribute{
uses gnpypc:hop-attribute ;
}
}
}
grouping common-constraints_config {
description
"Common constraints grouping that can be set on
a constraint set or directly on the tunnel";
container te-bandwidth {
uses gnpy-specific-parameters ;
description
"A requested bandwidth to use for path computation";
}
}
grouping end-points {
description
"Common grouping to define the TE tunnel end-points";
leaf source {
type string;
description "TE tunnel source address.";
}
leaf destination {
type string;
description "P2P tunnel destination address";
}
leaf src-tp-id {
type string;
description "TE tunnel source termination point identifier.";
}
leaf dst-tp-id {
type string;
description "TE tunnel destination termination point
identifier.";
}
}
grouping synchronization-info {
description "Information for sync";
list synchronization {
key "synchronization-id";
description "sync list";
leaf synchronization-id {
type string;
description "index";
}
container svec {
description
"Synchronization VECtor";
leaf relaxable {
type boolean;
default true;
description
"If this leaf is true, path computation process is free
to ignore svec content.
otherwise it must take into account this svec.";
}
uses generic-path-disjointness;
leaf-list request-id-number {
type string;
description "This list reports the set of M path computation requests that must be synchronized.";
}
}
}
}
grouping service {
description
"reusable grouping for path computation requests.";
list path-request {
key "request-id";
description "request-list";
leaf request-id {
type string;
mandatory true;
description "Each path computation request is uniquely identified by the request-id-number.";
}
leaf bidirectional {
type boolean;
mandatory true;
description "Specify the bidirectionality of the path";
}
uses end-points;
uses path-route-objects;
uses generic-path-constraints;
}
uses synchronization-info;
}
grouping accumulated-metric-object {
description
"Reusable grouping for performance metrics.";
leaf metric-type {
type identityref {
base path-metric-type;
}
description
"Metric type.";
}
leaf accumulative-value {
type union {
type decimal64 {
fraction-digits 8;
}
type decimal64 {
fraction-digits 2;
}
type decimal64 {
fraction-digits 1;
}
type string;
type empty;
}
description
"Accumulative value.";
}
}
grouping response-path-property {
description
"Reusable grouping for responses of a path computation request.";
list path-metric {
key metric-type;
description
"List of accumulated metrics at the end of the path.";
uses accumulated-metric-object;
}
list z-a-path-metric {
key metric-type;
description
"List of accumulated metrics at the end of the path.";
uses accumulated-metric-object;
}
}
grouping response-path-route-object {
description
"Definition of the explicit path of one response";
list path-route-objects {
config false;
description
"List of the explicit path hops.";
container path-route-object {
description
"Definition of the hop.";
uses explicit-route-hop ;
}
}
}
grouping response {
description
"Reusable grouping for path computation response.";
list response {
key response-id;
description
"List of responses for the path-computation request.";
leaf response-id {
type string;
mandatory true;
description "Each path computation response is uniquely identified by the response-id number.";
}
container path-properties {
description
"Definition of the content of the successful response";
uses response-path-property;
uses response-path-route-object;
}
container no-path {
description
"Definition of the content of the response when feasibility is not achieved.";
leaf no-path {
type identityref {
base no-path-type;
}
description
"Detailed reason for feasibility failure.";
}
container path-properties {
description
"Definition of the content of the failed response";
uses response-path-property;
uses response-path-route-object;
}
}
}
}
grouping path-computation {
description
"Reusable grouping that defined data for requests or for
responses of a path-computation";
container services {
description
"Definition of path-computation requests.";
uses service;
}
container responses {
description
"Definition of path-computation responses.";
uses response;
}
}
container services {
description
"Definition of path-computation requests.";
uses service;
}
container responses {
description
"Definition of path-computation responses.";
uses response;
}
augment "/gapi:api" {
description "Add the gnpy-path-computation imput in the API request.";
uses path-computation;
}
}

View File

@@ -0,0 +1,176 @@
module gnpy-sim-params {
yang-version 1.1;
namespace "urn:gnpy-sim-params";
prefix sim-params;
import gnpy-api {
prefix "gapi";
revision-date 2025-06-13;
}
organization
"Telecom Infra Project OOPT PSE Working Group";
contact
"WG Web: <https://github.com/Telecominfraproject/oopt-gnpy>
contact: <mailto:esther.lerouzic@orange.com>
";
description
"YANG model for gnpy network input for path computation simulation params- 2025";
revision 2025-04-10 {
description
"First yang model for sim-params option";
reference
"YANG model for network input for path computation with gnpy";
}
identity nli-method {
description "Base identity for NLI calculation methods";
}
identity ggn_spectrally_separated {
base nli-method;
description "GGN spectrally separated method";
}
identity ggn_approx {
base nli-method;
description "GGN approximation method";
}
identity gn_model_analytic {
base nli-method;
description "GN model analytic method";
}
identity raman-method {
description "Base identity for Raman calculation methods";
}
identity perturbative {
base raman-method;
description "Raman perturbative method";
}
identity numerical {
base raman-method;
description "Raman numerical first order method";
}
grouping raman-sim-params {
description
"Raman simulation attributes";
container raman_params {
description
"Simulation parameters definition for Raman effect evaluation.";
leaf flag {
type boolean;
description
"boolean for enabling/disable the evaluation of the Raman power
profile in frequency and position
";
}
leaf order {
type uint16;
default 2;
description
"Solution order for perturbative method";
}
leaf method {
type identityref {
base raman-method;
}
description
"Method used for Raman effect evaluation.";
}
leaf result_spatial_resolution {
type decimal64 {
fraction-digits 3;
}
description
"Spatial resolution of the evaluated Raman power profile in m. Suggested value is 10e3m";
}
leaf solver_spatial_resolution {
type decimal64 {
fraction-digits 3;
}
description
"Spatial step for the iterative solution of the first order ode. a suggested value is 10e3 m";
}
}
}
grouping nli-sim-params {
description
"NLI simulation attributes";
container nli_params {
description
"Simulation parameters definition for Non Linear
Interference (NLI) effect evaluation.";
leaf method {
type identityref {
base nli-method;
}
description "Model used for the NLI evaluation.";
}
leaf dispersion_tolerance {
type decimal64 {
fraction-digits 1;
}
default "1.0";
description "Tuning parameter for ggn model solution";
}
leaf phase_shift_tolerance {
type decimal64 {
fraction-digits 1;
}
default "0.1";
description "Tuning parameter for ggn model solution";
}
choice computation {
description
"Definition of the channels on which the NLI is evaluated: explicir position or amount.";
case explicit-channels {
leaf-list computed_channels {
type uint16 {
range "1..max";
}
ordered-by user;
description "The exact channel indices (starting from 1) on which the NLI is evaluated";
}
}
case nb_of_channels {
leaf computed_number_of_channels {
type uint16;
description "The number of channels on which the NLI is evaluated";
}
}
}
}
}
grouping sim-params {
description
"Simulation parameters definition.";
container sim-params {
description
"Simulation parameters definition.";
uses raman-sim-params;
uses nli-sim-params;
}
}
container sim-params {
description
"Simulation parameters definition.";
uses raman-sim-params;
uses nli-sim-params;
}
augment "/gapi:api" {
description "Add the gnpy-sim-params input in the API request.";
uses sim-params;
}
}

View File

@@ -0,0 +1,105 @@
module gnpy-spectrum {
yang-version 1.1;
namespace "urn:gnpy-spectrum";
prefix spectrum;
import gnpy-api {
prefix "gapi";
revision-date 2025-06-13;
}
import gnpy-eqpt-config {
prefix "geqpt";
revision-date 2025-05-26;
}
organization
"Telecom Infra Project OOPT PSE Working Group";
contact
"WG Web: <https://github.com/Telecominfraproject/oopt-gnpy>
contact: <mailto:esther.lerouzic@orange.com>
";
description
"YANG model for gnpy network input for path computation simulation params- 2025";
revision 2025-04-10 {
description
"First yang model for spectrum option";
reference
"YANG model for network input for path computation with gnpy";
}
grouping spectrum-grouping {
description
"Attributes of a spectrum partition.";
leaf f_min {
type decimal64 {
fraction-digits 1;
}
mandatory true;
description
"Partition definition: f_min is the first carrier central frequency
f_max is the last one. partitions must not overlap.
Note that the meaning of f_min and f_max is different than the one
in equipment_config SpectralInformation";
}
leaf f_max {
type decimal64 {
fraction-digits 1;
}
must ". >= ./../f_min";
mandatory true;
description
"Partition definition: f_min is the first carrier central frequency
f_max is the last one. partitions must not overlap.
Note that the meaning of f_min and f_max is different than the one
in equipment_config SpectralInformation";
}
leaf slot_width {
type decimal64 {
fraction-digits 2;
}
mandatory true;
description "Carrier spectrum occupation. Carriers of this partition
are spaced at slot_width offsets.";
}
leaf delta_pdb {
type decimal64 {
fraction-digits 2;
}
description "Power offset compared to the reference power used for design
(SI block in equipment library) to be applied by ROADM to equalize the
carriers in this partition. Default value is 0 dB.";
}
uses geqpt:SI-Transceiver;
leaf label {
type string;
description
"Unique label that identifies the spectrum partition.";
}
}
grouping spectrum {
description
"Definition of the spectrum to propagate.";
list spectrum {
description
"List of spectrum partitions.";
key f_min;
uses spectrum-grouping;
}
}
list spectrum {
description
"List of spectrum partitions.";
key f_min;
uses spectrum-grouping;
}
augment "/gapi:api" {
description "Add the gnpy-spectrum input in the API request.";
uses spectrum;
}
}