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...
4 years ago
John-Mark Gurney
b68a5daa51
start work on timeout, make sure board is locked/reserved during activate/deactivate
4 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...
4 years ago
John-Mark Gurney
61bb076be2
enforce that the board is reserved by correct user..
4 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...
4 years ago
John-Mark Gurney
0bc61b74fe
add logging of reserve and release events..
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
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
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
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
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
c81261af12
add logging when the release script fails...
4 years ago
John-Mark Gurney
d7c38c1c3c
implement updating of board attributes...
4 years ago
John-Mark Gurney
55620d1f26
move the database tests to the respective file...
4 years ago
John-Mark Gurney
285acdae01
move the main client to __main__..
it'll be getting more complex soon, and I'm trying to simplify __init__
4 years ago
John-Mark Gurney
12a6162d4b
refactor things a bit.. break out from one large file..
4 years ago
John-Mark Gurney
1fedb30959
refactor code a bit, break things out, and make a static function global
4 years ago
John-Mark Gurney
f185c3a39e
handle that subprocess_exec takes/returns bytes...
4 years ago
John-Mark Gurney
f5f9966430
make sure we get the output from the setup script..
4 years ago
John-Mark Gurney
ccfc232d67
sort attributes... properly post for reserve, and add release support...
genericize error handling for the CLI...
4 years ago
John-Mark Gurney
fd750987cd
have the CLI handle auth errors... enforce proper return values...
properly close the httpx client...
marking get_data no cover was bad, had a bug in this, need to get
coverage..
4 years ago
John-Mark Gurney
0d16204436
add FreeBSD Foundation copyright
4 years ago
John-Mark Gurney
1ef71d4561
add tests for running script at reserve/release
4 years ago
John-Mark Gurney
3b8ef85052
add starting point of UI...
4 years ago
John-Mark Gurney
f5e318ea25
implement basic reserve/release... need to call the functions to
implement them... add warning about other databases...
4 years ago
John-Mark Gurney
cfcb417eba
add comments and name functions correct.. get ready for reserving a board...
4 years ago
John-Mark Gurney
5586a6132b
change the paths to be a bit more hierarchical
4 years ago
John-Mark Gurney
39e9ced170
add snmpget routines, and basic power status fetching..
4 years ago
John-Mark Gurney
f8a0dd2790
add an BoardImpl that will contain the implementation...
wrap lines to 80 cols
4 years ago
John-Mark Gurney
7260db1d6b
make sure a bad api key is unauthorized
4 years ago
John-Mark Gurney
c2e59e761f
switch to using an sqlite db instead of flat file...
it'll make other parts of the system easier to manage having
this infrastructure in place...
4 years ago
John-Mark Gurney
0b5546dd8e
Initial work on the API for the lab...
This gets the basic framework together, and testing infrastructure.
Basic bearer authentication is implemented and working.
4 years ago