Thursday, November 11, 2010

node types and services

Previously the CORE GUI generated router configs for the router node type. This was mostly limited to Quagga OSPFv2 and OSPFv3, without an easy way to customize processes. Now the configuration has been pushed to the CORE services layer (cored.py) and is more exposed to the user.

Node types:
Users may now customize node types. The default types are router, host, PC, and mdr. Clicking the edit button at the end of the submenu allows the user to define new node types or change existing ones.
In the above screenshot, a new node type "supernode" has been defined, and assigned a custom icon. This new node type will appear in the toolbar. Next, a default set of services that will be started with that node type can be selected.
Services: Services can be assigned to a node or node type. When you place a node, it will automatically have the default services configured for that node type. A service can be a routing protocol, server daemon, or even simply a script that runs after the node is started. A service can also auto-generate its config file(s) based on node properties such as name, interfaces, and addresses.

The above screenshot shows the default services that will be started for the custom type "supernode." The below screenshot shows how services can later be customized for each individual node.

Notice the Customize button, available when selecting services for a certain node. This button has been pressed to invoke the custom services dialog. (This dialog may be improved in the future.) Each service defines its own:
  • per-node directories
  • config files
  • startup index
  • startup/shutdown commands
All of the services are defined in Python files (see core/python/core/services/*.py). All of the above attributes may be customized for each node. Future plans are to allow the user to easily define their own service types using Python extensions (probably ~/.core/services/*.py).

Because all of the services are defined in CORE Python daemon, Python scripts (without GUI) will be able to take advantage of auto-generated configs. The bad news is that router configs are no longer saved in the imn scenario files, unless you customize the config files of a service; effectively the imn file format has changed.

No comments:

Post a Comment