<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:49 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[YANGTOOLS-625] getting protocol value from the security rule object in SecurityRuleListener code is throwing exception.</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-625</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Build used        : &lt;br/&gt;
===================&lt;br/&gt;
Karaf distribution from latest ODL Boron master code&lt;/p&gt;

&lt;p&gt;There are some changes merged in project neutron to revises yang model for security groups in file model/src/main/yang/neutron-secgroups.yang&lt;/p&gt;

&lt;p&gt; Changes:&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;leaf protocol {
  type union {
    type uint8;
    type identityref {
      base &quot;constants:protocol-base&quot;;
    }
  }
  description &quot;The protocol that is matched by the security group rule.&quot;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt; after this changes, listener code register for SecurityRule is failing at &lt;b&gt;runtime&lt;/b&gt; at statement&lt;/p&gt;

&lt;p&gt;if (securityRule.getProtocol() != null)&lt;/p&gt;

&lt;p&gt;where securityRule is instance of  &lt;br/&gt;
org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.secgroups.rev150712.security.rules.attributes.security.rules.SecurityRule&lt;/p&gt;

&lt;p&gt;Exception:&lt;/p&gt;


&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;java.lang.ClassCastException: java.lang.String cannot be cast to org.opendaylight.yangtools.yang.common.QName
	at org.opendaylight.yangtools.binding.data.codec.impl.IdentityCodec.deserialize(IdentityCodec.java:17)[118:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:103)[118:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
	at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)[118:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
	at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)[118:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
	at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)[118:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)[118:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)[118:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
	at com.sun.proxy.$Proxy178.getProtocol(Unknown Source)
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:132)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:76)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:44)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
	at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)[300:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_71]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_71]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;



&lt;p&gt;I am using input and URL as&lt;/p&gt;

&lt;p&gt;URL: &lt;a href=&quot;http://localhost:8181/restconf/config/neutron:neutron/security-rules/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/config/neutron:neutron/security-rules/&lt;/a&gt;&lt;br/&gt;
POST method&lt;br/&gt;
JSON input:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;security-rule&quot;: &lt;/p&gt;
    {
        &quot;uuid&quot;: &quot;d0d639a5-ca9a-44a9-97c6-603c176c9672&quot;,
        &quot;direction&quot;: &quot;neutron-constants:direction-egress&quot;, 
        &quot;protocol&quot;: &quot;neutron-constants:protocol-tcp&quot;, 
        &quot;security-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2b&quot;
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;i tied by providing protocol value as 6. &lt;br/&gt;
&quot;protocol&quot;: 6,&lt;/p&gt;

&lt;p&gt;got same exception shown above.&lt;/p&gt;


&lt;p&gt;Note:&lt;br/&gt;
 POST/GET restconf is working  but listening on data change notification does not work. SecurityRule change notification is received, but throws exception in code when we try to get protocol value using method &quot;getProtocol()&quot; .  &lt;/p&gt;

&lt;p&gt;For reproducing this issue, Pls add a SecurityRule Listener and get the protocol value from securityRule object on receiving SeucirtyRule add event.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23045">YANGTOOLS-625</key>
            <summary>getting protocol value from the security rule object in SecurityRuleListener code is throwing exception.</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="yamahata">Isaku Yamahata</assignee>
                                    <reporter username="imanilyadav@gmail.com">Anil Gujele</reporter>
                        <labels>
                    </labels>
                <created>Mon, 27 Jun 2016 09:54:27 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:48 +0000</updated>
                            <resolved>Mon, 1 Aug 2016 18:37:42 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="43941" author="imanilyadav@gmail.com" created="Mon, 27 Jun 2016 09:54:27 +0000"  >&lt;p&gt;Attachment karaf.log has been added with description: attached log&lt;/p&gt;</comment>
                            <comment id="43929" author="imanilyadav@gmail.com" created="Mon, 4 Jul 2016 06:45:26 +0000"  >&lt;p&gt;I have checked with patch &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/40056/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/40056/&lt;/a&gt; &lt;br/&gt;
still i see below exception in logs (attached log file as well) in method security.getProtocol() when i provide input as &lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;security-rule&quot;: &lt;/p&gt;
    {
        &quot;uuid&quot;: &quot;d0d639a5-ca9a-44a9-97c6-603c176c9673&quot;,
        &quot;direction&quot;: &quot;neutron-constants:direction-egress&quot;, 
        &quot;ethertype&quot;: &quot;neutron-constants:ethertype-v4&quot;, 
        &quot;remote-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2a&quot;, 
        &quot;protocol&quot;: 6, 
        &quot;port-range-max&quot;: 80, 
        &quot;port-range-min&quot;: 70, 
        &quot;security-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2b&quot;
    }
&lt;p&gt;}&lt;/p&gt;


