/* $XORP: xorp/etc/templates/mfea4.tp,v 1.15 2006/04/19 19:59:26 pavlin Exp $ */

plumbing {
    mfea4 {
	targetname:		txt = "MFEA_4";
	disable:		toggle = false;
	enabled:		bool;		/* %deprecated */

	interface @: txt {
	    vif @: txt {
		disable:	toggle = false;
		enabled:	bool;		/* %deprecated */
	    }
	}

	traceoptions {
	    flag {
		all {
		    disable:	toggle = false;
		    enabled:	bool;		/* %deprecated */
		}
	    }
	}
    }
}

plumbing {
    mfea4 {
	%help:		short		"Configure the IPv4 Multicast Forwarding Engine Abstraction";
	%modinfo:	provides	mfea4;
	%modinfo:	depends		fea;
	%modinfo:	path		"xorp_fea";
	%modinfo:	default_targetname "mfea";
	%modinfo:	status_method	xrl "$(mfea4.targetname)/common/0.1/get_status->status:u32&reason:txt";
	%modinfo:	startup_method	xrl "$(mfea4.targetname)/common/0.1/startup";
	%modinfo:	shutdown_method	xrl "$(mfea4.targetname)/common/0.1/shutdown";

	%mandatory:	$(@.targetname);

/* TODO: remove this? */
/*
	%activate:	xrl "$(mfea4.targetname)/mfea/0.1/start_mfea";
	%update:	xrl "$(mfea4.targetname)/mfea/0.1/start_mfea";
*/

	targetname {
	    %user-hidden: "XRL target name";
	    %help:	short "XRL target name";
	    %set:;
	}

	disable {
	    %help:	short "Disable the IPv4 MFEA";
	    %create:;
	    %set:	xrl "$(mfea4.targetname)/mfea/0.1/enable_mfea?enable:bool=`~$(@)`";
	    %delete:	xrl "$(mfea4.targetname)/mfea/0.1/enable_mfea?enable:bool=`~$(DEFAULT)`";
	}

	enabled {
	    %deprecated: "Statement 'enabled: true/false' is replaced with 'disable: false/true'";
	    %help:	short "Enable the IPv4 MFEA";
	    %create:;
	    %set:	xrl "$(mfea4.targetname)/mfea/0.1/enable_mfea?enable:bool=$(@)";
	}

	interface @ {
	    %help:	short "Configure IPv4 MFEA on a network interface";
	    %delete: xrl "$(mfea4.targetname)/mfea/0.1/stop_vif?vif_name:txt=$(interface.@)";
	    vif @ {
		%help:	short "Configure IPv4 MFEA on a virtual interface";
		%activate: xrl "$(mfea4.targetname)/mfea/0.1/start_vif?vif_name:txt=$(vif.@)";
		%update: xrl "$(mfea4.targetname)/mfea/0.1/start_vif?vif_name:txt=$(vif.@)";
		%delete: xrl "$(mfea4.targetname)/mfea/0.1/stop_vif?vif_name:txt=$(vif.@)";

		disable {
		    %help:	short "Disable IPv4 MFEA on an interface";
		    %set:	xrl "$(mfea4.targetname)/mfea/0.1/enable_vif?vif_name:txt=$(vif.@)&enable:bool=`~$(@)`";
		    %delete:	xrl "$(mfea4.targetname)/mfea/0.1/enable_vif?vif_name:txt=$(vif.@)&enable:bool=`~$(DEFAULT)`";
		}

		enabled {
		    %deprecated: "Statement 'enabled: true/false' is replaced with 'disable: false/true'";
		    %help:	short "Enable IPv4 MFEA on an interface";
		    %set:	xrl "$(mfea4.targetname)/mfea/0.1/enable_vif?vif_name:txt=$(vif.@)&enable:bool=$(@)";
		    %delete:	xrl "$(mfea4.targetname)/mfea/0.1/enable_vif?vif_name:txt=$(vif.@)&enable:bool=`~$(DEFAULT)`";
		}
	    }
	}

	traceoptions {
	    %help:	short "Configure the tracing options";
	    flag {
		%help:	short "Configure the tracing operation to perform";
		all {
		    %help:	short "Configure all tracing operations";

		    disable {
			%help:	short "Disable all tracing operations";
			%set:	xrl "$(mfea4.targetname)/mfea/0.1/log_trace_all?enable:bool=`~$(@)`";
			%delete: xrl "$(mfea4.targetname)/mfea/0.1/log_trace_all?enable:bool=$(DEFAULT)";
		    }

		    enabled {
			%deprecated: "Statement 'enabled: true/false' is replaced with 'disable: false/true'";
			%help:	short "Enable all tracing operations";
			%set:	xrl "$(mfea4.targetname)/mfea/0.1/log_trace_all?enable:bool=$(@)";
		    }
		}
	    }
	}
    }
}
