By creating a Cisco.Router.general.txt.custom file, this extends the 'out-the-box' Cisco.Router.general.txt file with your custom activity.
The scripts are then combined at run-time to create a single script, which is used by the client thread allocated to the device.
It sounds like a coding issue in your custom activity.
Any chance you can attach your scripts and I'll take a quick look?
thank you for your super fast reply!
I does not add any code, because the function customCustom_Activity_Template(sAltCommand)
returns an prio errror "client script error"
I also tried to call Custom_Activity_NotSupported(sAltCommand)
But I does receive a prio 1 error and not the warning message "has not this functionality added".
I think I did a failure with the custom.router.general.txt.custom . :/
Calling any function from the custom device file works great.
My custom activity http://pastebin.com/rUs1sVEF
I've noticed a couple of things which may be causing a problem.
1) In your Function Client() code in your custom activity Client script, you have a function call to the 'Activity_UpdatePassword' function (just after your 'Test' log message).
Is this supposed to be there?
This is an out-the-box activity which sends a message back to the client script, so you should be making the function call using:
CmdResults = Activity_UpdatePassword()
You'd normally then use the CmdResults message text and send it to the Info Log using:
Call cl.Log(3, "Password change results: " & CmdResults)
2) The second thing possibly causing a problem may be a mismatch between the custom activity function call in the Cisco.Router.general.txt.custom device extension file and the custom Client script.
Is the function name for your custom activity in the Cisco.Router.general.txt.custom file still:
If not, then this is your problem.
Looking at your client script (just after the 'Activity_UpdatePassword' function call) you are making a call to a function Custom_Activity_Template.
sResults = Custom_Activity_Template(sAltCommand)
If this function does not exist in your Cisco.Router.general.txt.custom file, you will get an error.
You probably need to rename the function call in your Client script file to match the one in your Cisco.Router.general.txt.custom file.
I only add the UpdatePassword() to see if I get the warning message. And it works.
The Custom_Activiy_Template(sAltCommand) is also only a test if I can call any function in my Cisco.Router.general.txt.custom .Both function from the templatefile aren't working.
Maybe my Templatefile is corrupt?
I think I may have spotted the problem.
First, please remove the call to the UpdatePassword function (which you say you used as a test), so that CatTools calls your custom activity.
Now, in the Info Log, when you run the activity do you see this Warning level message (from within your Cisco.Router.general.txt.custom activity)?
- "Running custom activity example in custom device template script"
If so, then do you see this Debug level one too?
- "Parsing [SCRIPT_NAME] version information"
My guess would be you see the first, but not the second message.
If this is correct, then the problem is a known issue which relates to the calling of the 'SendCommandSingle' method within some of the older CatTools device scripts in that function parameter signatures do not match the custom script samples.
For the Cisco.Router.general device type, you need to use:
- SendCommandSingle(CmdToSend, YesToConfirm, SuppressMess)
CmdToSend is the command textstring
YesToConfirm is 1 or 0 (1 will send answer 'yes' to Yes/No type prompts)
SuppressMess is 1 or 0. If SuppressMess is set to 0, then if an error message is detected in the device response, then you will see the following warning message:
Hope this helps!Steve
- The following command caused an error: [CmdToSend]"