Fix Pmsi tunnel type model name typo 42/72242/2
authorClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Thu, 24 May 2018 16:18:53 +0000 (18:18 +0200)
committerClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Thu, 24 May 2018 17:08:57 +0000 (19:08 +0200)
Change-Id: Ie374f97383095090280fd261d484986f879c85c5
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
bgp/mvpn/src/main/java/org/opendaylight/protocol/bgp/mvpn/impl/attributes/tunnel/identifier/RsvpTeP2MpLspParser.java
bgp/mvpn/src/main/yang/pmsi-tunnel.yang
bgp/mvpn/src/test/java/org/opendaylight/protocol/bgp/mvpn/impl/attributes/PMSITunnelAttributeHandlerTestUtil.java

index 2927b88c1ca8598bbc5b1f3d9cc39085b4b16be4..f448c10682e0476b15f3dc764d73d6cce72e1657 100644 (file)
@@ -18,8 +18,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tun
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi.tunnel.pmsi.tunnel.TunnelIdentifier;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.RsvpTeP2mpLsp;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.RsvpTeP2mpLspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLps;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLpsBuilder;
 
 public final class RsvpTeP2MpLspParser extends AbstractTunnelIdentifier<RsvpTeP2mpLsp> {
 
@@ -32,7 +30,9 @@ public final class RsvpTeP2MpLspParser extends AbstractTunnelIdentifier<RsvpTeP2
 
     @Override
     public int serialize(final RsvpTeP2mpLsp tunnelIdentifier, final ByteBuf buffer) {
-        final RsvpTeP2mpLps rsvpTeP2mpLsp = tunnelIdentifier.getRsvpTeP2mpLps();
+        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi.tunnel.pmsi
+                .tunnel.tunnel.identifier.rsvp.te.p2mp.lsp
+                .RsvpTeP2mpLsp rsvpTeP2mpLsp = tunnelIdentifier.getRsvpTeP2mpLsp();
         ByteBufWriteUtil.writeUnsignedInt(rsvpTeP2mpLsp.getP2mpId(), buffer);
         buffer.writeZero(RESERVED);
         ByteBufWriteUtil.writeUnsignedShort(rsvpTeP2mpLsp.getTunnelId(), buffer);
@@ -42,17 +42,20 @@ public final class RsvpTeP2MpLspParser extends AbstractTunnelIdentifier<RsvpTeP2
 
     @Override
     public RsvpTeP2mpLsp parse(final ByteBuf buffer) {
-        final RsvpTeP2mpLpsBuilder rsvpTeP2mpLps = new RsvpTeP2mpLpsBuilder();
+        final org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi.tunnel
+                .pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLspBuilder rsvpTeP2mpLps
+                = new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel.rev180329.pmsi
+                .tunnel.pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLspBuilder();
         rsvpTeP2mpLps.setP2mpId(buffer.readUnsignedInt());
         buffer.skipBytes(2);
         rsvpTeP2mpLps.setTunnelId(buffer.readUnsignedShort());
         final int ipLength = buffer.readableBytes();
         rsvpTeP2mpLps.setExtendedTunnelId(parseIpAddress(ipLength, buffer));
-        return new RsvpTeP2mpLspBuilder().setRsvpTeP2mpLps(rsvpTeP2mpLps.build()).build();
+        return new RsvpTeP2mpLspBuilder().setRsvpTeP2mpLsp(rsvpTeP2mpLps.build()).build();
     }
 
     @Override
     public int getType() {
-        return PmsiTunnelType.RsvpTeP2mpLps.getIntValue();
+        return PmsiTunnelType.RsvpTeP2mpLsp.getIntValue();
     }
 }
index 90fb72675f3c14c1ff7ea128ccbdc69cf5d71d49..de5c52ac22f8a20e938d4eca6c9f7bbf56ea3274 100644 (file)
@@ -38,7 +38,7 @@ module pmsi-tunnel {
 
     typedef pmsi-tunnel-type {
         type enumeration {
-            enum rsvp-te-p2mp-lps {
+            enum rsvp-te-p2mp-lsp {
                 value 1;
             }
             enum mldp-p2mp-lsp {
@@ -102,7 +102,7 @@ module pmsi-tunnel {
             }
             choice tunnel-identifier {
                 case rsvp-te-p2mp-lsp {
-                    container rsvp-te-p2mp-lps {
+                    container rsvp-te-p2mp-lsp {
                         reference "https://tools.ietf.org/html/rfc4875#section-19.1.1";
                         leaf p2mp-id {
                             mandatory true;
index 52ccc3ba972a766af4ee08b5e97210bb7210d725..12bfe58ed6eaf71a41566362a00a60c42a59789d 100644 (file)
@@ -360,8 +360,8 @@ final class PMSITunnelAttributeHandlerTestUtil {
     static Attributes buildRsvpTep2MPLspAttribute() {
         final PmsiTunnelBuilder pmsiTunnelBuilder = getPmsiTunnelBuilder();
         pmsiTunnelBuilder.setTunnelIdentifier(new RsvpTeP2mpLspBuilder()
-                .setRsvpTeP2mpLps(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel
-                        .rev180329.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLpsBuilder()
+                .setRsvpTeP2mpLsp(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pmsi.tunnel
+                        .rev180329.pmsi.tunnel.pmsi.tunnel.tunnel.identifier.rsvp.te.p2mp.lsp.RsvpTeP2mpLspBuilder()
                         .setP2mpId(3458L).setTunnelId(15).setExtendedTunnelId(IP_ADDRESS).build()).build());
         return buildAttribute(pmsiTunnelBuilder);
     }