Rename "container" to "image"
- Updated `wwctl upgrade` to handle updates - Maintained `.Container` and `.ContainerName` in tstruct - Added `ContainerName()` methods to node and profile objects - Added `--container`, `-C` aliases to wwctl commands (`<node|profile> <add|set>`) - Added `wwctl container` alias - Added support for `container_exit.sh` if `image_exit.sh` is not found Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
@@ -40,13 +40,13 @@ type Profile struct {
|
||||
Profiles []string `yaml:"profiles,omitempty" lopt:"profile" sopt:"P" comment:"Set the node's profile members (comma separated)"`
|
||||
Comment string `yaml:"comment,omitempty" lopt:"comment" comment:"Set arbitrary string comment"`
|
||||
ClusterName string `yaml:"cluster name,omitempty" lopt:"cluster" sopt:"c" comment:"Set cluster group"`
|
||||
ContainerName string `yaml:"container name,omitempty" lopt:"container" sopt:"C" comment:"Set container name"`
|
||||
ImageName string `yaml:"image name,omitempty" lopt:"image" comment:"Set image name"`
|
||||
Ipxe string `yaml:"ipxe template,omitempty" lopt:"ipxe" comment:"Set the iPXE template name"`
|
||||
RuntimeOverlay []string `yaml:"runtime overlay,omitempty" lopt:"runtime" sopt:"R" comment:"Set the runtime overlay"`
|
||||
SystemOverlay []string `yaml:"system overlay,omitempty" lopt:"wwinit" sopt:"O" comment:"Set the system overlay"`
|
||||
Kernel *KernelConf `yaml:"kernel,omitempty"`
|
||||
Ipmi *IpmiConf `yaml:"ipmi,omitempty"`
|
||||
Init string `yaml:"init,omitempty" lopt:"init" sopt:"i" comment:"Define the init process to boot the container"`
|
||||
Init string `yaml:"init,omitempty" lopt:"init" sopt:"i" comment:"Define the init process to boot the image"`
|
||||
Root string `yaml:"root,omitempty" lopt:"root" comment:"Define the rootfs" `
|
||||
NetDevs map[string]*NetDev `yaml:"network devices,omitempty"`
|
||||
Tags map[string]string `yaml:"tags,omitempty"`
|
||||
|
||||
@@ -114,7 +114,7 @@ func Test_listFields(t *testing.T) {
|
||||
"Profiles",
|
||||
"Comment",
|
||||
"ClusterName",
|
||||
"ContainerName",
|
||||
"ImageName",
|
||||
"Ipxe",
|
||||
"RuntimeOverlay",
|
||||
"SystemOverlay",
|
||||
@@ -168,7 +168,7 @@ func Test_listFields(t *testing.T) {
|
||||
"Profiles",
|
||||
"Comment",
|
||||
"ClusterName",
|
||||
"ContainerName",
|
||||
"ImageName",
|
||||
"Ipxe",
|
||||
"RuntimeOverlay",
|
||||
"SystemOverlay",
|
||||
|
||||
@@ -311,6 +311,16 @@ func (node *Profile) Id() string {
|
||||
return node.id
|
||||
}
|
||||
|
||||
// ContainerName returns the value of the ImageName field for backwards-compatibility.
|
||||
func (node *Node) ContainerName() string {
|
||||
return node.ImageName
|
||||
}
|
||||
|
||||
// ContainerName returns the value of the ImageName field for backwards-compatibility.
|
||||
func (profile *Profile) ContainerName() string {
|
||||
return profile.ImageName
|
||||
}
|
||||
|
||||
/*
|
||||
Returns if the node is a valid in the database
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user