Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: Windows
Platform: PC
-
321
Description
Unable to create group through RESTCONF:
URL:
http://localhost:8080/restconf/config/opendaylight-inventory:nodes
/node/openflow:1/groups/group/100
Request:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<group xmlns="urn:opendaylight:flow:inventory">
<group-type xmlns="urn:opendaylight:group:types">group-select</group-type>
<group-id xmlns="urn:opendaylight:group:types">100</group-id>
<buckets xmlns="urn:opendaylight:group:types">
<bucket>
<watch_port>1</watch_port>
<watch_group>14</watch_group>
<bucket-id>122</bucket-id>
<weight>15</weight>
<action>
<push-vlan-action>
<ethernet-type>33024</ethernet-type>
</push-vlan-action>
</action>
</bucket>
</buckets>
<group-name xmlns="urn:opendaylight:group:types">Foo-00</group-name>
<barrier xmlns="urn:opendaylight:group:types">false</barrier>
</group>
Result:
Data has bad format
If data is in XML format then namespace for group-type should be urn:opendaylight:flow:inventory.
If data is in Json format then module name for group-type should be flow-node-inventory.
Now if I remove namespace "urn:opendaylight:group:types", following exception is thrown:
java.lang.IllegalArgumentException
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:76)
at org.opendaylight.controller.sal.restconf.impl.ControllerContext.addKeyValue(ControllerContext.java:682)
at org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:596)
at org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:612)
at org.opendaylight.controller.sal.restconf.impl.ControllerContext.collectPathArguments(ControllerContext.java:612)
at org.opendaylight.controller.sal.restconf.impl.ControllerContext.toInstanceIdentifier(ControllerContext.java:160)
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.resolveInstanceIdentifier(RestconfImpl.java:384)
at org.opendaylight.controller.sal.restconf.impl.RestconfImpl.createConfigurationData(RestconfImpl.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Attachments
Issue Links
- is blocked by
-
YANGTOOLS-75 key from ListSchemaNode has different revision
- Resolved
- is duplicated by
-
CONTROLLER-85 RESTCONF not passing any values through for Groups (all null)
- Resolved