2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00
Commit Graph

47 Commits

Author SHA1 Message Date
Jarrod Johnson
1b7a18c108 Implement a first attempt at '/users/' to manage authorization and authentication 2014-04-10 17:05:57 -04:00
Jarrod Johnson
0ab31694d5 Implement create and delete from CLI 2014-04-10 13:48:29 -04:00
Jarrod Johnson
9d72be287e Implement send break support in confluent consoles 2014-04-09 15:37:35 -04:00
Jarrod Johnson
92512da79f Apply IBM 2014 copyright and Apache 2 license to project 2014-04-07 16:43:39 -04:00
Jarrod Johnson
8fa8951896 Put comments in to hint a decent strategy to profile runtime performance
To do performance optimization in this sort of application, this is
about as well as I have been able to manage in python.  I will say perl with
NYTProf seems to be significantly better for data, but this is servicable.

I tried yappi, but it goes wildly inaccurate with this codebase.  Because of
the eventlet plumbing, cProfile is still pretty misleading.  Best strategy
seems to be review cumulative time with a healthy grain of salt around the
top items until you get down to info that makes sense.  For example, trampoline
unfairly gets a great deal of the 'blame' by taking on nearly all the activity.

internal time seems to miss a great deal of important information.
2014-04-03 09:54:46 -04:00
Jarrod Johnson
e7eab2bb20 Have confetty put notable state information into title of terminal 2014-04-02 16:18:30 -04:00
Jarrod Johnson
f7321f4e70 Rename nodes and groups collections
It has been expressed that plural form for collection names are preferred.  Additionally, tab
completion is nicer if names do not share so much leading characters.
2014-03-28 14:59:37 -04:00
Jarrod Johnson
83627938bb Fix problem on disconnect from console session
After refactor, some bad codepath was left behind in confetty.  Address the
shortcoming.
2014-03-06 19:49:46 -05:00
Jarrod Johnson
65af925b2d Add quick and dirty example of a command
'nodepower' is not yet 'rpower' like, but it's a quick
demonstration of using the python confluent client library.  It
only supports unix socket as written
2014-03-04 21:09:17 -05:00
Jarrod Johnson
a5504ec62f Refactor/rename code
confetty had a lot of stuff in it.  Factor out bits to a common library for
constructing purpose oriented commands.
2014-03-04 17:12:19 -05:00
Jarrod Johnson
3e1f90882f Fix confetty client behavior when trying to show something that is 404 2014-03-03 15:48:33 -05:00
Jarrod Johnson
271e9076c1 Fix relative paths for non-collection resources in confetty 2014-02-24 11:02:09 -05:00
Jarrod Johnson
9292d89751 Avoid crashing out if someone does too many '..'.
If user tried to change to more parent directories than existed,
confetty would rudely shutdown.  Truncate such a case to '/' rather
than bail.
2014-02-22 22:15:41 -05:00
Jarrod Johnson
ea7d3a268c Implement 'unset' in confetty interactive cli.
Provide a means to clear node specific settings so that inheritance can be restored.
In JSON, send a null as a value for a parameter instead of a string or 'object'.
2014-02-22 21:53:34 -05:00
Jarrod Johnson
7c7754d319 If specifying an attribute as a resource, strip the path info to make it work. 2014-02-22 21:22:45 -05:00
Jarrod Johnson
3d3f820a7d Correct two protocol violations of TLV
One was the client going away without contemplating the done flag.
Another was the server sending two requestdone messages.
2014-02-22 20:38:33 -05:00
Jarrod Johnson
11138aa3de Fix confetty interactive behavior after set
After set, confetty client would fail to follow protocol and
end up leaving followup commands in an off by one state.  One
TODO out of this is to refactor send_request into a library function
2014-02-22 20:22:23 -05:00
Jarrod Johnson
387523f46b Implement 'set' in CLI
While testing set, it was noted that JSON loads does unicode.  Modified configmanager
to treat unicode like str type.
2014-02-22 20:10:13 -05:00
Jarrod Johnson
e236260c3b Have console assume ipmi if no data given, like hardwaremanagement 2014-02-22 19:28:41 -05:00
Jarrod Johnson
f6ed5b5e14 Have confetty interactive attribute show be more informative 2014-02-22 19:12:42 -05:00
Jarrod Johnson
896159da4c Recognize expressions at node/nodegroup creation time 2014-02-22 18:12:21 -05:00
Jarrod Johnson
56ae101366 Disable beep on completion attempt
The beep on completion attempt was highly annoying, disable it.
2014-02-22 17:39:05 -05:00
Jarrod Johnson
a8f48c7955 Assure something that goes in as path to fullpath comes out as path 2014-02-22 17:31:08 -05:00
Jarrod Johnson
974902cc7b Advance state of tab completion in the interactive console
Fix relative tabbing
2014-02-22 14:43:12 -05:00
Jarrod Johnson
71f6199b2e Fix display of 'None' attributes
Previously, assumption was that the response data would be a dict.  This
is not always the case.  If None is encountered, treat it as a blank attribute.
2014-02-22 14:18:20 -05:00
Jarrod Johnson
d8619e76b9 Improve interactive latency
While typing in confetty console in blind test and confetty was using a TLS socket,
the confetty console was noticably chunkier.  The chunkiness could not be detected
on a UNIX socket.  Setting NODELAY on both sides of the socket seems to have eliminated
chunkiness so that at least I can't tell confetty from ssh+ipmitool anymore.
2014-02-22 14:04:43 -05:00
Jarrod Johnson
26c95349fc Do not complete 'cd' to non-path elements 2014-02-22 12:24:22 -05:00
Jarrod Johnson
feb8c68ad4 Preliminary tab completion functionality in interactive prompt 2014-02-22 12:13:51 -05:00
Jarrod Johnson
8ede431b60 Have server interruption exit the client gracefully
If a console session is started and the server disconnects, cleanly exit
instead of being confused by the whole affair.
2014-02-10 19:52:37 -05:00
Jarrod Johnson
1311146637 Add some likely aliases for 'show'
If someone starts thinking of it as a filesystem, be obliging.
That means some people might want to 'dir', some people might
want to 'cat' things.  Make it tend to do the right thing.
2014-02-10 19:46:35 -05:00
Jarrod Johnson
5c0d64d17a Try unix socket by default in confetty
If the unix socket is available and nothing specified, try to use that
2014-02-10 19:44:43 -05:00
Jarrod Johnson
0d425f1f9f Add cli support for 'show'
confetty interactive mode can now do 'show' (aka read, retrieve, whatever) on
more abritrary resources.
2014-02-10 19:36:18 -05:00
Jarrod Johnson
ca87aacaf2 Support console exit and dedicated console mode
Have confetty assume that a plain nodename is a requset for console.
If a console session is started from interactive mode, return to
interactive mode on ctrl-e, c, . rather than exiting.
2014-02-10 18:28:45 -05:00
Jarrod Johnson
3fc39531f4 If a node is specified on the CLI, go straight to console 2014-02-10 09:50:17 -05:00
Jarrod Johnson
563a96f87f Add 'start /node/<node>/console/session' to confetty 2014-02-10 09:16:29 -05:00
Jarrod Johnson
5aa6e6a26c Further make the sockapi and confetty client fleshed out
Here, fix a few mistakes with how relation objects got messaged out.
Add the ability to cd and ls in the confetty interactive mode
2014-02-09 19:26:48 -05:00
Jarrod Johnson
abab0e5cae Flesh out the confetty interactive console slightly 2014-02-09 17:35:49 -05:00
Jarrod Johnson
15c9f841f0 Have confetty detect disconnect cleaner once more. 2014-02-09 13:45:01 -05:00
Jarrod Johnson
70fad4335a Advance state of the socket interface
Properly implement authentication and switch the protocol over to the tlv
based protocol.  Abandon all thought of the socket being directly accessible.
Any CLI semantics will be in confetty and an appliance wishing to expose that CLI
directly should use standard ssh stuff with a shell of confetty.  The unix domain
authentication support makes this feasible (requires user creation push name into
confluent repository at the moment..)
2014-02-09 10:43:26 -05:00
Jarrod Johnson
35a5e9cbf0 Continue trying to flesh out socket api 2013-10-23 13:38:54 -04:00
Jarrod Johnson
8d21674ced Implement unix domain socket in socket api 2013-10-14 09:21:55 -04:00
Jarrod Johnson
1c2341e1eb Cleaner exit on remote termination 2013-10-12 15:04:26 -04:00
Jarrod Johnson
ed0373ade4 Advance confetty example to the point where it can do at least some conserver escape sequences, notably
including disconnect.
2013-10-12 10:44:46 -04:00
Jarrod Johnson
52f8a6dda4 Note for future of socket api 2013-10-10 20:04:59 -04:00
Jarrod Johnson
f5e02bba4e Make confetty work to actually do socket console work 2013-10-10 19:23:06 -04:00
Jarrod Johnson
9855f17d58 Fix socket test case to work multiple times 2013-10-09 20:14:34 -04:00
Jarrod Johnson
ac8e0df051 Arrange things so that the startup py is in bin 2013-07-19 10:31:02 -04:00