2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-10-01 11:22:13 +00:00
Commit Graph

69 Commits

Author SHA1 Message Date
chenzhengzhang
f009a63758 [trac588] fix a bug(bindctl traceback on shutdown) and hide some log while using non-interactive bindctl 2011-03-09 17:27:38 +08:00
Jeremy C. Reed
d58cbd2665 [master] add periods to some bindctl descriptions
There was mix of descriptions with and without trailing periods.
For short phrases maybe a period is not needed, but some
complete sentences were missing.
Since it was a mix I just added the periods to all.
Now there are descriptions within spec files that are not consistent too,
but I don't look at that now.

This was not reviewed.
2011-02-18 12:48:07 -06:00
Jelte Jansen
c78659bd80 [trac384] improve tab-completion suggestions 2011-02-18 12:02:44 +01:00
Jelte Jansen
05f49a9371 [trac384] check if a list value exists with 'go' 2011-02-18 10:34:36 +01:00
Jelte Jansen
b6bce27baf [trac384] addressed two comments from jeremy
- only set a prompt if we have an interactive terminal
- be a bit less verbose on errors

in case of a socket error, only print that error, and not the extra (is it running?) message.
FailToLogin() exception is no longer printed (the methods that raise it already print the real error themselves)
Unexpected Exceptions are now printed *more* verbose, i.e. with a full stacktrace instead of just a message. If we want to 'expect' more error types (and only print a short message that speaks for itself, to look more userfriendly), we should add those explicitely, and not use 'except Exception'.
2011-02-17 11:55:08 +01:00
Jelte Jansen
6bbb42b7fa [trac384] Revert "[trac384] removed an unused if branch"
This reverts commit 086b420bfb.

Conflicts:

	src/bin/bindctl/bindcmd.py
2011-02-17 11:23:12 +01:00
Jelte Jansen
cad6c0a62b [trac384] fix the config go command
It had stopped working for any identifier that did not start with /, this should fix that
2011-02-17 11:20:08 +01:00
Jelte Jansen
086b420bfb [trac384] removed an unused if branch 2011-02-01 10:51:28 +01:00
Jelte Jansen
184c6c7068 [trac384] more review comments addressed 2011-01-31 16:38:31 +01:00
Jelte Jansen
7c7c776676 [trac384] handle review comments
actually just the first part of it
2011-01-31 16:03:25 +01:00
zhanglikun
db105a36be Merge branch 'master' into trac384 2011-01-20 18:30:51 +08:00
JINMEI Tatuya
901c9eed83 Revert "maintenance commit"
This reverts commit a669db434d.

