maapi_cli_path_cmd

42 views
Skip to first unread message

ishamir

unread,
Oct 31, 2012, 1:24:59 PM10/31/12
to confd-us...@googlegroups.com
This function is not documented very well in the user guide.
Could you post further description of it?
Thanks!

Carl Moberg

unread,
Oct 31, 2012, 1:54:08 PM10/31/12
to confd-us...@googlegroups.com
Ishamir,

 What is it about the command that you are missing?

ishamir

unread,
Nov 7, 2012, 11:11:40 AM11/7/12
to confd-us...@googlegroups.com
Sorry I meant this one: 
int maapi_cli_cmd_to_path(int sock, char *line, char *ns, int nsize,
char *path, int psize);

can you provide details on each received parameter?

Carl Moberg

unread,
Nov 8, 2012, 6:15:00 PM11/8/12
to confd-us...@googlegroups.com
Ishamir,

 Ok, thanks, that function is undocumented. We're adding it right away and I'll post it here when it's done.

Johan Bevemyr

unread,
Nov 9, 2012, 3:02:05 AM11/9/12
to confd-us...@googlegroups.com
Sure, I have added this documentation.

"This function tries to determine which C-/I-style CLI command
   can be associated with a given path in the data model in context
   of a given transaction. This is determined by running the formating
   code used by the 'show running-config' command for the subtree given
   by the path, and the looking for text lines associated with the given
   path. Consequentcly, if the path does not exist in the transaction
   no output will be generated, or if tailf:cli- annotations have been
   used to suppress the 'show running-config' text for a path then no
   such command can be derived."

This function is also used in the cdb_cli_diff_iterate() function to
determine which command should be associated with a given
change.



Johan Bevemyr

unread,
Nov 9, 2012, 7:08:14 AM11/9/12
to confd-us...@googlegroups.com
And the following text fo rthe maapi_cli_cmd_to_path() command.

     Given a data model path formated as a C- and I-style command, try
     to determine the corresponding and path. If the string cannot be
     interpreted as a path an error message is given indicating that
     the string is either an operational mode command, a configuration
     mode command, or just badly formatted. The string is interpreted
     in the context of the current running configuration, ie all xpath
     expressions in the data model are evaluated in the context of the
     running config. Note that the same input may result in a correct
     answer when invoked with one state of the running config, and an
     error if the running config has another state due to different
     list elements being present, or xpath (when and display-when)
     expressions are being evaluated differently.

Reply all
Reply to author
Forward
0 new messages