&lt;p&gt;or &lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;security-rule&quot;: &lt;/p&gt;
    {
        &quot;uuid&quot;: &quot;d0d639a5-ca9a-44a9-97c6-603c176c9674&quot;,
        &quot;direction&quot;: &quot;neutron-constants:direction-egress&quot;, 
        &quot;ethertype&quot;: &quot;neutron-constants:ethertype-v4&quot;, 
        &quot;remote-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2a&quot;, 
        &quot;protocol&quot;: &quot;neutron-constants:protocol-tcp&quot;, 
        &quot;port-range-max&quot;: 80, 
        &quot;port-range-min&quot;: 70, 
        &quot;security-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2b&quot;
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;2016-07-04 11:44:18,127 | ERROR | pool-45-thread-1 | NeutronSecurityRuleListener      | 326 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule: &lt;br/&gt;
java.lang.IllegalArgumentException: Failed to construct union for value 6&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:66)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:77)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;262:org.opendaylight.neutron.model:0.7.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)&lt;span class=&quot;error&quot;&gt;&amp;#91;326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)&lt;span class=&quot;error&quot;&gt;&amp;#91;326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)&lt;span class=&quot;error&quot;&gt;&amp;#91;326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)&lt;span class=&quot;error&quot;&gt;&amp;#91;296:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.lang.Thread.run(Thread.java:745)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
Caused by: java.lang.ClassCastException: Cannot cast java.lang.String to java.lang.Short&lt;br/&gt;
	at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:361)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:356)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:64)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	... 14 more&lt;br/&gt;
2016-07-04 11:46:05,294 | ERROR | pool-45-thread-1 | NeutronSecurityRuleListener      | 326 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule: &lt;br/&gt;
java.lang.IllegalArgumentException: Failed to construct union for value neutron-constants:protocol-tcp&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:66)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:77)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;262:org.opendaylight.neutron.model:0.7.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)&lt;span class=&quot;error&quot;&gt;&amp;#91;326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)&lt;span class=&quot;error&quot;&gt;&amp;#91;326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)&lt;span class=&quot;error&quot;&gt;&amp;#91;326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)&lt;span class=&quot;error&quot;&gt;&amp;#91;296:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.lang.Thread.run(Thread.java:745)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
Caused by: java.lang.ClassCastException: Cannot cast java.lang.String to java.lang.Short&lt;br/&gt;
	at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:361)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:356)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:64)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	... 14 more&lt;/p&gt;</comment>
                            <comment id="43930" author="imanilyadav@gmail.com" created="Mon, 4 Jul 2016 06:49:52 +0000"  >&lt;p&gt;i have checked with patch &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/40056/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/40056/&lt;/a&gt;  &lt;br/&gt;
it fails with this patch as well, attached the log file.&lt;/p&gt;</comment>
                            <comment id="43942" author="imanilyadav@gmail.com" created="Mon, 4 Jul 2016 06:49:52 +0000"  >&lt;p&gt;Attachment karaf.log has been added with description: attached log with patch - failed&lt;/p&gt;</comment>
                            <comment id="43931" author="yamahata" created="Wed, 6 Jul 2016 06:58:12 +0000"  >&lt;p&gt;Now I confirmed it. It occurs only when restconf is used.&lt;br/&gt;
neutron rest is used it doesn&apos;t occur.&lt;/p&gt;

&lt;p&gt;As personal memo, the following command line is used.&lt;/p&gt;

