Skip to main content.

Configure modules.xml

Location

This file is located in /etc/ensuite/yencap/modules.xml

Description

This file contains the set of modules to be instantiated by YencaP. If a module is described by a Yang module then the following infos are needed :

else the description of a module is a bit more complex:

YencaP uses this file to instantiate the module objects. The single rule is that a module class and the python filename of the module must both be called {name}_Module. In that way, the YencaP core does not need any update to manage a new module. The code is able to instantiate module objects from their class name.

Below is an example of the modules.xml file with a Yang compliant module Interface and a not Yang compliant module for BGP.

<?xml version="1.0" encoding="UTF&-;8"?>
<modules xmlns:ycp="urn:loria:madynes:ensuite:yencap:1.0">

	<module>
		<yanguri>urn:loria:madynes:ensuite:yencap:module:Interface:1.0?module=interface</yanguri>
		<cache-lifetime>100</cache-lifetime>
	</module>
	<module>
		<name>BGP</name>
		<xpath>/ycp:netconf/ycp:routing</xpath>
		<namespace>urn:loria:madynes:ensuite:yencap:module:BGP:1.0</namespace>
		<cache-lifetime>1000000</cache-lifetime>
		<parameters>
			<host>127.0.0.1</host>
			<port>2605</port>
			<password>zebra</password>
			<allowxpath>true</allowxpath>
			<enable_pass></enable_pass>
		</parameters>
	</module>
	...
</modules>