fp7-netide / Engine

App Engine to enable Network App programs to be executed, systematically tested, and refined on a variety of concrete SDN platforms
Eclipse Public License 1.0
10 stars 11 forks source link

Exception: KeyError NETIDE_FENCE #65

Closed peppepetra closed 8 years ago

peppepetra commented 8 years ago

@schwabe @doriguzzi

After the update of the Core and NetIp Java Lib (e076cae6e4b123cce32b90c4a5ae1b3a981892b1), I see this error in the Ryu-backend:

Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/home/iolie/workspace/Engine_master/Engine/ryu-backend/ryu-backend.py", line 221, in run self.handle_read(msg) File "/home/iolie/workspace/Engine_master/Engine/ryu-backend/ryu-backend.py", line 302, in handle_read self.of_datapath.of_hello_handler(decoded_header) File "/home/iolie/workspace/Engine_master/Engine/ryu-backend/ryu-backend.py", line 95, in of_hello_handler self.handle_event(netide_header, buf) File "/home/iolie/workspace/Engine_master/Engine/ryu-backend/ryu-backend.py", line 145, in handle_event msg_to_send = NetIDEOps.netIDE_encode('NETIDE_FENCE', self.netide_xid, module_id, 0, "") File "/usr/local/lib/python2.7/dist-packages/ryu/netide/netip.py", line 139, in netIDE_encode type_code = NetIDEOps.NetIDE_type[type] KeyError: 'NETIDE_FENCE'

The demo that I am testing is:

<?xml version="1.0" encoding="utf-8"?>
<CompositionSpecification  xmlns="http://netide.eu/schemas/compositionspecification/v1">
  <Modules>
    <Module id="SimpleSwitch" loaderIdentification="simple_switch.py" noFenceSupport="true"/>
  </Modules>
  <Composition>
    <ModuleCall module="SimpleSwitch"/>
  </Composition>
</CompositionSpecification> 

The composition specifies noFenceSupport="true"

doriguzzi commented 8 years ago

Could you please check whether you are using the latest version of the netip.py library? It seems that you are using a version where the NETIDE_FENCE message type is not defined.

peppepetra commented 8 years ago

Thank you @doriguzzi. It works