[CONTROLLER-468] invocation of rpc via restconf fails because of whitespace Created: 14/May/14  Updated: 25/Jul/23  Resolved: 30/May/14

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Michal Rehak Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 1003

 Description   

By deleting group via restconf (operations):

http://localhost:8080/restconf/operations/sal-group:remove-group
– This works –
POST:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<input xmlns="urn:opendaylight:group:service">
<barrier>false</barrier>
<group-id>1</group-id>
<group-name>Foo</group-name>
<group-type>group-select</group-type>

<node xmlns:inv="urn:opendaylight:inventory">/inv:nodes/inv:node[inv:id="openflow:1"]</node>
</input>

Response:
{
"output":

{ "transaction-id": 319 }

}

– But this fails –
POST:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<input xmlns="urn:opendaylight:group:service">
<barrier>false</barrier>
<group-id>1</group-id>
<group-name>Foo</group-name>
<group-type>group-select</group-type>

<node xmlns:inv="urn:opendaylight:inventory">
/inv:nodes/inv:node[inv:id="openflow:1"]
</node>
</input>

Response:

          • HTTP Status 500 - ******
            ===============================================================================
            type Exception report
            message
            description The_server_encountered_an_internal_error_that_prevented_it_from
            fulfilling_this_request.
            exception
            java.lang.IllegalArgumentException
            com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)
            org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareRpcBroker$RoutedRpcSelector.invokeRpc
            (SchemaAwareRpcBroker.java:329)
            org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareRpcBroker.invokeRpc
            (SchemaAwareRpcBroker.java:168)
            org.opendaylight.controller.sal.dom.broker.BrokerImpl.invokeRpcAsync
            (BrokerImpl.java:116)
            org.opendaylight.controller.sal.dom.broker.ConsumerContextImpl.rpc
            (ConsumerContextImpl.java:65)
            org.opendaylight.controller.sal.restconf.impl.BrokerFacade.invokeRpc
            (BrokerFacade.java:128)
            org.opendaylight.controller.sal.restconf.impl.RestconfImpl.callRpc
            (RestconfImpl.java:624)
            org.opendaylight.controller.sal.restconf.impl.RestconfImpl.invokeRpc
            (RestconfImpl.java:566)
            ...


 Comments   
Comment by Tom Pantelis [ 28/May/14 ]

I also noticed this message:

2014-05-25 20:59:48.700 EDT [http-bio-8080-exec-7] INFO o.o.c.sal.restconf.impl.RestCodec - Value is not instance of InstanceIdentifierTypeDefinition but is class java.lang.String. Therefore NULL is used as translation of -
/inv:nodes/inv:node[inv:id="openflow:1"]

occurs when there is whitespace.

Comment by Tom Pantelis [ 28/May/14 ]

Submitted:

https://git.opendaylight.org/gerrit/#/c/7466/

Generated at Wed Feb 07 19:53:06 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.