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

196 Commits

Author SHA1 Message Date
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
70b7b62c0f Give messaging layer full info about attributes in attributes plugin.
Messaging layer was unable to contemplate adding info about inheritance and expressions.
2014-02-22 18:20:07 -05:00
Jarrod Johnson
7894a056e1 Remove some debug output 2014-02-22 18:13:21 -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
499377271c Correct setsockopt call argument to correct protocol 2014-02-22 14:12:39 -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
bffa5feef8 Add modulo support to expressions
Modulo support had been overlooked, it has been added back in.
2014-02-20 09:51:15 -05:00
Jarrod Johnson
a68deebec8 Improve the get_nodegroup_attribute to be more full featured
Also, move masking of the _expressionkeys attribute into the core
of the class rather than working around it.
2014-02-19 20:36:39 -05:00
Jarrod Johnson
f2c09795ff Fix expression based callout of other keys
The '_' prefixed attributes suggest more care should be taken.
2014-02-19 20:24:51 -05:00
Jarrod Johnson
e021a22ccb Fix setting of nodes on a group
In configmanager, 'nodes' had been special cased.  The invalid rejection scheme
failed to accomodate the special case, restore the functionality.
2014-02-19 19:44:23 -05:00
Jarrod Johnson
88a55b8942 Add configmanager function to clear attribute.
When a caller requests to clear an attribute, if attribute is there
and not inherited, it is deleted and then groups are searched for
backfill.
2014-02-19 19:36:25 -05:00
Jarrod Johnson
b823bc37d2 Fixup unknown attribute handling.
For one, prevent unknown attributes from getting into configmanager from now on.
Additionally, have the attributes plugin manage to convey bad attributes when
encountered.
2014-02-19 19:10:58 -05:00
Jarrod Johnson
b6853cfbe1 Fix display of group attributes
Something still seems off about it, but it is self contained to attributes plugin for now.
2014-02-18 13:48:26 -05:00
Jarrod Johnson
2b6188e0b6 Add nodegroup management to API
Have nodegroup attributes exposed via API so that they are at
least nominally useful
2014-02-18 13:22:07 -05:00
Jarrod Johnson
cb8f37f1b0 Implement group creation
Nodegroups can now be created through the interface
2014-02-14 16:43:00 -05:00
Jarrod Johnson
66e90394be Fix incorrect deletion of group when node deleted
Accidently changed node deletion to target a group instead, fix
it back the way it was.
2014-02-13 17:07:05 -05:00
Jarrod Johnson
e01c96e534 Implement nodegroup deletion
Nodegroup deletion is now enabled.
2014-02-13 16:57:03 -05:00
Jarrod Johnson
b75b959bf4 Restore nodegroup iteration in rest api 2014-02-13 16:26:52 -05:00
Jarrod Johnson
4ed91e06dc Correct typo in previous commit 2014-02-13 15:57:59 -05:00
Jarrod Johnson
722d0fe128 Fix API explorer to do list type attributes 2014-02-13 15:55:26 -05:00
Jarrod Johnson
41c4183045 Correct type protection code
For an attribute with restricted types, correctly check the type of
inbound data.
2014-02-13 15:16:21 -05:00
Jarrod Johnson
9d283e5c36 Merge branch 'master' of /gsa/pokgsa/projects/x/xcat/git/confluent 2014-02-13 12:59:56 -05:00
Jarrod Johnson
c77eb5be3b Have configmanager protect against unrecognized data.
When doing a set, check the keynames and value types as
appropriate.  raise ValueError in the configmanager case
since it could be code or human mistake.  attributes plugin
then catches this error and propogates it up as an InvalidArgumentException
if it is just trying to pass in data from user.
2014-02-13 12:58:03 -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
61f24ad789 Try unix socket by default in confetty
If the unix socket is available and nothing specified, try to use that
2014-02-10 19:41:30 -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
2e2451a638 Rename 'powerstate' to 'state' in the /power/state resource.
Embracing a scheme where the primary attribute name of a resource
is named the same as the resource as it makes sense.
2014-02-10 18:38:15 -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
de06cb1c34 Fix problem where sockapi enablement broke http api 2014-02-10 10:00:10 -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
0985a717cd Fix SO_PEERCRED auth on unix socket
This allows non-privileged users to be authenticated by SO_PEERCRED.
In the case where the user is not a known confluent user, they are
given a chance to use a name/password.
2014-02-10 09:41:08 -05:00
Jarrod Johnson
fe81465d23 Fix super unix socket access to work
When root or the process owner comes into unix socket, they should
be treated as always authorized.
2014-02-10 09:19:22 -05:00
Jarrod Johnson
563a96f87f Add 'start /node/<node>/console/session' to confetty 2014-02-10 09:16:29 -05:00
Jarrod Johnson
b2d54bf2f5 Correctly detect invalid requests for a particular node 2014-02-09 19:30:46 -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
51229d8185 Fix socket api double send of auth failure notification
The loop was sending failure back after an iteration of the loop
that fails to authenticate and then again at the beginning of the next iteration.
Remove the end iteration sending so that there is only one iteration of the
message
2014-02-09 14:00:06 -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
2f62e9e6bb Key console session objects by tenant and node
Previously, was just keying by node.  The problem of course being that
the first tenant to connect for a given node name dictates the console
object for everyone else.  Correct this by keying by the tuple of tenant and node together.
2014-02-07 18:59:32 -05:00
Jarrod Johnson
3dc0128e73 More pep8 cleanup
Clean up the httpapi source to be pep8 friendly and correct
some things noted by flake
2014-02-06 14:21:11 -05:00