&lt;p&gt;curl  --header &quot;Accept: application/json&quot; --header &quot;Content-type: application/json&quot; --user admin:admin -X POST -d &apos;{ &quot;security-rule&quot;: &lt;/p&gt;
{ &quot;uuid&quot;: &quot;d0d639a5-ca9a-44a9-97c6-603c176c9673&quot;,&quot;direction&quot;: &quot;neutron-constants:direction-egress&quot;,&quot;ethertype&quot;: &quot;neutron-constants:ethertype-v4&quot;,&quot;remote-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2a&quot;,&quot;protocol&quot;: 6,&quot;port-range-max&quot;: 80,&quot;port-range-min&quot;: 70,&quot;security-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2b&quot; }
&lt;p&gt; }&apos; &lt;a href=&quot;http://localhost:8181/restconf/config/neutron:neutron/security-rules/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://localhost:8181/restconf/config/neutron:neutron/security-rules/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="43932" author="yamahata" created="Fri, 8 Jul 2016 18:53:33 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/41545/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/41545/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="43933" author="imanilyadav@gmail.com" created="Mon, 11 Jul 2016 07:14:17 +0000"  >&lt;p&gt;i have verified with patch  &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/41545/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/41545/&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;it is passing for input-1 but failing for input-2.&lt;/p&gt;

&lt;p&gt;input-1 :&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;security-rule&quot;: &lt;/p&gt;
    {
        &quot;uuid&quot;: &quot;d0d639a5-ca9a-44a9-97c6-603c176c9675&quot;,
        &quot;direction&quot;: &quot;neutron-constants:direction-egress&quot;, 
        &quot;ethertype&quot;: &quot;neutron-constants:ethertype-v4&quot;, 
        &quot;remote-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2a&quot;, 
        &quot;protocol&quot;: &quot;neutron-constants:protocol-tcp&quot;, 
        &quot;port-range-max&quot;: 80, 
        &quot;port-range-min&quot;: 70, 
        &quot;security-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2b&quot;
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Result: pass&lt;/p&gt;

&lt;p&gt;input-2:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
    &quot;security-rule&quot;: &lt;/p&gt;
    {
        &quot;uuid&quot;: &quot;d0d639a5-ca9a-44a9-97c6-603c176c9675&quot;,
        &quot;direction&quot;: &quot;neutron-constants:direction-egress&quot;, 
        &quot;ethertype&quot;: &quot;neutron-constants:ethertype-v4&quot;, 
        &quot;remote-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2a&quot;, 
        &quot;protocol&quot;: 6, 
        &quot;port-range-max&quot;: 80, 
        &quot;port-range-min&quot;: 70, 
        &quot;security-group-id&quot;: &quot;362cc56c-a9d4-4abc-9074-c5f83d305a2b&quot;
    }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Result: failed  with below exception&lt;/p&gt;

&lt;p&gt;2016-07-11 12:31:29,345 | ERROR | pool-46-thread-1 | NeutronSecurityRuleListener      | 327 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule: &lt;br/&gt;
java.lang.ClassCastException: java.lang.Short cannot be cast to org.opendaylight.yangtools.yang.common.QName&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.IdentityCodec.deserialize(IdentityCodec.java:17)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:103)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;263:org.opendaylight.neutron.model:0.7.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)&lt;span class=&quot;error&quot;&gt;&amp;#91;327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)&lt;span class=&quot;error&quot;&gt;&amp;#91;327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)&lt;span class=&quot;error&quot;&gt;&amp;#91;327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)&lt;span class=&quot;error&quot;&gt;&amp;#91;297:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.lang.Thread.run(Thread.java:745)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="43934" author="yamahata" created="Tue, 12 Jul 2016 09:53:59 +0000"  >&lt;p&gt;For protocol = 6 case,&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/40056/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/40056/&lt;/a&gt;&lt;br/&gt;
would help.&lt;/p&gt;</comment>
                            <comment id="43935" author="imanilyadav@gmail.com" created="Tue, 12 Jul 2016 11:31:35 +0000"  >&lt;p&gt;When i applied both patches, it is working for &lt;/p&gt;

&lt;p&gt;input-1: &quot;protocol&quot;: 6&lt;br/&gt;
Result : pass&lt;/p&gt;

