From 149d172a8d41dc02bd9ae47ff5db76ba751900b4 Mon Sep 17 00:00:00 2001 From: Michal Cmarada Date: Fri, 11 May 2018 12:16:10 +0200 Subject: HC2VPP-297 - MPLS model updates This patch updates MPLS models to: - hc2vpp-ietf-mpls-static@2017-07-02.yang (draft at: https://tools.ietf.org/html/draft-ietf-mpls-static-yang-05) Due to odl bugs these models were changed, see HC2VPP-307 for more details. see mpls_postman_collection.json for examples and usage Summary of changes: - leaf operation in static-lsp->config was replaced with mpls-operations-type - paths were refactored and moved to static-lsp - outgoing-labels container was introduced in static-lsp->paths - MPLS docker demo was updated to reflect model changes Change-Id: I725ec5e4b3a1acea2aeabec41185949fc498ff26 Signed-off-by: Michal Cmarada --- .../yang/hc2vpp-ietf-mpls-static@2017-03-10.yang | 317 ---------- .../yang/hc2vpp-ietf-mpls-static@2017-07-02.yang | 435 +++++++++++++ mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang | 2 +- .../io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java | 57 +- .../java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java | 5 +- .../src/main/java/io/fd/hc2vpp/mpls/LspWriter.java | 2 +- .../io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java | 8 +- .../java/io/fd/hc2vpp/mpls/MplsLookupWriter.java | 8 +- .../java/io/fd/hc2vpp/mpls/MplsSwapWriter.java | 20 +- .../java/io/fd/hc2vpp/mpls/MplsWriterFactory.java | 38 +- .../io/fd/hc2vpp/mpls/StaticLspCustomizer.java | 19 +- .../io/fd/hc2vpp/mpls/ImposeAndForwardTest.java | 120 ++-- .../io/fd/hc2vpp/mpls/PopAndIpv4LookupTest.java | 32 +- .../io/fd/hc2vpp/mpls/PopAndMplsLookupTest.java | 28 +- .../java/io/fd/hc2vpp/mpls/SwapAndForwardTest.java | 49 +- mpls/mpls_postman_collection.json | 690 +++++++++++---------- 16 files changed, 1025 insertions(+), 805 deletions(-) delete mode 100644 mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang create mode 100755 mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang mode change 100644 => 100755 mpls/mpls_postman_collection.json (limited to 'mpls') diff --git a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang deleted file mode 100644 index ae8688bbd..000000000 --- a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-03-10.yang +++ /dev/null @@ -1,317 +0,0 @@ -module hc2vpp-ietf-mpls-static { - - namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-static"; - - prefix "mpls-static"; - - import hc2vpp-ietf-mpls { - prefix mpls; - } - -/* - TODO: changed to modified version of ietf-routing that we use - Set back to ietf-routing after HC2VPP-253 is resolved. -*/ - import hc2vpp-ietf-routing { - prefix "rt"; - } - - import hc2vpp-ietf-routing-types { - prefix "rt-types"; - } - - import ietf-inet-types { - prefix inet; - } - - import ietf-interfaces { - prefix "if"; - } - - /* Import TE generic types */ - /* - Yangtools has some issues with ietf-te model. - There is no plan to support tunnels currently, so we simply comment this out. - TODO: remove comment after following issues are resolved: - https://jira.opendaylight.org/browse/MDSAL-182 - https://jira.opendaylight.org/browse/YANGTOOLS-677 - - import ietf-te { - prefix te; - } -*/ - - organization "IETF MPLS Working Group"; - - contact - "WG Web: - - WG List: - - WG Chair: Loa Andersson - - - WG Chair: Ross Callon - - - WG Chair: George Swallow - - - Editor: Tarek Saad - - - Editor: Kamran Raza - - - Editor: Rakesh Gandhi - - - Editor: Xufeng Liu - - - Editor: Vishnu Pavan Beeram - - - Editor: Himanshu Shah - - - Editor: Igor Bryskin - - - Editor: Xia Chen - - - Editor: Raqib Jones - - - Editor: Bin Wen - "; - - description - "This YANG module augments the 'ietf-routing' module with basic - configuration and operational state data for MPLS static"; - - /* - TODO: 2017-07-02 defines grouping in-segment but does not use it. - Bump to newer version after the issue is resolved. - */ - revision "2017-03-10" { - description - "Latest revision: - - Addressed MPLS-RT review comments"; - reference "RFC 3031: A YANG Data Model for Static MPLS LSPs"; - } - - typedef static-lsp-ref { - type leafref { - path "/rt:routing/mpls:mpls/mpls-static:static-lsps/" + - "mpls-static:static-lsp/mpls-static:name"; - } - description - "This type is used by data models that need to reference - configured static LSP."; - } - - grouping path-basic_config { - description "common definitions for statics"; - - leaf next-hop { - type inet:ip-address; - description "next hop IP address for the LSP"; - } - - leaf outgoing-label { - type rt-types:mpls-label; - description - "label value to push at the current hop for the - LSP"; - } - - leaf outgoing-interface { - type if:interface-ref; - description - "The outgoing interface"; - } - } - - grouping path-properties_config { - description - "MPLS path properties"; - leaf path-index { - type uint16; - description - "Path identifier"; - } - - leaf backup-path-index { - type uint16; - description - "Backup path identifier"; - } - - leaf next-hop { - type inet:ip-address; - description - "The address of the next-hop"; - } - - leaf-list outgoing-labels { - type rt-types:mpls-label; - ordered-by user; - description - "The outgoing MPLS labels to impose"; - } - - leaf outgoing-interface { - type if:interface-ref; - description - "The outgoing interface"; - } - - leaf loadshare { - type uint16; - description - "This value is used to compute a loadshare to perform un-equal - load balancing when multiple outgoing path(s) are specified. A - share is computed as a ratio of this number to the total under - all configured path(s)."; - } - - leaf role { - type enumeration { - enum PRIMARY { - description - "Path as primary traffic carrying"; - } - enum BACKUP { - description - "Path acts as backup"; - } - enum PRIMARY_AND_BACKUP { - description - "Path acts as primary and backup simultaneously"; - } - } - description - "The MPLS path role"; - } - } - - grouping static-lsp_config { - description "common definitions for static LSPs"; - - container in-segment { - description - "MPLS incoming segment"; - choice type { - description - "Basic FEC choice"; - case ip-prefix { - leaf ip-prefix { - type inet:ip-prefix; - description "An IP prefix"; - } - } - case mpls-label { - leaf incoming-label { - type rt-types:mpls-label; - description "label value on the incoming packet"; - } - } - /* - Currently not supported. Commented out due to ODL issues (MDSAL-182, YANGTOOLS-677). - case tunnel { - leaf tunnel { - type te:tunnel-ref; - description "TE tunnel FEC mapping"; - } - } - */ - } - leaf incoming-interface { - type if:interface-ref; - description - "Optional incoming interface if FEC is restricted - to traffic incoming on a specific interface"; - } - } - - leaf operation { - type enumeration { - enum impose-and-forward { - description - "Operation impose outgoing label(s) and forward to - next-hop"; - } - enum pop-and-forward { - description - "Operation pop incoming label and forward to next-hop"; - } - enum pop-impose-and-forward { - description - "Operation pop incoming label, impose one or more - outgoing label(s) and forward to next-hop"; - } - enum swap-and-forward { - description - "Operation swap incoming label, with outgoing label and - forward to next-hop"; - } - enum pop-and-lookup { - description - "Operation pop incoming label and perform a lookup"; - } - } - description - "The MPLS operation to be executed on the incoming packet"; - } - - choice out-segment { - description "The MPLS out-segment type choice"; - case simple-path { - uses path-basic_config; - } - case path-list { - list paths { - key path-index; - description - "The list of MPLS paths associated with the FEC"; - uses path-properties_config; - } - } - } - } - - grouping static-lsp { - description "grouping for top level list of static LSPs"; - container config { - description - "Holds the intended configuration"; - uses static-lsp_config; - } - container state { - config false; - description - "Holds the state and inuse configuration"; - uses static-lsp_config; - } - } - - augment "/rt:routing/mpls:mpls" { - description "Augmentations for MPLS Static LSPs"; - container static-lsps { - description - "Statically configured LSPs, without dynamic signaling"; - list static-lsp { - key name; - description "list of defined static LSPs"; - - leaf name { - type string; - description "name to identify the LSP"; - } - uses static-lsp; - } - } - } -} diff --git a/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang new file mode 100755 index 000000000..9da4bb942 --- /dev/null +++ b/mpls/api/src/main/yang/hc2vpp-ietf-mpls-static@2017-07-02.yang @@ -0,0 +1,435 @@ +module hc2vpp-ietf-mpls-static { + + namespace "urn:ietf:params:xml:ns:yang:ietf-mpls-static"; + + prefix "mpls-static"; + + import hc2vpp-ietf-mpls { + prefix mpls; + } + + /* + TODO: HC2VPP-307 - Remove workarounds for ODL bugs from ietf-mpls YANG. + */ + /* + TODO: changed to modified version of ietf-routing that we use + Set back to ietf-routing after HC2VPP-298 is resolved. + */ + import hc2vpp-ietf-routing { + prefix "rt"; + } + + import hc2vpp-ietf-routing-types { + prefix "rt-types"; + } + + import ietf-inet-types { + prefix inet; + } + + import ietf-interfaces { + prefix "if"; + } + + /* Import TE generic types */ + /* + Yangtools has some issues with ietf-te model. + There is no plan to support tunnels currently, so we simply comment this out. + TODO: remove comment after following issues are resolved: + https://jira.opendaylight.org/browse/MDSAL-182 + https://jira.opendaylight.org/browse/YANGTOOLS-677 + + import ietf-te { + prefix te; + } +*/ + + organization "IETF MPLS Working Group"; + + contact + "WG Web: + + WG List: + + WG Chair: Loa Andersson + + + WG Chair: Ross Callon + + WG Chair: George Swallow + + + Editor: Tarek Saad + + + Editor: Kamran Raza + + + Editor: Rakesh Gandhi + + + Editor: Xufeng Liu + + + Editor: Vishnu Pavan Beeram + + + Editor: Himanshu Shah + + + Editor: Igor Bryskin + + + Editor: Xia Chen + + + Editor: Raqib Jones + + + Editor: Bin Wen + "; + + description + "This YANG module augments the 'ietf-routing' module with basic + configuration and operational state data for MPLS static"; + + /* + TODO: 2017-07-02 defines grouping in-segment but does not use it. + Bump to newer version after HC2VPP-306 is resolved. + */ + revision "2017-07-02" { + description + "Latest revision: + - Addressed MPLS-RT review comments"; + reference "RFC 3031: A YANG Data Model for Static MPLS LSPs"; + } + + typedef static-lsp-ref { + type leafref { + path "/rt:routing/mpls:mpls/mpls-static:static-lsps/" + + "mpls-static:static-lsp/mpls-static:name"; + } + description + "This type is used by data models that need to reference + configured static LSP."; + } + + typedef mpls-operations-type { + type enumeration { + enum impose-and-forward { + description + "Operation impose outgoing label(s) and forward to + next-hop"; + } + enum pop-and-forward { + description + "Operation pop incoming label and forward to next-hop"; + } + enum pop-impose-and-forward { + description + "Operation pop incoming label, impose one or more + outgoing label(s) and forward to next-hop"; + } + enum swap-and-forward { + description + "Operation swap incoming label, with outgoing label and + forward to next-hop"; + } + enum pop-and-lookup { + description + "Operation pop incoming label and perform a lookup"; + } + } + description "MPLS operations types"; + } + + grouping path-basic_config { + description "common definitions for statics"; + + leaf next-hop { + type inet:ip-address; + description "next hop IP address for the LSP"; + } + + leaf outgoing-label { + type rt-types:mpls-label; + description + "label value to push at the current hop for the + LSP"; + } + + leaf outgoing-interface { + type if:interface-ref; + description + "The outgoing interface"; + } + } + + grouping path-outgoing-labels_config { + description "Path outgoing labels grouping"; + leaf index { + type uint8 { + range "0..255"; + } + description + "Index of the label. Index 0 indicates + top of the label stack"; + } + leaf label { + type rt-types:mpls-label; + description + "The outgoing MPLS labels to impose"; + } + } + + grouping path-outgoing-labels { + description "Path outgoing labels grouping"; + container outgoing-labels { + description "List of outgoing labels"; + list outgoing-labels { + key "index"; + description "Outgoing label list"; + leaf index { + type leafref { + path "../config/index"; + } + description + "Index of the label. Index 0 indicates + top of the label stack"; + } + container config { + description + "Configuration intended parameters"; + uses path-outgoing-labels_config; + } + container state { + config false; + description + "Configuration applied parameters and state"; + uses path-outgoing-labels_config; + } + } + } + } + + grouping path-properties_config { + description + "MPLS path properties"; + leaf path-index { + type uint16; + description + "Path identifier"; + } + + leaf backup-path-index { + type uint16; + description + "Backup path identifier"; + } + + leaf next-hop { + type inet:ip-address; + description + "The address of the next-hop"; + } + + leaf outgoing-interface { + type if:interface-ref; + description + "The outgoing interface"; + } + + leaf loadshare { + type uint16; + description + "This value is used to compute a loadshare to perform un-equal + load balancing when multiple outgoing path(s) are specified. A + share is computed as a ratio of this number to the total under + all configured path(s)."; + } + + leaf role { + type enumeration { + enum PRIMARY { + description + "Path as primary traffic carrying"; + } + enum BACKUP { + description + "Path acts as backup"; + } + enum PRIMARY_AND_BACKUP { + description + "Path acts as primary and backup simultaneously"; + } + } + description + "The MPLS path role"; + } + } + + grouping static-lsp-paths { + description "Static LSP path grouping"; + choice out-segment { + description "The MPLS out-segment type choice"; + case simple-path { + container simple-path { + description "Simple path container"; + container config { + description + "Holds the intended configuration"; + uses path-basic_config; + } + container state { + config false; + description + "Holds the state and inuse configuration"; + uses path-basic_config; + } + } + } + case multiple-paths { + container paths { + description "List of outgoing paths"; + list path { + key path-index; + description + "The list of MPLS paths associated with the FEC"; + leaf path-index { + type leafref { + path "../config/path-index"; + } + description "Index of the path"; + } + container config { + description + "Holds the intended configuration"; + uses path-properties_config; + } + container state { + config false; + description + "Holds the state and inuse configuration"; + uses path-properties_config; + } + } + uses path-outgoing-labels; + } + } + } + } + + grouping in-segment_config { + description "In-segment grouping"; + choice type { + description + "Basic FEC choice"; + case ip-prefix { + leaf ip-prefix { + type inet:ip-prefix; + description "An IP prefix"; + } + } + case mpls-label { + leaf incoming-label { + type rt-types:mpls-label; + description "label value on the incoming packet"; + } + } + /* Import TE generic types */ + /* + Yangtools has some issues with ietf-te model. + There is no plan to support tunnels currently, so we simply comment this out. + TODO: remove comment after following issues are resolved: + https://jira.opendaylight.org/browse/MDSAL-182 + https://jira.opendaylight.org/browse/YANGTOOLS-677 + + case tunnel { + leaf tunnel { + type te:tunnel-ref; + description "TE tunnel FEC mapping"; + } + } + */ + } + leaf incoming-interface { + type if:interface-ref; + description + "Optional incoming interface if FEC is restricted + to traffic incoming on a specific interface"; + } + } + + grouping in-segment { + description "In-segment grouping"; + container in-segment { + description + "MPLS incoming segment"; + container config { + description + "Holds the intended configuration"; + uses in-segment_config; + } + container state { + config false; + description + "Holds the state and inuse configuration"; + uses in-segment_config; + } + } + } + + grouping static-lsp-top_config { + description "Static LSP configuration grouping"; + /* + TODO: 2017-07-02 defines grouping in-segment but was not used - HC2VPP-306. + Added it here as it was in static-lsp-config in 2017-03-10 revision. + This will probably be fixed in next version of this model. + */ + uses in-segment; + leaf name { + type string; + description "name to identify the LSP"; + } + leaf operation { + type mpls-operations-type; + description + "The MPLS operation to be executed on the incoming packet"; + } + } + + grouping static-lsp-top { + description "common definitions for static LSPs"; + container config { + description + "Holds the intended configuration"; + uses static-lsp-top_config; + } + container state { + config false; + description + "Holds the state and inuse configuration"; + uses static-lsp-top_config; + } + } + + augment "/rt:routing/mpls:mpls" { + description "Augmentations for MPLS Static LSPs"; + container static-lsps { + description + "Statically configured LSPs, without dynamic signaling"; + list static-lsp { + key name; + description "list of defined static LSPs"; + leaf name { + type leafref { + path "../config/name"; + } + description "name to identify the LSP"; + } + uses static-lsp-top; + uses static-lsp-paths; + } + } + } +} diff --git a/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang b/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang index c417046c0..8b5aa5ee8 100644 --- a/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang +++ b/mpls/api/src/main/yang/vpp-mpls@2017-11-20.yang @@ -15,7 +15,7 @@ module vpp-mpls { import hc2vpp-ietf-mpls-static { prefix "mpls-static"; - revision-date 2017-03-10; + revision-date 2017-07-02; } import yang-ext { diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java index 5e384305c..6a09b3eb7 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/ImposeAndForwardWriter.java @@ -31,21 +31,22 @@ import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Prefix; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig.Operation; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp.Config; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.InSegment; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.OutSegment; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.in.segment.Type; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.in.segment.type.IpPrefix; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.PathList; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.SimplePath; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.path.list.Paths; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.MplsOperationsType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.OutSegment; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.MultiplePaths; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.SimplePath; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.multiple.paths.Paths; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.top.Config; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment.InSegment; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment_config.Type; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment_config.type.IpPrefix; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.OutgoingLabels; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLsp; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** - * Translates {@link Operation#ImposeAndForward ImposeAndForward} operation to ip_add_del_route API. + * Translates {@link MplsOperationsType#ImposeAndForward ImposeAndForward} operation to ip_add_del_route API. * * @see ip_add_del_route definition */ @@ -66,7 +67,7 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab request.isAdd = booleanToByte(isAdd); translate(config.getInSegment(), request); - translate(config.getOutSegment(), request, ctx); + translate(data.getOutSegment(), request, ctx); // default values based on inspecting VPP's CLI and make test code request.nextHopWeight = 1; @@ -76,8 +77,9 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab } private void translate(@Nonnull final InSegment inSegment, @Nonnull final IpAddDelRoute request) { - checkArgument(inSegment != null, "Configuring impose-and-forward, but in-segment is missing."); - final Type type = inSegment.getType(); + checkArgument(inSegment.getConfig() != null, + "Configuring impose-and-forward, but in-segment config is missing."); + final Type type = inSegment.getConfig().getType(); checkArgument(type instanceof IpPrefix, "Only ip-prefix type is supported, but %s given.", type); // TODO(HC2VPP-264): add support for mpls + v6 @@ -93,8 +95,8 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab final String outgoingInterface; if (outSegment instanceof SimplePath) { outgoingInterface = translate((SimplePath) outSegment, request); - } else if (outSegment instanceof PathList) { - outgoingInterface = translate((PathList) outSegment, request); + } else if (outSegment instanceof MultiplePaths) { + outgoingInterface = translate((MultiplePaths) outSegment, request); } else { throw new IllegalArgumentException("Unsupported out-segment type: " + outSegment); } @@ -104,7 +106,7 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab } private String translate(@Nonnull final SimplePath path, @Nonnull final IpAddDelRoute request) { - final IpAddress nextHop = path.getNextHop(); + final IpAddress nextHop = path.getSimplePath().getConfig().getNextHop(); // TODO(HC2VPP-264): add support for mpls + v6 if (nextHop != null) { @@ -115,18 +117,19 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab request.nextHopAddress = new byte[0]; } - final MplsLabel outgoingLabel = path.getOutgoingLabel(); + final MplsLabel outgoingLabel = path.getSimplePath().getConfig().getOutgoingLabel(); checkArgument(outgoingLabel != null, "Configuring impose-and-forward, but outgoing-label is missing."); request.nextHopOutLabelStack = new FibMplsLabel[] {translate(outgoingLabel.getValue())}; request.nextHopNOutLabels = 1; - return path.getOutgoingInterface(); + return path.getSimplePath().getConfig().getOutgoingInterface(); } - private String translate(@Nonnull final PathList pathList, @Nonnull final IpAddDelRoute request) { - checkArgument(pathList.getPaths() != null && pathList.getPaths().size() == 1, "Only single path is supported"); - final Paths paths = pathList.getPaths().get(0); - final IpAddress nextHop = paths.getNextHop(); + private String translate(@Nonnull final MultiplePaths pathList, @Nonnull final IpAddDelRoute request) { + checkArgument(pathList.getPaths() != null && pathList.getPaths().getPath().size() == 1, + "Only single path is supported"); + final Paths paths = pathList.getPaths(); + final IpAddress nextHop = paths.getPath().get(0).getConfig().getNextHop(); // TODO(HC2VPP-264): add support for mpls + v6 if (nextHop != null) { @@ -137,14 +140,14 @@ final class ImposeAndForwardWriter implements LspWriter, Ipv4Translator, MplsLab request.nextHopAddress = new byte[0]; } - final List labels = paths.getOutgoingLabels(); + final List labels = paths.getOutgoingLabels().getOutgoingLabels(); final int numberOfLabels = labels.size(); checkArgument(numberOfLabels > 0 && numberOfLabels < MAX_LABELS, "Number of labels (%s) not in range (0, %s].", numberOfLabels, MAX_LABELS, numberOfLabels); request.nextHopNOutLabels = (byte) numberOfLabels; - request.nextHopOutLabelStack = - labels.stream().map(label -> translate(label.getValue())).toArray(FibMplsLabel[]::new); + request.nextHopOutLabelStack = labels.stream().map(label -> translate(label.getConfig().getLabel().getValue())) + .toArray(FibMplsLabel[]::new); - return paths.getOutgoingInterface(); + return paths.getPath().get(0).getConfig().getOutgoingInterface(); } } diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java index be26166d3..3b0be1fed 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/Ipv4LookupWriter.java @@ -24,9 +24,8 @@ import io.fd.vpp.jvpp.core.dto.MplsRouteAddDel; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import io.fd.vpp.jvpp.core.types.FibMplsLabel; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp.Config; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.top.Config; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLsp; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.LookupType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentation; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/LspWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/LspWriter.java index 0e68f0c40..7a67b26db 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/LspWriter.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/LspWriter.java @@ -21,7 +21,7 @@ import io.fd.hc2vpp.common.translate.util.JvppReplyConsumer; import io.fd.honeycomb.translate.MappingContext; import io.fd.honeycomb.translate.write.WriteFailedException; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLsp; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java index 9f531bba4..e15e50a7d 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsInSegmentTranslator.java @@ -20,9 +20,9 @@ import static com.google.common.base.Preconditions.checkArgument; import io.fd.vpp.jvpp.core.dto.MplsRouteAddDel; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.InSegment; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.in.segment.Type; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.in.segment.type.MplsLabel; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment.InSegment; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment_config.Type; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment_config.type.MplsLabel; /** * Mixin that translates {@link InSegment} of {@link MplsLabel} type to {@link MplsRouteAddDel} message. @@ -30,7 +30,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._stati interface MplsInSegmentTranslator { default void translate(@Nonnull final InSegment inSegment, @Nonnull final MplsRouteAddDel request) { checkArgument(inSegment != null, "Missing in-segment"); - final Type type = inSegment.getType(); + final Type type = inSegment.getConfig().getType(); checkArgument(type instanceof MplsLabel, "Expecting in-segment of type mpls-label, but %s given.", type); final Long label = ((MplsLabel) type).getIncomingLabel().getValue(); request.mrLabel = label.intValue(); diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java index 86e7bdee1..c42aedd27 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsLookupWriter.java @@ -24,15 +24,15 @@ import io.fd.vpp.jvpp.core.dto.MplsRouteAddDel; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import io.fd.vpp.jvpp.core.types.FibMplsLabel; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp.Config; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.MplsOperationsType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.top.Config; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLsp; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.LookupType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentation; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** - * Translates {@link StaticLspConfig.Operation#PopAndLookup} operation with {@link LookupType#Mpls} to + * Translates {@link MplsOperationsType#PopAndLookup} operation with {@link LookupType#Mpls} to * mpls_route_add_del API. * * @see mpls_route_add_del definition diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java index 72d9c65ae..c8b47b8da 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsSwapWriter.java @@ -29,16 +29,16 @@ import io.fd.vpp.jvpp.core.types.FibMplsLabel; import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp.Config; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.OutSegment; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.SimplePath; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.MplsOperationsType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.OutSegment; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.SimplePath; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.top.Config; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLsp; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.MplsLabel; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** - * Translates {@link StaticLspConfig.Operation#SwapAndForward} operation to mpls_route_add_del API. + * Translates {@link MplsOperationsType#SwapAndForward} operation to mpls_route_add_del API. * * @see mpls_route_add_del definition */ @@ -61,7 +61,7 @@ final class MplsSwapWriter implements LspWriter, Ipv4Translator, MplsInSegmentTr request.mrEos = 1; // only SWAP for the last label in the stack is currently supported translate(config.getInSegment(), request); - translate(config.getOutSegment(), request, ctx); + translate(data.getOutSegment(), request, ctx); // default values based on inspecting VPP's CLI and make test code request.mrClassifyTableIndex = -1; @@ -75,7 +75,7 @@ final class MplsSwapWriter implements LspWriter, Ipv4Translator, MplsInSegmentTr @Nonnull final MappingContext ctx) { checkArgument(outSegment instanceof SimplePath, "Unsupported out-segment type: %s", outSegment); final SimplePath path = (SimplePath) outSegment; - final IpAddress nextHop = path.getNextHop(); + final IpAddress nextHop = path.getSimplePath().getConfig().getNextHop(); checkArgument(nextHop != null, "Configuring swap-and-forward, but next-hop is missing."); // TODO(HC2VPP-264): add support for mpls + v6 @@ -83,12 +83,12 @@ final class MplsSwapWriter implements LspWriter, Ipv4Translator, MplsInSegmentTr checkArgument(address != null, "Only IPv4 next-hop address is supported."); request.mrNextHop = ipv4AddressNoZoneToArray(address.getValue()); - final MplsLabel outgoingLabel = path.getOutgoingLabel(); + final MplsLabel outgoingLabel = path.getSimplePath().getConfig().getOutgoingLabel(); checkArgument(outgoingLabel != null, "Configuring swap-and-forward, but outgoing-label is missing."); request.mrNextHopOutLabelStack = new FibMplsLabel[] {translate(outgoingLabel.getValue())}; request.mrNextHopNOutLabels = 1; - final String outgoingInterface = path.getOutgoingInterface(); + final String outgoingInterface = path.getSimplePath().getConfig().getOutgoingInterface(); checkArgument(outgoingInterface != null, "Configuring swap-and-forward, but outgoing-interface is missing."); request.mrNextHopSwIfIndex = interfaceContext.getIndex(outgoingInterface, ctx); } diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java index d81d6fae3..475a06288 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/MplsWriterFactory.java @@ -27,12 +27,15 @@ import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.Interfaces; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.Mpls1; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp.Config; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.InSegment; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp_config.out.segment.path.list.Paths; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls.StaticLsps; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.Mpls1; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.multiple.paths.paths.Path; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.simple.path.SimplePath; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.multiple.paths.Paths; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.top.Config; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment.InSegment; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.OutgoingLabels; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls.StaticLsps; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLsp; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.Routing1; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.interfaces.mpls.Interface; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls.rev170702.routing.Mpls; @@ -80,10 +83,27 @@ final class MplsWriterFactory implements WriterFactory { // First enable MPLS on interface, then configure it: registry.subtreeAddAfter( ImmutableSet - .of(CONFIG_ID, InstanceIdentifier.create(StaticLsp.class).child(Config.class).child(InSegment.class), - InstanceIdentifier.create(StaticLsp.class).child(Config.class).child(Paths.class), + .of(CONFIG_ID, + InstanceIdentifier.create(StaticLsp.class).child(Config.class).child(InSegment.class), + InstanceIdentifier.create(StaticLsp.class) + .child(Config.class) + .child(InSegment.class) + .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.in.segment.in.segment.Config.class), InstanceIdentifier.create(StaticLsp.class).child(Config.class) - .augmentation(StaticLspVppLookupAugmentation.class).child(LabelLookup.class)), + .augmentation(StaticLspVppLookupAugmentation.class).child(LabelLookup.class), + InstanceIdentifier.create(StaticLsp.class).child(Paths.class), + InstanceIdentifier.create(StaticLsp.class).child(Paths.class).child(OutgoingLabels.class), + InstanceIdentifier.create(StaticLsp.class).child(Paths.class).child(OutgoingLabels.class) + .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.OutgoingLabels.class), + InstanceIdentifier.create(StaticLsp.class).child(Paths.class).child(OutgoingLabels.class) + .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.OutgoingLabels.class) + .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.path.outgoing.labels.outgoing.labels.outgoing.labels.Config.class), + InstanceIdentifier.create(StaticLsp.class).child(Paths.class).child(Path.class), + InstanceIdentifier.create(StaticLsp.class).child(Paths.class).child(Path.class) + .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.multiple.paths.paths.path.Config.class), + InstanceIdentifier.create(StaticLsp.class).child(SimplePath.class), + InstanceIdentifier.create(StaticLsp.class).child(SimplePath.class) + .child(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.paths.out.segment.simple.path.simple.path.Config.class)), new GenericWriter<>(STATIC_LSP_ID, new StaticLspCustomizer(vppApi, ifcContext)), INTERFACE_ID); } diff --git a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java index 6aab1ed42..b97a36974 100644 --- a/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java +++ b/mpls/impl/src/main/java/io/fd/hc2vpp/mpls/StaticLspCustomizer.java @@ -18,9 +18,9 @@ package io.fd.hc2vpp.mpls; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; -import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig.Operation.ImposeAndForward; -import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig.Operation.PopAndLookup; -import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig.Operation.SwapAndForward; +import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.MplsOperationsType.ImposeAndForward; +import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.MplsOperationsType.PopAndLookup; +import static org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.MplsOperationsType.SwapAndForward; import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.honeycomb.translate.MappingContext; @@ -29,10 +29,11 @@ import io.fd.honeycomb.translate.write.WriteContext; import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.core.future.FutureJVppCore; import javax.annotation.Nonnull; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.StaticLspConfig; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310._static.lsp.Config; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLsp; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170310.routing.mpls._static.lsps.StaticLspKey; + +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.MplsOperationsType; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702._static.lsp.top.Config; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLsp; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.mpls._static.rev170702.routing.mpls._static.lsps.StaticLspKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.LookupType; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.StaticLspVppLookupAugmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.mpls.rev171120.VppLabelLookupAttributes; @@ -41,7 +42,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Selects specific {@link LspWriter} based on {@link StaticLspConfig.Operation} and {@link LookupType}. + * Selects specific {@link LspWriter} based on {@link MplsOperationsType} and {@link LookupType}. */ final class StaticLspCustomizer implements ListWriterCustomizer, LspWriter { private static final Logger LOG = LoggerFactory.getLogger(StaticLspCustomizer.class); @@ -93,7 +94,7 @@ final class StaticLspCustomizer implements ListWriterCustomizer