darkphase / klish

Tool for Implementing Custom Shells

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

konfd problems??

GoogleCodeExporter opened this issue · comments

Hi,

i'm using konfd to store commands. It works ok when a command is located in 
root view. But if command is located in sub view (different xml) i get an 
error..("The error while request to the config daemon")  (function 
konf_client_recv_answer() in net.c calls process_answer() which evaluates to 
"-e" insted of "-o" )..

each view has depth variable set... (0 for root, 1 for config) and command in 
config fails to process in konfd.. 

parameters passed to konfd are:

working parameters:
-s -l "acsenableTest" -r "^acsenableTest" -p 0x1000 

failing parameter:
-s -l "acsenableTest" -r "^acsenableTest" -p 0x1000 "enable" 


what am i missing?

with regards
Franc




What version of the product are you using? On what operating system?
klish 1.5.1



Original issue reported on code.google.com by fzupa...@gmail.com on 31 Jan 2012 at 10:52

Hello

Do you have "enable" entry within config?
I tried to reproduce the problem and make:
-s -l "acsenableTest" -r "^acsenableTest" -p 0x1000 
-s -l "enable" -r "^enable$"
-s -l "acsenableTest" -r "^acsenableTest" -p 0x1000 "enable"

And it works.

Original comment by serj.kalichev@gmail.com on 1 Feb 2012 at 6:41

Hi,


I'm sending you my xml files, which trigger an error...

ignore startup.xml ( sets only startup view)

types.xml has only one type so you can ignore it too..


root-view.xml is main view, which has two commands that link to two views
(one testView is in the same file, enable-view is in an enable-view.xml
file) and one ordinary command..

I think that problem occurs when view is in different file. the subview in
the same file does not couse any problems. Only command in enable-view
triggers the problem... can you please check and confirm??

with regards
Franc

Original comment by fzupa...@gmail.com on 1 Feb 2012 at 10:49

did my own investigation... thing is, that if command lies in enable->configure 
section, and those sections do not exist in konfd tree, it won't add the 
command. Have to first send "enable" command to konfd, than "configure", then 
add the command...


Original comment by fzupa...@gmail.com on 28 Mar 2012 at 1:53

Yes, the previous command (the "path") must exist. Consider it like a 
filesystem. Views as a directories. Commands like a files

Original comment by serj.kalichev@gmail.com on 28 Mar 2012 at 2:10

Hi,

how can i fill the pattern in config tag, so it will delete two commands.. I 
need an "or" sign.. Is this pattern a regular expression?

with regards
Franc

Original comment by fzupa...@gmail.com on 2 Apr 2012 at 1:17

Hi

Yes, the pattern is extended regular expression.

Original comment by serj.kalichev@gmail.com on 2 Apr 2012 at 1:22

can "path" also be a regular expression?  (see comment 4 for definition of 
"path")

it seems that konfd does not traverse whole tree when deleting a command.. 

with regards
Franc


Original comment by fzupa...@gmail.com on 3 Apr 2012 at 11:43

The path cannot be a regular expression.
The konfd must not traverse whole tree. It deletes command within given path 
only. The different levels can contain the same commands. For example 
"interface ethernet 0" and "interface ethernet 1" paths can contain "ip 
address" command. So you need to specify the right path to delete anything.

Original comment by serj.kalichev@gmail.com on 3 Apr 2012 at 12:04

too bad.. would be nice if i could use a regex, since it would be much easier 
to delete from "interface ethernet ?" sections...

any future plans to add this maybe?

with regards
Franc

Original comment by fzupa...@gmail.com on 3 Apr 2012 at 12:12

No
Not soon at least

Original comment by serj.kalichev@gmail.com on 3 Apr 2012 at 12:21