&lt;p&gt;input-2: &quot;protocol&quot;: &quot;neutron-constants:protocol-tcp&quot;&lt;br/&gt;
Result: failed with below exception&lt;/p&gt;


&lt;p&gt;2016-07-12 16:55:58,113 | ERROR | pool-46-thread-1 | NeutronSecurityRuleListener      | 327 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule: &lt;br/&gt;
java.lang.IllegalArgumentException: Failed to construct union for value (urn:opendaylight:neutron-constants?revision=2015-07-12)protocol-tcp&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:66)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:77)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)&lt;span class=&quot;error&quot;&gt;&amp;#91;263:org.opendaylight.neutron.model:0.7.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)&lt;span class=&quot;error&quot;&gt;&amp;#91;327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)&lt;span class=&quot;error&quot;&gt;&amp;#91;327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)&lt;span class=&quot;error&quot;&gt;&amp;#91;327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)&lt;span class=&quot;error&quot;&gt;&amp;#91;297:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.lang.Thread.run(Thread.java:745)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
Caused by: java.lang.ClassCastException: Cannot cast org.opendaylight.yangtools.yang.common.QName to java.lang.Short&lt;br/&gt;
	at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:361)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:356)&lt;span class=&quot;error&quot;&gt;&amp;#91;:1.8.0_71&amp;#93;&lt;/span&gt;&lt;br/&gt;
	at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:64)&lt;span class=&quot;error&quot;&gt;&amp;#91;119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT&amp;#93;&lt;/span&gt;&lt;br/&gt;
	... 14 more&lt;/p&gt;</comment>
                            <comment id="43936" author="yamahata" created="Wed, 13 Jul 2016 16:50:16 +0000"  >&lt;p&gt;Finally we have four patches to address this bug.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/40056/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/40056/&lt;/a&gt;                                                                                                              &lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/41545/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/41545/&lt;/a&gt;                                                                                                              &lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/41742/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/41742/&lt;/a&gt;                                                                                                              &lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/41691/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/41691/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="43937" author="imanilyadav@gmail.com" created="Mon, 18 Jul 2016 06:13:34 +0000"  >&lt;p&gt;I have verified with above mention 4 patches, it is working for below scenarios.&lt;/p&gt;

&lt;p&gt;input-1: &quot;protocol&quot;: 6&lt;br/&gt;
Result : pass&lt;/p&gt;

&lt;p&gt;input-2: &quot;protocol&quot;: &quot;neutron-constants:protocol-tcp&quot;&lt;br/&gt;
Result: pass&lt;/p&gt;

&lt;p&gt;we can close the bug once these 4 patches are successfully merged.&lt;/p&gt;</comment>
                            <comment id="43938" author="yamahata" created="Fri, 29 Jul 2016 17:53:50 +0000"  >&lt;p&gt;Finally all the patches were merged.&lt;br/&gt;
The patch were modified according to patch review.&lt;br/&gt;
So can you please test it again, then this report can be closed.&lt;/p&gt;</comment>
                            <comment id="43939" author="imanilyadav@gmail.com" created="Mon, 1 Aug 2016 07:17:41 +0000"  >&lt;p&gt;verified for below scenario with latest build (Aug 1st):&lt;br/&gt;
case-1 : &quot;protocol&quot;: 6&lt;br/&gt;
&amp;amp;&lt;br/&gt;
case-2 : &quot;protocol&quot;: &quot;neutron-constants:protocol-tcp&quot;&lt;/p&gt;

&lt;p&gt;it is working as expected for both scenario.&lt;/p&gt;</comment>
                            <comment id="43940" author="yamahata" created="Mon, 1 Aug 2016 18:37:42 +0000"  >&lt;p&gt;Thank you for confirmation!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="13051" name="karaf.log" size="225983" author="imanilyadav@gmail.com" created="Mon, 4 Jul 2016 06:49:52 +0000"/>
                            <attachment id="13050" name="karaf.log" size="236741" author="imanilyadav@gmail.com" created="Mon, 27 Jun 2016 09:54:27 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6112</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=6112]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10300"><![CDATA[Bug]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10202" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Priority</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10312"><![CDATA[High]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i028dr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>