Commit Graph

345 Commits

Author SHA1 Message Date
Christian Goll
e0c62a81a4 testing profile set 2022-07-14 10:35:27 +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
Christian Goll
29573e26ad added more values 2022-07-07 11:39:02 +02:00
Christian Goll
a37fa71de0 add explicit set of netname 2022-07-07 11:38:19 +02:00
Christian Goll
8902f08c87 added hangling of map[string]*struct 2022-07-07 11:37:18 +02:00
Christian Goll
84d3b72f63 added more abstrac setter for nested structs 2022-07-07 11:29:58 +02:00
Christian Goll
f5b6287486 Explicit setter func at complie time 2022-07-07 11:29:19 +02:00
Christian Goll
bd2543d484 relection test for comment 2022-07-07 11:28:27 +02:00
Christian Goll
9796e61678 Merge pull request #469 from mslacken/fix-468
fix nil map for networks
2022-07-06 21:38:55 +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
Christian Goll
a13a00a03d fix nil map for networks 2022-06-24 17:20:47 +02:00
Christian Goll
3ced0e2836 add brackets for PrintB if its default 2022-06-23 12:35:19 +02:00
Christian Goll
28de9f5220 addnil to remove option 2022-06-08 16:20:17 +02:00
Christian Goll
04551ef264 for removing a value an empty string is needed 2022-06-08 16:16:52 +02:00
Christian Goll
80c92475b0 added backwards compatibilty for default 2022-05-12 11:51:00 +02:00
jcsiadal
9b6b93a5cb Rename default to primary in src
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-05-05 03:13:21 +00:00
jcsiadal
dbd747788f wwctl profile fixes
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-19 21:59:34 +00:00
Christian Goll
e29aea8ae3 using stirng for ipmiwrite storage 2022-04-14 12:50:38 +02:00
Christian Goll
b3cf1dea6b setaltb for ipmi write 2022-04-14 11:47:34 +02:00
Christian Goll
edc7c04bc2 PrintB returns string 2022-04-14 11:43:02 +02:00
Christian Goll
2e9848fa5c do not unmarshall deprecated yaml 2022-04-14 11:27:09 +02:00
mslacken
f68c0a3633 add backward compatiblity for old yaml syntax 2022-04-14 09:33:30 +02:00
jcsiadal
bc0039eecd Remove redundant line
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-13 18:44:52 +00:00
jcsiadal
8568599627 Convert MACs to lowercase on set
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-13 18:40:55 +00:00
Christian Goll
e3b2ca39d8 simplified range expression 2022-04-11 14:51:35 +02:00
Christian Goll
4782d7e726 fixup profile handling 2022-04-11 14:41:43 +02:00
MatthewHink
086401a07c unit test + nil check pointers 2022-04-09 09:19:03 -04:00
Christian Goll
68946d344d Merge pull request #370 from MatthewHink/mhink-test
Mergeing as need to on updated main for the tests to work
2022-04-09 13:34:17 +02:00
Christian Goll
415445b5ca update test format 2022-04-09 13:31:14 +02:00
Christian Goll
3bbddf4a8c create config entries for profiles 2022-04-08 17:34:52 +02:00
Christian Goll
fa052a0f57 simplified GotReal 2022-04-08 15:15:16 +02:00
Christian Goll
ae2b1ce2ae check for nil vaule of Kernel and Impi 2022-04-08 15:06:40 +02:00
Christian Goll
197c663a97 memory for Ipmi and Kernel Entry FindAllProfiles 2022-04-08 15:01:14 +02:00
Christian Goll
49bb9a40f0 reserve memory ofr kernel and ipmi entry 2022-04-08 14:47:19 +02:00
MatthewHink
3c01728aa5 Fix 365. Nil checks around pointers in nodes.conf. 2022-04-07 16:32:26 -04:00
Christian Goll
95050a44ce add user defined keys for networks/netdev
Every network in the profile and for the nodes can have induvidual keys values
pairs, called Tags, which are propergated to the templates. So they can be used
for things like MTU size like
  `wwct node set node01 --nettag mtu=9000`
and in in ifcfg.xml.ww
```
{{ if $netdev.Tags.mtu -}}
<mtu> {{ $netdev.Tags.mtu }} </mtu>
{{ end -}}
```
2022-04-06 21:36:17 +02:00
Christian Goll
16fa2518fa set not ipv6 if no ipv4 present 2022-04-06 21:36:17 +02:00
jcsiadal
bd3edb9e7f Udated constructors/mods
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-04 16:13:09 +00:00
jcsiadal
1fda01fc36 Datastructure update
Signed-off-by: jcsiadal <jeremy.c.siadal@intel.com>
2022-04-04 16:13:09 +00:00
Christian Goll
c0f7ecf357 store the ovelats as yaml list 2022-03-24 19:45:51 +01:00
Christian Goll
10b5f606d4 set default value for gateway 2022-03-21 11:29:49 +01:00
Christian Goll
d3b10624b0 Merge branch 'ipv6' 2022-03-18 09:37:23 +01:00
Christian Goll
265dbad6c1 do not combine overlays any more 2022-03-17 12:50:51 +01:00
Christian Goll
55bf1695de initial commit of simple ipv6 support
As soon as in warewulf.conf a value for ipaddr6 is defined
all nodes will get a derived ipv6 address if not the ipv6
is not explicitly set.
2022-03-15 15:57:35 +01:00
Christian Goll
29074f34ea fixed recusrive call and SliceAppendUniq 2022-03-11 16:22:26 +01:00
Christian Goll
351b81b9e3 ignore defval on GetSlice
if there is an value the default gets not included in the slice of an value
2022-03-11 15:59:38 +01:00
Christian Goll
f279863d7f node list prints combine valuse for node 2022-03-11 12:27:36 +01:00
Christian Goll
afac77dbbe allow multiple generic and wwinit overlays 2022-03-11 11:50:38 +01:00
Christian Goll
5ac75661c9 Only write to IPMI if this is explictly wanted 2022-03-02 21:24:05 +01:00