add tag to tags not nettag

Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
Christian Goll
2024-11-12 16:49:15 +01:00
committed by Jonathon Anderson
parent d9fcc955c1
commit c0d2e3714c
3 changed files with 46 additions and 1 deletions

View File

@@ -344,6 +344,50 @@ nodes:
tag2: value2
`,
},
{
name: "single node add tag",
args: []string{"--tagadd", "tag1=foobaar", "n01"},
wantErr: false,
stdout: "",
inDB: `nodeprofiles:
default: {}
nodes:
n01: {}
`,
outDb: `nodeprofiles:
default: {}
nodes:
n01:
tags:
tag1: foobaar
`,
},
{
name: "single node add tag with netdev",
args: []string{"--tagadd", "tag1=foobaar", "n01"},
wantErr: false,
stdout: "",
inDB: `nodeprofiles:
default: {}
nodes:
n01:
network devices:
default:
ipaddr: 172.16.130.101
`,
outDb: `nodeprofiles:
default: {}
nodes:
n01:
tags:
tag1: foobaar
network devices:
default:
ipaddr: 172.16.130.101
`,
},
{
name: "single node set fs,part and disk",
args: []string{"--fsname=var", "--fspath=/var", "--fsformat=btrfs", "--partname=var", "--partnumber=1", "--diskname=/dev/vda", "n01"},