[NEUTRON-71] Valid remote-ip-prefix (e.g. 192.168.50.0/24) sent by neutron security-group-rule-create is not accepted by Neutron northbound API Created: 28/Sep/15  Updated: 19/Oct/17  Resolved: 13/Oct/15

Status: Resolved
Project: neutron
Component/s: northbound-api
Affects Version/s: stable/lithium
Fix Version/s: None

Type: Bug
Reporter: Peter Palmar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4363

 Description   

Related log messages:

2015-09-25 16:27:33,090 | TRACE | tp932741097-3022 | NeutronSecurityRuleAware | 314 - org.opendaylight.groupbasedpolicy.neutron-mapper - 0.2.2.SNAPSHOT | canCreateNeutronSecurityRule - NeutronSecurityRule

{securityRuleUUID='c77016a8-10ac-4f5d-854e-cb3ae4c58397', securityRuleDirection='ingress', securityRuleProtocol='tcp', securityRulePortMin=20202, securityRulePortMax=20208, securityRuleEthertype='IPv4', securityRuleRemoteIpPrefix='192.168.50.0/24', securityRemoteGroupID=null, securityRuleGroupID='5a816afa-fa86-4575-849c-54cc7e74c247', securityRuleTenantID='60b166c6-a167-4094-a717-149b4ee46413'}

2015-09-25 16:27:33,091 | ERROR | tp932741097-3022 | ContainerResponse | 217 - com.sun.jersey.jersey-server - 1.17.0 | The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
java.lang.IllegalArgumentException: Cannot create IpAddress from 192.168.50.0/24
at org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddressBuilder.getDefaultInstance(IpAddressBuilder.java:41)
at org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.IpAddress.<init>(IpAddress.java:40)
at org.opendaylight.neutron.transcriber.NeutronSecurityRuleInterface.toMd(NeutronSecurityRuleInterface.java:198)
at org.opendaylight.neutron.transcriber.NeutronSecurityRuleInterface.toMd(NeutronSecurityRuleInterface.java:38)
at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.addMd(AbstractNeutronInterface.java:47)
at org.opendaylight.neutron.transcriber.NeutronSecurityRuleInterface.addNeutronSecurityRule(NeutronSecurityRuleInterface.java:137)
at org.opendaylight.neutron.northbound.api.NeutronSecurityRulesNorthbound.createSecurityRules(NeutronSecurityRulesNorthbound.java:229)[243:org.opendaylight.neutron.northbound-api:0.5.2.SNAPSHOT]
(...)



 Comments   
Comment by Martin Sunal [ 28/Sep/15 ]

remote ip prefix has CIDR format - 192.168.50.0/24

but neutron-secgroups.yang has modeled remote ip prefix as:

leaf remote-ip-prefix {
type inet:ip-address;
}

as you can see type inet:ip-prefix should be used instead of intet:ip-address

Comment by Isaku Yamahata [ 29/Sep/15 ]

The patch was merged by https://git.opendaylight.org/gerrit/#/c/26266/

Can you make sure that your ODL neutron northbound include the patch
and test it with the patch?

Comment by Peter Palmar [ 13/Oct/15 ]

Verified, it works.

Generated at Wed Feb 07 20:25:29 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.