The reverted commit was introduced due to misoperation possibly with
git-new-workdir, and actually reverted previous changes made on master.
By reverting it we now recover these lost changes.
2011-01-18 13:50:51 -08:00
JINMEI Tatuya
a669db434d maintenance commit 2011-01-18 12:07:35 -08:00
Jelte Jansen
b929be82fe Merge branch 'trac431' 2011-01-17 19:47:27 +01:00
Jelte Jansen
3954c628c1 pretty-print command results
Most obvious change is for the command "Stats show", where the blob of stats data is now printed ina more readable fashion.
Also removed the print of 'send the command' line, and empty results are not printed at all
2011-01-13 13:11:27 -08:00
Jelte Jansen
345b81701d check http response code, if unauthorized, login again 2011-01-06 12:37:07 +01:00
Jelte Jansen
f64a196284 improve internal help documentation for config commands
while i was at it, improved printing/indentation of help data to make output more readable


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac384@4150 e5f2f494-b856-4b98-b285-d166d9295462
2011-01-04 11:16:39 +00:00
Jelte Jansen
e8edbcf573 show actual error (ie the exception text) for a DataNotFoundError, instead of just 'not found'
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac384@4125 e5f2f494-b856-4b98-b285-d166d9295462
2011-01-03 15:28:26 +00:00
Jelte Jansen
c31de72c76 make value optional for 'config add <list>'; add the default value that is specified in the spec file in that case
always show map contents for 'config show <map>', not just the map name


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac384@4123 e5f2f494-b856-4b98-b285-d166d9295462
2011-01-03 14:29:55 +00:00
Jelte Jansen
ff385d569e update for showing of list contents
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac384@3962 e5f2f494-b856-4b98-b285-d166d9295462
2010-12-22 14:38:47 +00:00
Jelte Jansen
9851a189c6 sync with trunk
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac384@3743 e5f2f494-b856-4b98-b285-d166d9295462
2010-12-07 10:48:41 +00:00
Jelte Jansen
4bd81e036d merge branches/trac405
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@3739 e5f2f494-b856-4b98-b285-d166d9295462
2010-12-07 08:49:39 +00:00
Jelte Jansen
f373cd95de replaced workaround (identifier/value switch) by more fundamental solution (making the value optional)
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac405@3723 e5f2f494-b856-4b98-b285-d166d9295462
2010-12-05 22:08:14 +00:00
Jelte Jansen
fe68c56d43 bindctl printing of configuration values changed to be in JSON format instead of python literals (which is also the format required for input). 1-line change, discussed on jabber.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@3694 e5f2f494-b856-4b98-b285-d166d9295462
2010-12-01 16:34:29 +00:00
Jelte Jansen
af62c6c6bb some cleanup and removal of temporary things
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac405@3680 e5f2f494-b856-4b98-b285-d166d9295462
2010-11-30 14:43:23 +00:00
Jelte Jansen
dbfbbb2b32 support for list indices wrt set/add/remove operations
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac405@3663 e5f2f494-b856-4b98-b285-d166d9295462
2010-11-29 20:31:44 +00:00
Jelte Jansen
96a12cbadf 'checkpoint' commit, can address individual list items, not set them yet, need a bit of refactoring first
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac405@3643 e5f2f494-b856-4b98-b285-d166d9295462
2010-11-28 21:36:22 +00:00
Jelte Jansen
359efa4b21 bindctl config show improvements;
if the identified item is a map, show the entries
if it is a list, show the items with an index
(thinking about having a third one; if the list consists of map items, show the entries of those too, but we need list addressing (#405) to do that right)

also added a show_json command which simply prints the complete item and all its children in JSON format

temporarily added a few fake config_data items to Auth to play around with. we'll need to remove these before merge later


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac384@3443 e5f2f494-b856-4b98-b285-d166d9295462
2010-11-04 11:44:48 +00:00
JINMEI Tatuya
f6acd3ffaf trivial cleanup: removed a duplicate import.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2844 e5f2f494-b856-4b98-b285-d166d9295462
2010-08-28 18:41:22 +00:00
Jelte Jansen
162ce5577c better printing of errors when reading and sending user login information from bindctl to cmdctl; ticket #260
(coded by tingting, reviewed partly by shane, the rest by me)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2681 e5f2f494-b856-4b98-b285-d166d9295462
2010-08-10 09:27:05 +00:00
Jelte Jansen
254b3aa8df make bindctl error if you try to perform a config command on an unknown or non-running module
added 'have_specification()' to MultiConfigData class
+tests of course
although bindcmd seems to be lacking much in the test department... (fitted it kinda-sorta into bindctl_test right now)


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac99@2643 e5f2f494-b856-4b98-b285-d166d9295462
2010-08-05 14:36:14 +00:00
Jelte Jansen
e26aaedc8e merge branches/trac284 (Not every 'data' parsing is done with json)
specfiles must now be strict JSON (i.e. no single quotes around strings but double quotes, no comma after the last element of a map or list, and true/false instead of True/False), since the python json parser is more strict than the C++ one.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2541 e5f2f494-b856-4b98-b285-d166d9295462
2010-07-20 09:41:22 +00:00
Jelte Jansen
6fe33b957f update literal_eval calls to also use json.loads
json has a few things tiny bit different, and the parser in python is stricter than absolutely necessary, so had to update a few spec and test data files


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac284@2441 e5f2f494-b856-4b98-b285-d166d9295462
2010-07-08 15:48:58 +00:00
Jelte Jansen
a8bd18ab0b fix; only initialize fully if it hasn't been done yet, otherwise only update the specifications and the configuration as known by the manager, not the local changes
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac285@2440 e5f2f494-b856-4b98-b285-d166d9295462
2010-07-08 14:47:16 +00:00
Likun Zhang
fc5d7da022 1. Remove certificate file 'bindctl.pem'. 2. Add options -c(--certificate-chain) to bindctl. 3. Override class HTTPSConnection to support server certificate validation. 4. Rename module name from 'Cmd-Ctrl' to 'Cmdctl'. 5. Add support to cmdctl.spec file, now there are three configurable items for cmdctl: 'key_file', 'cert_file' and 'accounts_file', all of them can be changed in runtime.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2357 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-30 17:57:34 +00:00
Likun Zhang
cb3e3b3cfc Merge trac220 to trunk: 1. Make bindctl's command parser only do minimal check. Parameter value can be a sequence of non-space characters, or a string surrounded by quotation marks(these marks can be a part of the value string in escaped form). Make error message be more friendly.(if there is some error in parameter's value, the parameter name will provided) 2. Refactor function login_to_cmdctl() in class BindCmdInterpreter. Avoid using Exception to catch all exceptions.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2356 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-30 17:35:46 +00:00
Likun Zhang
4058640801 Update the code according Jelte's review. Fix some hardcode string in code. Raise correct exception if key/certificate file doesn't exist. Fix docstring error.
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac127@2305 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-28 09:46:52 +00:00
Likun Zhang
77fcdf53d3 Fix the bug report by ticket 92: bindctl can't all available modules.
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac127@2263 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-24 11:24:06 +00:00
Likun Zhang
fe4fa5f0cb 1. Remove certificate file 'bindctl.pem'. 2. Add options -c(--certificate-chain) to bindctl. 3. Override class HTTPSConnection to support server certificate validation.
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac127@2167 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-18 11:28:49 +00:00
Likun Zhang
6000bb171b Change code of bindctl according the review result: 1. Fix typo error. 2. Use getpwnam to get user home directory.
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac220@2165 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-18 08:03:14 +00:00
JINMEI Tatuya
4c2fafb0ee removed a redundant white space at EOL
(trivial style fix, skipping review)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2117 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-15 19:01:38 +00:00
Likun Zhang
8656b4b0c6 1. Change bindctl's code according the suggestion in trac220.
Command parser only do minimal check. now parameter value can be a sequence of non-space characters, or a string surrounded by quotation marks(these marks can be a part of the value string in escaped form)
   Make error message be more friendly.(if there is some error in parameter's value, the parameter name will be provided)
2. Refactor function login_to_cmdctl() in class BindCmdInterpreter.
   Avoid using Exception to catch all exceptions.

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac220@2108 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-11 11:05:09 +00:00
Likun Zhang
efcdb2155e Generate a unique session ID by using socket.gethostname() instead of socket.gethostbyname(), since the latter one could make bindctl stall if its own host name can't be resolved.(the patch was created by Jinmei and reviewed by zhanglikun)
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2096 e5f2f494-b856-4b98-b285-d166d9295462
2010-06-09 03:48:54 +00:00
Likun Zhang
b13c2aac74 Ignore value/type check for commands belong to fake module 'config'.
git-svn-id: svn://bind10.isc.org/svn/bind10/branches/likun-value-check@1944 e5f2f494-b856-4b98-b285-d166d9295462
2010-05-27 09:07:49 +00:00
Likun Zhang
3dabd8c630 Add code for task 80(add value/type check for cmdctl). After review, the code needs to be merged to trunk.
1. When cmdctl get the command from bindctl/webgui, cmdctl need first check if the the value of command parameters conforms to its specification file. 
2. Bindctl should check command paramters' value and type before sending them out. (it helps user to correct its command immediately)
3. Add API function 'convert_type()' to lib/config/config_data, 

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/likun-value-check@1911 e5f2f494-b856-4b98-b285-d166d9295462
2010-05-24 03:26:17 +00:00
Jelte Jansen
1db7be2208 Merged in branches/trac90
(module descriptions in spec files)
See also https://bind10.isc.org/ticket/90


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1856 e5f2f494-b856-4b98-b285-d166d9295462
2010-05-19 14:55:30 +00:00
JINMEI Tatuya
50e619ebf1 typo: s/stding/stdin/
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1621 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-20 23:58:45 +00:00
Jelte Jansen
b4661557e1 don't store ~/.bind10/default_user.csv if $HOME environment variable isn't set
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1561 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-19 00:16:44 +00:00
Jelte Jansen
4b17dea51b changed default_user.csv file used to store the bindctl user from $cwd to ~/.bind10/default_user.csv
if the directory cannot be make or the file cannot be written the default isn't stored (an error is printed but the session continues)
read/write permissions are for user only


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1560 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-19 00:10:27 +00:00
Likun Zhang
3831ebf57b 1. Update TODO list.
2. Remove unused variable "CONST_COMMAND_NODE" according Jelte's review.

git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1473 e5f2f494-b856-4b98-b285-d166d9295462
2010-03-17 03:26:04 +00:00