In compute_path_with_disjunction, and in case user mode is not feasible
returns the blocking reason instead of an empty path.
If the user does not give the mode and the automatic selection does not
give any feasible mode instead of checking if a mode exists, the function
now checks the presence of a blocking reason.
if the blocking reason is among BLOCKING_NOPATH reasons, than an empty
path is returned
if the blocking reason is among BLOCKING_NOMODE, then a path could be computed
and the mode information correspond to the last explored mode.
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>
function is called to assign spectrum to each request
result shows an additionnal column for blocking reason
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
oms_list contains the list of OMS and each OMS contains the list
of uid of each crossed elements (ordered)
each element is updated with the oms_id to which it belongs
each oms contains a bitmap with frequency slots according to
frequency min max defined in eqpt_config.json (SI) and in case oms
are defined elsewhere, there is an alignment of grids to ease computation
the build_OMS_list function builds the OMS list and implements oms attributes
in all network elements
Commit also contains basic functions to handle spectrum bitmap and indexes
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>
previous try section encompass errors that should not be silently
ignored. Correction pointed a default in a test file.
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
anytype supported including transponder in order to accept well formed
route list from user (if user enters 'trx Lannion_CAS' this should be
accepted even if it repeats the source name)
A later PR better handles route list names
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
previously contained the user-given source name in excel file,
but could differ from effective transponder source/destination
now both source and src-tp-id contain the same info (gnpy does
not make difference between node and ports)
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
restriction was placed on fiber type because when using excel input
autodesign create fiber names with syntax not explicit to the user, so that
entering a node name as constraint may end up to a wrong interpretation eg
aa -bb -> create names such as 'fiber aa to bb', fiber bb to aa' .
If user constraint is bb there is a ambiguity on the fiber direction.
However this is not a problem for user using json format.
So I preferred to removed this constraint now.
a later PR solves this naming ambiguity
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
since empty attributes have been removed from the requests with
previous changes, some aditional tests are needed to continue supporting
optional power and nch. (previous objects were created with null
or default values)
user may enter requests without specifying these fields, in this
case the object 'output-power' or 'max-nb-of-channel' do not exist.
the try /except form handles the corresponding exception and
default values are kept else.
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
change the naming according to model update +
previous changes authorize empty list of nodes.
This new test supports this case
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- removing empty objects (if no content , removes the object),
especially
- removing empty synchronization vector if no disjunction
constraint exists
- removing optional power and nb of channel fields, if user
did not specify any
when reading, first try if the object exists : try:/except to catch
this case
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- changes concerning names due to ietf path-computation draft changes:
- 'unnumbered-hop' changed to 'num-unnum-hop'
- suppression of 'label-hop'
- 'link-diverse' and 'node-diverse' changed to 'disjointness'
- correction because of previously wrong interpretation of the model:
- detailed succession on include nodes moved from
'optimisation /explicit-route-include-objects'
to 'route-object-include-exclude'
in 'explicit-route-objects' attribute
- correction of keywords
- n and m replaced by N and M
- strict and loose replaces by STRICT and LOOSE strings
- change the name of respponse from 'path' to 'response'
example service file corrected accordingly
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
I'm trying to clean up the core code while not causing too much trouble
to our users. Esther pointed out that there's an internal use case at
Orange where people are looking at the incremental results when
computing paths.
I strongly dislike commented-out debugging code, but for the sake of
progress, let's put it in here. It's roughly as good as that unused
`show` parameter, and it allowed a refactoring to make the code more
readable.
This has been marked obsolete for 11 months. It's also one of the
callers of the propagate(), so it's being touched by that change which
removes the `show` parameter. This commit will make it easier to put
debug path printing just where it's really needed.
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
I have no idea which one of the existing pypi modules is best for these,
and given that we're using just two escape codes, I think it makes sense
not to bother with a more capable third-party module just for two magic
strings.
Once the actual config-parsing code start raising these exceptions
instead of directly calling sys.exit(), the user experience would
deteriorate due to raw exception traces. There's little value in the
trace itself, so just wrap the whole config loading with pretty error
formatting.
We still do not point to a specific place where that error is defined
(such as a line/column in a given JSON file) because that information is
already lost by the time we perform these checks.
Also, these checks are largely open-coded ad-hoc stuff. Some required
items are not covered, raising KeyError instead. We should get a formal
schema for these...
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>
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>
- 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
small fix: correct wrong numbering of request in json and csv
output when -o is used ; correct example files
signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- 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>
adding the counting feature on standard output
adding tsp nb in csv + small bug fixes
small fixes to improve stdout and csv printing
small bug fixes on service aggregation and automatic correction of names
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
if mode is not given, the program automatically choses the first mode of the tsp
that has the highest bitrate and baudrate
- propagation for each loop on baudrate, no proppag in the loop on the mode
(same propoagation applies for identical baudrate)
- starts with the highest baudrate
- Make power and nb-channel optional fields
- power uses defaulf power in SI
- nb channel computed based on min max frequency and spacing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- add bitrate in the json service file and enable to support both with and without bitrate
- change mode to optional
- add an aggregation function that groups identical demands (except for id and bitrate)
TODO : check which mode can satisfy the request or how many transponders -> going towards
dimensionning
- Correcting some bug on loose parameter: hop-type attribute was forced to be always 'loose'
-> now reads the excel entry
- service sheets checks on header if field names are corrects, but any order is
now feasible.
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>