creation of a function to avoid code duplication: json_param creates
the relevant parameters to show on the csv based on json input
replace try/except by a test on keys:
previous way tried to get pth_el['no-path'] and is the path was
not blocked this raised a key error. Now the there is a simple check if
the key is present.
Besides, as the no-path has been change to 'no-path' container containing
a 'no-path' attribute with the blocking reason, the test is made on the
attribute so on pth_el['no-path']['no-path'].
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
if the path is empty NO_PATH reason or NO_PATH_WITH_CONSTRAINT reason
is returned in the blocking_reason attribute
if no mode is feasible, the last explored mode is returned with the path (and
implicitly the last computed SNR). The baud_rate is derived from this last
mode
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
if path could be computed: gives details of the path and on the propagation.
- the 'no-path' attribute is changed to a 'no-path' container that contains:
o the 'response-id' attribute
o a 'no-path' attribute with blocking reason
o if a path could be computed, the 'path-properties' of the path that
was computed with the metrics
Note that this proposal to add information for blocking in the json output (instead
of a bare NO PATH) corresponds to the way PCEp is working in general, but is not yet
integrated in draft-ietf-teas-yang-path-computation model. Returning the whole path
in case of blocking in addition to blocking reason is a novelty from GNPy and was a
request from the users
TODO : use correct ietf model when ready
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Before continuing on spectrum assignment we need to clearly identify blocking reasons:
implicit previous way (a path is missing) is not satisfactory because in case of
spectrum blocking a path was possible. So we introduce a 'blocking_reason' attribute
on requests, that will only exist if the path is blocked during the process.
The 'blocking_reason' attribute refflects the blocking reason.
Commit defines blocking types and group them depending on the existence of path or
feasibility:
'NO_PATH': no path was computed,
'NO_PATH_WITH_CONSTRAINT': no path was computed with this constraint
'NO_FEASIBLE_BAUDRATE_WITH_SPACING': no path was computed due to the spacing constraint
'NO_COMPUTED_SNR': the computed path could not give any SNR result
'NO_FEASIBLE_MODE': the user let the program choose a mode and path was computed but
no mode was feasible for the set of constraints
'MODE_NOT_FEASIBLE': the user imposed a mode, a path was computed but this mode
is not feasible
'NO_SPECTRUM': a path, a mode were selected but there is not enough spectrum available on
this path
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
if name of the constraint input from user is not part of networks names
(typically in the case of excel input), then the program try to find a
name that is clode to the user name and that is in the network list of
names. This list must not include trnasponder names (because transponder
end points are already listed as constraints and transponder in the
middle of a path are not supported yet)
This will be improved in the PR Ila names in constraints #278
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
previously reported the requested bandwidth, now fill it with an
empty string, same as the other fields.
This will be updated in a later PR when different kind of blocking
will be supported
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
previous way used a wrong interpretation of hop-type. in ietf model,
hop-type is reserved for LOOSE or STRICT constraint description.
Instead, transponder info , according to ietf usual way, should be
included aas a new path-route-object type. such object is not yet
defined in IETF so this is a GNPY proposal to use a 'transponder' object
with type and mode attributes.
this is what has been ecncoded in reques.py for requests and for answers
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
in case no path could be computed, the answer is changed according to
ietf path-computation model to a simple 'no-path' object
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
This is inspired by #293. The original issue was that the transponder
OSNR was not accounted for. Rather than making the propagate() and
propagate2() more complex, let's move the actual path printing to the
demo code. There's no secret sauce in there, it's just a simple
for-each-print thingy, so let's remove it from the library code.
fixes#262
exception KeyError type in service sheet not correctly catched
print Request.mode instead of Requestmode (not defined at this point)
selection of modes did not respect min spacing criterium:
constraint added
transmission_main did not give SNR in 0.1 nm: added in std out
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
when constraints such as include noe or disjuntion is applied
the candidates are sorted with shortest path in length first
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
add weight = length of fiber nodes on connections wher from_node is a fiber
add weight = 0.01 km on other edges
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
add Tx_osnr or add_drop_osnr on raw snr values to avoid cumulated adding
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
bug fix: forgot to add add_drop_osnr with tx_osnr
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
with this feature, spacing is checked with respect to eqpt library
instead of hard coded values in equipment +
mode selection is based on the minspacing instead of a coef or margin on baudrate value
some sanity check are introduced:
- request spacing must be greater than min spacing
- tsp baudrate must be smaller than min spacing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
add colors on messages to highlight them
add messages explaining program steps
update readme and excel user guide with latest fetures
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- indicate when a mode is selected if the selected path does not pass
+ some reformatting of columns
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
exception handling add some info on which element (uid) is causing a problem
this can help the user to identify where he must correct the input files
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
all_simple_path search leads to a very long time process in case of large network
a cutoff parameters has been added to avoid this. Value needs to be parametrized:
right now correspond to my experience
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- output file of -o option in path_requests_run.py was not correctly
handled in case of path indirection eg ../../bar.foo
- fiber constraint is not correctly handled in case of several parrallel directions
of same fiber name. remove if from the set of constraint till problem is not solved
- loose_list was not correctly indexed in request.py. assume the first element attribute (except
of the transceiver) applies for the whole list. This will need further corrections
- handle the case when path.snr is none in the optimization of mode process
with this feature, spacing is checked with respect to eqpt library
instead of hard coded values in equipment +
mode selection is based on the minspacing instead of a coef or margin on baudrate value
some sanity check are introduced:
- request spacing must be greater than min spacing
- tsp baudrate must be smaller than min spacing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
add colors on messages to highlight them
add messages explaining program steps
update readme and excel user guide with latest fetures
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- indicate when a mode is selected if the selected path does not pass
+ some reformatting of columns
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
add combination of [mode, pow, nb channel] filled or empty
leading to feasible path or not, and check the propagate and propagate_and_optimize_mode
functions work as expected on a reference toy example
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
tx_osnr was impacting automatic mode selection feature : this commit solves the error
+ add a novel version of the excel example with an empty mode cases
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
exception handling add some info on which element (uid) is causing a problem
this can help the user to identify where he must correct the input files
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
all_simple_path search leads to a very long time process in case of large network
a cutoff parameters has been added to avoid this. Value needs to be parametrized:
right now correspond to my experience
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- output file of -o option in path_requests_run.py was not correctly
handled in case of path indirection eg ../../bar.foo
- fiber constraint is not correctly handled in case of several parrallel directions
of same fiber name. remove if from the set of constraint till problem is not solved
- loose_list was not correctly indexed in request.py. assume the first element attribute (except
of the transceiver) applies for the whole list. This will need further corrections
- handle the case when path.snr is none in the optimization of mode process
- this version handles special cases: if no baudrate satisfies the spacing
, if no mode satisfies the OSNR threshold from transponders
- template of service corrected wih the novel path_bandwidth
- some ideas TODO added for testing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- adding cost in every config files including tests files,
- correcting wrong usage reactions (if value is not correct)
- correction of orthograph
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- correction of json to csv function
- small correction on disjunction format to avoid double (double crash the program)
- adding time stamp to measure perf
- demands with all the same disjunction can be aggregated
- a new set of disjunction list is created to avoid inconsistancy
with the aggregated request-ids
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>