module transportpce-service-spectrum-constraint { yang-version 1.1; namespace "http://org/opendaylight/transportpce/service/spectrum/constraint"; prefix org-opendaylight-transportpce-service-spectrum-constraint; import org-openroadm-common-optical-channel-types { prefix oococt; } import org-openroadm-service { prefix oos; } import transportpce-pce { prefix tpce; } organization "Smartoptics"; contact "smartoptics.com"; description "Augmenting OpenROADM service with frequency-range and frequency slot. Copyright © 2023 Smartoptics and others. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither Smartoptics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND SMARTOPTCIS AND OTHER CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT ITS AUTHORS AND SMARTOPTCIS AND OTHER CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE"; revision 2023-09-07 { description "Version 1.0"; } typedef slot-width-frequency-GHz { type decimal64 { fraction-digits 5; range "37.5..max"; } units "GHz"; description "Frequency value in GHz."; } grouping spectrum-allocation { container frequency-range { leaf min-frequency { description "The desired min frequency."; type oococt:frequency-THz; } leaf max-frequency { description "The desired max frequency."; type oococt:frequency-THz; } description "Select a service frequency from this range. A smaller range within this range may be setup."; } container frequency-slot { when "../oos:service-format = 'other'"; leaf center-frequency { description "Center Frequency in THz."; type oococt:frequency-THz; } leaf slot-width { description "The service frequency range in GHz centered over center-frequency. Expects a value defined by 12.5 x m, where m is a positive integer starting at 4."; type slot-width-frequency-GHz; } description "Select a specific service frequency range defined by a center frequency and slot width."; } } augment "/oos:service-create/oos:input/oos:service-a-end" { uses spectrum-allocation; } augment "/oos:service-create/oos:input/oos:service-z-end" { uses spectrum-allocation; } augment "/oos:temp-service-create/oos:input/oos:service-a-end" { uses spectrum-allocation; } augment "/oos:temp-service-create/oos:input/oos:service-z-end" { uses spectrum-allocation; } augment "/oos:service-list/oos:services/oos:service-a-end" { uses spectrum-allocation; } augment "/oos:service-list/oos:services/oos:service-z-end" { uses spectrum-allocation; } augment "/tpce:path-computation-request/tpce:input/tpce:service-a-end" { uses spectrum-allocation; } augment "/tpce:path-computation-request/tpce:input/tpce:service-z-end" { uses spectrum-allocation; } augment "/oos:service-feasibility-check/oos:input/oos:service-a-end" { uses spectrum-allocation; } augment "/oos:service-feasibility-check/oos:input/oos:service-z-end" { uses spectrum-allocation; } }