- String adminState =
- link.augmentation(Link1.class).getAdministrativeState() == null
- || oppLnkAdmState == null
- ? null
- : this.tapiLink.setTapiAdminState(
- link.augmentation(Link1.class).getAdministrativeState(), oppLnkAdmState).getName();
- String operState =
- link.augmentation(Link1.class).getOperationalState() == null
- || oppLnkOpState == null
- ? null
- : this.tapiLink.setTapiOperationalState(
- link.augmentation(Link1.class).getOperationalState(), oppLnkOpState).getName();
-
- String sourceNode = (link.getSource().getSourceNode().getValue().contains("ROADM"))
- ? getIdBasedOnModelVersion(link.getSource().getSourceNode().getValue())
- : link.getSource().getSourceNode().getValue();
- String sourceTp = link.getSource().getSourceTp().getValue();
- String sourceNodeQual = sourceNode.contains("ROADM") ? TapiStringConstants.PHTNC_MEDIA
- : TapiStringConstants.XPDR;
- String destNode = (link.getDestination().getDestNode().getValue().contains("ROADM"))
- ? getIdBasedOnModelVersion(link.getDestination().getDestNode().getValue())
- : link.getDestination().getDestNode().getValue();
- String destTp = link.getDestination().getDestTp().getValue();
- String destNodeQual = destNode.contains("ROADM") ? TapiStringConstants.PHTNC_MEDIA
- : TapiStringConstants.XPDR;
- Link tapLink = this.tapiLink.createTapiLink(sourceNode, sourceTp, destNode, destTp,
- TapiStringConstants.OMS_XPDR_RDM_LINK, sourceNodeQual, destNodeQual,
- TapiStringConstants.PHTNC_MEDIA_OTS, TapiStringConstants.PHTNC_MEDIA_OTS, adminState,
- operState, Set.of(LayerProtocolName.PHOTONICMEDIA),
- Set.of(LayerProtocolName.PHOTONICMEDIA.getName()), this.tapiTopoUuid);
+ String sourceNode =
+ link.getSource().getSourceNode().getValue().contains("ROADM")
+ ? getIdBasedOnModelVersion(link.getSource().getSourceNode().getValue())
+ : link.getSource().getSourceNode().getValue();
+ String destNode =
+ link.getDestination().getDestNode().getValue().contains("ROADM")
+ ? getIdBasedOnModelVersion(link.getDestination().getDestNode().getValue())
+ : link.getDestination().getDestNode().getValue();
+ Link tapLink = this.tapiLink.createTapiLink(
+ sourceNode, link.getSource().getSourceTp().getValue(),
+ destNode, link.getDestination().getDestTp().getValue(),
+ TapiStringConstants.OMS_XPDR_RDM_LINK,
+ sourceNode.contains("ROADM") ? TapiStringConstants.PHTNC_MEDIA : TapiStringConstants.XPDR,
+ destNode.contains("ROADM") ? TapiStringConstants.PHTNC_MEDIA : TapiStringConstants.XPDR,
+ TapiStringConstants.PHTNC_MEDIA_OTS, TapiStringConstants.PHTNC_MEDIA_OTS,
+ //adminState,
+ link.augmentation(Link1.class).getAdministrativeState() == null || oppLnkAdmState == null
+ ? null
+ : this.tapiLink.setTapiAdminState(
+ link.augmentation(Link1.class).getAdministrativeState(), oppLnkAdmState).getName(),
+ //operState,
+ link.augmentation(Link1.class).getOperationalState() == null || oppLnkOpState == null
+ ? null
+ : this.tapiLink.setTapiOperationalState(
+ link.augmentation(Link1.class).getOperationalState(), oppLnkOpState).getName(),
+ Set.of(LayerProtocolName.PHOTONICMEDIA), Set.of(LayerProtocolName.PHOTONICMEDIA.getName()),
+ this.tapiTopoUuid);