Open TimVinkemeier opened 9 years ago
This is how it works:
The backend sends a ModuleAnnouncement message containing the name of the module (as defined in the CompositionSpecification) to the core
Any example?
Register a firewall module called "fw" in the composition specification ([Header][Body]
):
Backend to core: [NetIDE Header with moduleId=<any value>, type=ModuleAnnouncement]["fw"]
Core to Backend: [NetIDE Header with moduleId=<generated ID>, type=ModuleAcknowledge]["fw"]
Do you have already defined an initial "dictionary" for the applications? E.g. fw=firewall, ls= learning switch etc.? If yes, where is it defined? Is there any configuration file in your sources?
No, as I said, it is the name from the composition specification. "fw" was just an example of how a user might have named a firewall application. There is no dictionary, since that is user-defined.
Ok, let me reformulate the question: is there already any available sample specification that I can use as an example and that people can use to test the Backend+Core+Shim? Since we want to provide the firewall and the learning switch as applications that can be used to test our framework, can we produce a sample specification with at least these two applications?
Done for the Ryu backend. For now I will use the original app name that I can get from objects.
@TimVinkemeier : when waiting for the ModuleAcknowledge we receive two messages, the first is empty and the second contains the actual Ack. This is the output @sergiotamu is obtaining in the Ryu backend: ack_message: ['', '\x02\x05\x00\x0c\x00\x00\x00\x00\x00\x00\x01i\x00\x00\x00\x00\x00\x00\x00\x00SimpleSwitch']
Is it done on purpose?
This is the way I send the Ack from my simple Core:
backend.send_multipart([identity,ack_message])
and this is what the backend receives:
['\x02\x05\x00\x0c\x00\n\\p\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00SimpleSwitch']
@doriguzzi It seems to be a problem between different ZeroMQ implementations. I use JeroMQ (the pure-Java implementation) and when I send a multipart message, it has to look like <destinationID>,'',<message>
. The empty string ''
in between is necessary in JeroMQ to delimit the destination and the actual message. I guess your Python implementation does not require that, therefore you see the empty part...
Add support for the new NetIP message types ModuleAnnouncement and ModuleAcknowledge to the existing backends (e.g. Ryu).