Allow the client to specify ROADM service SRG port
Allows the client to specifiy port with 'port-device-name' and
'port-name' (see example down below).
The feature is implemented in PceOpticalNode. The rest are
classes being updated since there is a new argument in
the method PceOpticalNode.initSrgTps():
initSrgTps(Preference portPreference) {...}
Feature implementation overview
The feature uses the classes in package:
org.opendaylight.transportpce.pce.networkanalyzer.port
* PceCalculation instantiates an instance of Preference using
PreferenceFactory and passing it on to the constructor in
PceOpticalNode.
* PreferenceFactory in turn uses PathComputationRequestInput
to return either 'NoPreference' or 'ClientPreference'.
* Returning an instance of 'NoPreference' is the backwards compatible
approach. The class 'NoPreference' is currently implemented as
the equivalent of 'port-device-name' and 'port-name' being absent
from the client request.
* If the client uses 'port-device-name' and 'port-name' an instance
of ClientPreference is returned.
* PceOpticalNode uses the method preferredPort(...) defined by
the interface Preference (implemented by NoPreference/
ClientPreference) when building a list of avilable ports.
If a port is not in the preferred list, it's treated as
unavailable by PceOpticalNode.
APIImpact
POST /rests/operations/org-openroadm-service:service-create
{
"input": {
...
"port": {
"port-device-name": "ROADM-B-SRG1",
"port-name": "SRG1-PP2-TXRX",
}
...
}
}
The above will result in port SRG1-PP2-TXRX on node ROADM-B-SRG1
being used in the service. All other ports on ROADM-B-SRG1
will be treated as "unavailable".
JIRA: TRNSPRTPCE-176
Change-Id: I453a92fda2977ac86c5c5ff47e1a7f6cd322334d
Signed-off-by: Joakim Törnqvist <joakim.tornqvist@smartoptics.com>