module gnpy-network-topology { yang-version 1.1; namespace "gnpy:gnpy-network-topology"; prefix gnpynt; organization "Telecom Infra Project OOPT PSE Working Group"; contact "WG Web: contact: contact: "; description "YANG model for gnpy network input for path computation - 2020 - candi preversion"; 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 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 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; } } typedef Coef { type decimal64 { fraction-digits 2; } } grouping location-attributes { container location { leaf city { type string; mandatory true; } leaf region { type string; mandatory true; } leaf latitude { type Coordinate; mandatory true; } leaf longitude { type Coordinate; mandatory true; } } } grouping fiber-params { description "....."; leaf length { type decimal64 { fraction-digits 2; } mandatory true; } leaf loss_coef { type decimal64 { fraction-digits 2; } mandatory true; units db/km; description "Loss coefficient of the fiber span (dB/km)"; } leaf length_units { type identityref { base length-unit; } mandatory true; } leaf att_in { type decimal64 { fraction-digits 2; } units "dB"; mandatory true; } leaf con_in { type decimal64 { fraction-digits 2; } units "dB"; mandatory true; } leaf con_out { type decimal64 { fraction-digits 2; } units "dB"; mandatory true; } } grouping edfa-params { container operational { description "Operational values for the Edfa "; leaf gain_target { type decimal64 { fraction-digits 2; } units "dB"; mandatory true; description "gain target of the amplifier (before VOA and after att_in)"; } leaf tilt_target { type decimal64 { fraction-digits 2; } mandatory true; description ".."; } leaf out_voa { type decimal64 { fraction-digits 2; } units "dB"; mandatory true; description ".."; } leaf delta_p { type decimal64 { fraction-digits 2; } units "dB"; mandatory true; description "per channel target output power delta with respect to power setting in SI"; } } } grouping roadm-params { leaf target_pch_out_db { type decimal64 { fraction-digits 2; } units "dB"; description ".."; } container restrictions { leaf-list preamp_variety_list { type string; description "List of authorized preamp type-variety"; } leaf-list booster_variety_list { type string; description "List of authorized booster type-variety"; } } } grouping transceiver-params; grouping fused-params{ leaf loss { type decimal64 { fraction-digits 2; } units "dB"; description "Concentrated loss of the fused element"; } } grouping element-type-choice { choice element-type { case Edfa { when "type = 'Edfa'"; uses edfa-params; } case FiberRoadm { container params { choice fiberroadmfused { case Fiber { when "type = 'Fiber'"; uses fiber-params; } case Roadm { when "type = 'Roadm'"; uses roadm-params; } case Fused { when "type = 'Fused'"; uses fused-params; } } } } case Transceiver { when "type = 'Transceiver'"; } } } grouping topo { list elements { key "uid"; leaf uid { type string; } leaf type { type identityref { base type-element; } mandatory true; } leaf type_variety { type string; mandatory false; } container metadata { uses location-attributes; } uses element-type-choice; } list connections { config false; leaf from_node { type leafref { path "../../elements/uid"; } } leaf to_node { type leafref { path "../../elements/uid"; } } } } }