Commit Graph

32 Commits

Author SHA1 Message Date
mslacken
ab0ee87629 updated linter and fixed deprecated stuff 2022-10-14 17:40:16 +02:00
Christian Goll
4fe584547b Merge branch 'development' into wwlog-newlines 2022-10-13 14:46:03 +02:00
Christian Goll
fab7e09aeb Merge branch 'development' into container-info2 2022-10-13 10:53:49 +02:00
Christian Goll
396f3238c1 added size of containers 2022-10-13 10:35:17 +02:00
Christian Goll
71bf385cb7 add modifictation and creation date 2022-10-13 10:33:54 +02:00
Christian Goll
33504354c2 Merge branch 'development' into node-edit 2022-10-13 09:59:38 +02:00
Christian Goll
c3416de3cb fix for go1.16 and possible sigsev 2022-09-19 17:10:06 +02:00
Christian Goll
8e0fd64c7e add profile edit (copy&paste) from node edit 2022-09-19 16:01:36 +02:00
Christian Goll
7c453066fa add short check if config can be written 2022-09-19 11:09:36 +02:00
Jonathon Anderson
4661b02a3d Move "not found" presentation to CLI 2022-09-16 21:56:39 +00:00
Jonathon Anderson
14b45e37c0 Fix output of wwctl container show
Commit d8cd6049 introduced erroneous output coming from an
inner function of container show, and (seemingly) erroneously
replaces valid kernel versions with "not found". This commit
fixes both of those issues, and moves the output to the outer
cli function.
2022-09-16 21:33:49 +00:00
Christian Goll
54dd8b3d2f linter fixes as some errors may not really occur 2022-09-16 17:02:17 +02:00
Christian Goll
7087f3e4a1 add edit command for direct edit of node entries 2022-09-16 16:51:07 +02:00
Jonathon Anderson
0b3e862bea Remove trailing newline from wwlog
I noticed that some wwlog calls included a trailing newline, but others
did not. I tested both in isolation and discovered that the behavior was
consistent regardless of whether a trailing newline was included. I
further confirmed in code that wwlog appends a trailing newline
automatically if it is not present; so a trailing newline is unnecessary
in individual calls.

This commit removes trailing newlines from all calls to make them
consistent. It also replaces two calls to wwlog.Printf. (see #534)

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-09-15 12:38:03 -06:00
Christian Goll
c75f4e468c remove also the container image on delete 2022-09-14 14:42:33 +02:00
Jonathon Anderson
22910958b5 Replace all instances of wwlog.Printf
wwlog provides named loggers for each level, which requires
less code and is clearer than wwlog.Printf. The code has
included a mix of both, but this commit consolidates existing
code on the per-level functions.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-09-11 08:00:23 -06:00
Christian Goll
18eb531d4b fixed deletion of network and deletion of tags 2022-09-02 16:45:37 +02:00
Christian Goll
b485ea999f removed optionStrMap in favor of NodeConf
openStrMap is a map[string]string which is sent arround. This is now
done by using a unmarshalled NodeConf instead.
2022-08-18 19:22:55 +02:00
Christian Goll
20fa9d2e2a fix regression on container import 2022-08-11 16:38:43 +02:00
Christian Goll
8c2d40881d use reflect on overlays 2022-08-10 17:09:10 +02:00
Christian Goll
41d12888ab reflections for unmarshal 2022-08-10 14:16:48 +02:00
Christian Goll
d252b974bf Fix Nodeadd with ipaddr count 2022-07-21 08:41:36 +02:00
Christian Goll
99e9316011 restore old node list 2022-07-20 12:13:19 +02:00
Christian Goll
e23f794166 simplified node list command 2022-07-19 17:21:27 +02:00
Christian Goll
1dd519a7e6 clean up and linting fix 2022-07-18 15:04:38 +02:00
Christian Goll
26fff30897 node add with all options now 2022-07-18 14:42:00 +02:00
Christian Goll
e6ef30ed53 porfile add has now all otions of set 2022-07-15 11:10:12 +02:00
Christian Goll
e0c62a81a4 testing profile set 2022-07-14 10:35:27 +02:00
Christian Goll
14b86a5e8e added profile set over API 2022-07-13 15:56:04 +02:00
Christian Goll
59141a6dac change network hadnling 2022-07-13 11:52:24 +02:00
Christian Goll
c8d70e23ad rebased on new API 2022-07-11 16:34:08 +02:00
MatthewHink
d8cd6049ac Initial cut of wwapi.
We need an API for Warewulf in order to automate around it. The initial version of the API will look a lot like wwctl. wwctl will call the API so that we do not need to maintain separate code paths. In this preview wwctl calls the API via direct function call, but we can change that to a gprc or REST call to a Warewulf server in the future.

This commit contains:
wwapid WareWulf API Daemon. A grpc server with mTLS auth.
wwapic WareWulf API Client. A grpc client with mTLS auth. It's just a sample that reads the version from the server.
wwapird WareWulf API Rest Daemon. A http REST reverse proxy to wwapid.
There are also sample insecure and secure curls to test with.

Implemented Functionality:
wwctl node add
wwctl node delete
wwctl node list
wwctl node set
wwctl node status
wwctl container build
wwctl container delete
wwctl container import
wwctl container list
wwctl container show

Some notes on the files:

    Logic that was in wwctl has moved to warewulf/internal/pkg/api. wwctl just calls the API. wwctl functionality is unchanged.
    Everything under the /google directory is copied google proto code to stand up wwapird. It's a bit strange to copy in the code, but that is currently how it's done.
    Everything in warewulf/internal/pkg/api/routes/wwapiv1 is generated code.

There are some loose ends here, such as no service installers. I just ran off the command line for development.
The Makefile could use improvement. I'm building by make clean setup proto all build wwapid wwapic wwapird ; echo $?
I copied the configs from warewulf/etc to /usr/local/etc/warewulf manually.
2022-06-24 08:39:30 -07:00