clish_nested_up

306 views
Skip to first unread message

cpatt...@globalgossip.net

unread,
Oct 18, 2013, 5:24:08 PM10/18/13
to kl...@googlegroups.com
Hello Serj,

Your product is awesome, however I am having an issue with the nested views. I wish to put this in the global-commands.xml :

                <COMMAND name="exit"
                        help="Exit from this view, up one level"
                        lock="false">
                        <ACTION builtin="clish_nested_up"/>
                </COMMAND>


so that I can exit up one level from whichever nested view I am in. I have set the restore tag in root-view, and I have set up the nested views in such a way:
root-view.xml has default depth=0
enable-mode.xml has depth=1
configure-mode has depth=2
then there are multiple nested views in configure, such as interace-view, which have depth=3.

Actually here is the grep output:
# grep -r depth etc/clish-xml/
etc/clish-xml/chilli-view.xml:          depth="3">
etc/clish-xml/configure-view.xml:               depth="2">
etc/clish-xml/root-view.xml:            restore="depth">
etc/clish-xml/enable-view.xml:          depth="1">
etc/clish-xml/interface-view.xml:               depth="3">
etc/clish-xml/dhcp-view.xml:            depth="3">

It seems from what I have read that this should function fine. However when it is set up like this, and I try to make a change from config mode or do anything with konfd, then I will get the message:
The error while request to the config daemon.

But you can see the konfd daemon is running as the user:
# ps -ef | grep konfd
user    2889     1  0 06:29 ?        00:00:00 /usr/bin/konfd

Is it possible to do it this way, or am I missing something simple?


Thanks





-------------------------------------------------

IMPORTANT NOTICE: The information in this email is confidential and may also be privileged. 
If you are not the intended recipient, any use or dissemination of the information and any disclosure or copying of this email is unauthorised and strictly prohibited.  If you have received this email in error, please promptly inform us by reply email or telephone.  You should also delete this email and destroy any hard copies produced.

serj.k...@gmail.com

unread,
Oct 19, 2013, 4:23:11 AM10/19/13
to kl...@googlegroups.com
Hello

I think you have some problems with CONFIG tag. The klish will not communicate to konfd without CONFIG tag. Grep for CONFIG.
To debug it use --enable-debug for configure script and run konfd in foreground. The clish will print request to konfd and konfd will print input request. Probably you will see a problem.

The clish_nested_up do nothing with konfd.


19.10.2013 01:24, cpatt...@globalgossip.net пишет:


I think you have some problems with CONFIG tag. The klish will not communicate konfd without CONF
  Hello Serj,
--
You received this message because you are subscribed to the Google Groups "klish" group.
To unsubscribe from this group and stop receiving emails from it, send an email to klish+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

cpatt...@globalgossip.net

unread,
Oct 24, 2013, 6:59:19 PM10/24/13
to kl...@googlegroups.com
Well I quit trying to exit up to root-view using the bultiin ACTION builtin="clish_nested_up"/>.
I am happy with using the exit to get back to configure-view, if I set the depth of configure-view=0 config-int-view=1. Then removing "exit" from global commands.

However now I am having a very similar with trying to use klish as the login shell: could it be related? If I set the user path for clishuser in /etc/passwd  to /usr/bin/clish, then konfd will not start up after I reboot. I have set the konfd daemon to run under the account of clishuser in /etc/init.d/klish-init. I have also tried your suggestion of making the file /bin/klish and using that in /etc/passwd.

As far as the CONFIG tags go, I have several different 'view' files. The 'config' view has only one CONFIG tag, the rest of the CONFIG tags are in the other views. For instance the "interface-view.xml" file references the other views.
It looks sort of like this:

<VIEW name="enable-view">
     commands  with CONFIG tags
</VIEW>

 <VIEW name="configure-view">
     commands  with CONFIG tags
</VIEW>

 <VIEW name="configure-if-view"
                prompt="${HOSTNAME}(config-if-${iface})# "
                depth="1">
    commands  with CONFIG tags
</VIEW>


I could show the entire file if it would be helpful.

Thanks
Reply all
Reply to author
Forward
0 new messages