John-Mark Gurney
9e2e993c80
add some notes about future improvements for auth..
3 years ago
John-Mark Gurney
d7927f1130
push down code for reserve/release into BoardImpl...
This makes the separation between the implementation and the API
more clean, as before the API was doing too much work..
3 years ago
John-Mark Gurney
c372051af2
first stages of reworking so that BoardImpl implements all the logic
for reserve/release, relocating this logic out of the API logic.
3 years ago
John-Mark Gurney
a61ca1c0bd
mark this as requiring 3.8.. needed for asyncio tests and more..
3 years ago
John-Mark Gurney
338c33a62b
forgot to remove debug prints, add comment about BoardImpl lock..
3 years ago
John-Mark Gurney
a4eaf48a20
add a timeout attribute to prevent boards from being used too long..
This is not complete as it calls the board relase, but that doesn't
actually do everything needed... work needs to be done to move the
logic from the API into the board proper...
3 years ago
John-Mark Gurney
cc86e21674
improve comments, remove unneeded closes...
3 years ago
John-Mark Gurney
b68a5daa51
start work on timeout, make sure board is locked/reserved during activate/deactivate
3 years ago
John-Mark Gurney
44d7f2d940
merge stderr into stdout for now...
This prevents allowing users to spam the controller's stderr...
In the future this may be forwarded as it's own stream...
3 years ago
John-Mark Gurney
fe76b5a9b9
wrap lines at 80 chars..
really need to get code formatting added to the pipeline..
3 years ago
John-Mark Gurney
8fa96714d1
test was wrong, needed a ws scheme... convert from http -> ws..
3 years ago
John-Mark Gurney
e0bf1c0074
convert tabs to spaces (ugh) and sort...
3 years ago
John-Mark Gurney
5c1fa0d9de
add websockets dep, forgot in previous commit..
3 years ago
John-Mark Gurney
6973b1d08d
Implement tests for bitelab exec board cmd.
This was pretty tricky to get working w/ the pipes and mocking
stdin/stdout, but w/ some pipes it's working.. There is an unclosed
transport that needs to be investigated though.
3 years ago
John-Mark Gurney
61bb076be2
enforce that the board is reserved by correct user..
3 years ago
John-Mark Gurney
32c2fd19af
implement the backend part of exec via websockets.. This should
also more direct testing in the jail, and allow ssh in to the jails
w/o having to do crazy nat...
This means the controller should/can live w/ only the http(s) front
end exposed... ssh can be done via a proxy command the runs sshd -i..
or commands can be directly interacted with.... Future may support
running commands via a pty, allowing window change events to be passed
allowing use of something like xterm.js in a web browser...
aiokq is no longer needed as we are using a database...
3 years ago
John-Mark Gurney
f673b8a910
expand the emulated Process mock..
3 years ago
John-Mark Gurney
58130f1048
don't need aiokq anymore, drop it's import..
3 years ago
John-Mark Gurney
f36f9b5803
add bitelab as a script to get installed, display usage if no commands..
4 years ago
John-Mark Gurney
0bc61b74fe
add logging of reserve and release events..
4 years ago
John-Mark Gurney
06531c19f6
log the access to stdout for now..
4 years ago
John-Mark Gurney
954ab3efbd
make sure that we have the lock here...
4 years ago
John-Mark Gurney
498cffea8d
now that we use deactivate to turn off power, make sure it's called..
4 years ago
John-Mark Gurney
d157861f1e
make sure that when the board is released, power is turned off...
4 years ago
John-Mark Gurney
0af8440f32
add to the mapping..
4 years ago
John-Mark Gurney
d691bade31
add attribute to add the board's ethernet interface to the jail..
4 years ago
John-Mark Gurney
3f341b0c75
add devfspath as one of the options to pass back...
4 years ago
John-Mark Gurney
d1fbf22469
unhide the associated .init and .lock files as well...
4 years ago
John-Mark Gurney
47a2869dc0
wasn't making sure this was called and with the correct parameters..
4 years ago
John-Mark Gurney
182d0f1432
don't imply that this filename is used, it's just a place holder...
4 years ago
John-Mark Gurney
53f8c70e22
add support for activating resources, such as unhiding device nodes..
4 years ago
John-Mark Gurney
091ab57575
add support for passing through the ssh pub key...
4 years ago
John-Mark Gurney
6a1b85215d
move arg parsing a bit earlier, handle non-json error responses...
4 years ago
John-Mark Gurney
ad6e5de5b9
implement get_sshpubkey.. This will attempt to get the local key
if non-provided...
4 years ago
John-Mark Gurney
a4c82967c8
convert to argparse, implement ssh pub key partly, need to test the func
4 years ago
John-Mark Gurney
e3934d66fe
reorg code slightly, make it easier to update constant, also flip this
around as addkeys should be smaller than attrs...
4 years ago
John-Mark Gurney
3668d21557
add the necessary env vars to the release script..
4 years ago
John-Mark Gurney
763a7afbb6
add serialconsole support... this will change in the future..
4 years ago
John-Mark Gurney
262548d4b5
use a configuration file for board setup...
4 years ago
John-Mark Gurney
764373c2a6
fail on first failure when testing, this makes debug prints more likely to be visible..
4 years ago
John-Mark Gurney
a465bb5358
This isn't used anymore, moved to the sqlite database..
4 years ago
John-Mark Gurney
e641a34035
factor out board output, make it repr so multiple lines (ssh keys
or bootup messages) are escaped...
4 years ago
John-Mark Gurney
897f7be944
make sure that the defattrname is set properly..
4 years ago
John-Mark Gurney
dbf53bbac3
add in simple ro attrib definition..
4 years ago
John-Mark Gurney
66757740c6
normalize errors, and use a global var for board manager...
I cannot figure out how to make this work w/ dep injection
due to needing to use asyncio to do DB accesses... This will
work reliably, and is easy to understand...
4 years ago
John-Mark Gurney
474ff60901
add standard args, and increase timeout to 20, as the default of 5 is
too short for startup/teardown..
4 years ago
John-Mark Gurney
5fc747a9d4
Document what ORM we use, and how to manually manipulate data..
4 years ago
John-Mark Gurney
c81261af12
add logging when the release script fails...
4 years ago
John-Mark Gurney
efe0bd2177
add support to the client for setting attributes..
4 years ago
John-Mark Gurney
d7c38c1c3c
implement updating of board attributes...
4 years ago