Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-83

Restconf not populating all fields for PUT

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • restconf
    • None
    • Operating System: Mac OS
      Platform: PC

    Description

      This is against:
      https://git.opendaylight.org/gerrit/#/c/3314/10 (controller side)

      https://git.opendaylight.org/gerrit/#/c/3451/2 (openflowplugin side)

      Build the controller
      Build openflowplugin using -nsu

      Run distribution/base/target/../run.sh -debug

      From POSTMAN:

      PUT: http://192.168.195.157:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/123

      Content-Type: application/xml

      Accept: application/xml

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <flow xmlns="urn:opendaylight:flow:inventory">
      <strict>false</strict>
      <instructions>
      <instruction>
      <apply-actions>
      <action>
      <dec-nw-ttl/>
      </action>
      </apply-actions>
      </instruction>
      </instructions>
      <table_id>2</table_id>
      <id>123</id>
      <cookie_mask>10</cookie_mask>
      <out_port>10</out_port>
      <installHw>false</installHw>
      <out_group>2</out_group>
      <match>
      <ethernet-match>
      <ethernet-type>
      <type>2048</type>
      </ethernet-type>
      </ethernet-match>
      <ipv4-destination>10.0.0.1/24</ipv4-destination>
      </match>
      <hard-timeout>12</hard-timeout>
      <cookie>10</cookie>
      <idle-timeout>34</idle-timeout>
      <flow-name>FooXf1</flow-name>
      <priority>2</priority>
      <barrier>false</barrier>
      </flow>

      When I place a breakpoint in FlowTransaction.java function addFlow
      what arrives there is:

      Flow [_id=null, _key=FlowKey [_id=null], _barrier=false, _bufferId=null, _containerName=null, _cookieMask=10, _flags=null, _flowName=FooXf1, _installHw=false, _instructions=Instructions [_instruction=[Instruction [_order=null, _key=InstructionKey [_order=null], _instruction=null]]], _match=Match [_ethernetMatch=EthernetMatch [_ethernetDestination=null, _ethernetSource=null, _ethernetType=EthernetType [_type=null, _mask=null]], _icmpv4Match=null, _icmpv6Match=null, _inPhyPort=null, _inPort=null, _ipMatch=null, _layer3Match=null, _layer4Match=null, _metadata=null, _protocolMatchFields=null, _tunnel=null, _vlanMatch=null], _outGroup=2, _outPort=10, _strict=false, _cookie=10, _hardTimeout=12, _idleTimeout=34, _priority=2, _tableId=2]

      Note: Flow [_id=null,
      That's wrong, as it is provided
      3:07 AM
      And Match [_ethernetMatch=EthernetMatch [_ethernetDestination=null, _ethernetSource=null, _ethernetType=EthernetType [_type=null, _mask=null]]
      And etherType was provided
      And
      EthernetType [_type=null,
      Should not be null

      Please also note: this flow was captured from running

      mdAddFlow openflow:1 f1

      successfully at the commandline... so it was the result of reading a valid Flow that had travered the FlowTransaction and gotten to the switch.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            hagbard Ed Warnicke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: