vino/pkg/api/v1/zz_generated.deepcopy.go
Matt McEuen 7dddf0f7d1 Build BMH network config
This constructs a VM's BMH network config secret, based on a template.
It also integrates IPAM functionality into the controller.

TODOs for subsequent patchsets:
- manage VM mac addresses.
- implement replacement of e.g. $vino.nodebridgegw
- confirm the nameservers definition below works
  (it's a different field than we use in hostgenerator-m3)

The current patchset generates a networkData like so from the sample CRs:

links:
  - id: management
    name: management
    type: bridge
    mtu: 1500
    #  ethernet_mac_address: ??
    bridgeName: vminfra-bridge
  - id: external
    name: external
    type: sriov-bond
    mtu: 9100
    #  ethernet_mac_address: ??
    bond_miimon: 100
    bond_mode: 802.3ad
    bond_xmit_hash_policy: layer3+4
    pf: [enp29s0f0,enp219s1f1]
    vlan: 100
networks:
  - id: management
    type: ipv4
    link: management
    ip_address: 192.168.2.10
    #netmask: "TODO - see if needed when ip has CIDR range"
    dns_nameservers: [135.188.34.124]
    routes:
      - network: 10.0.0.0
        netmask: 255.255.255.0
        gateway: $vino.nodebridgegw
  - id: external
    type: ipv4
    link: external
    ip_address: 169.0.0.10
    #netmask: "TODO - see if needed when ip has CIDR range"
    dns_nameservers: []
    routes:
      - network: 0.0.0.0
        netmask: 0.0.0.0
        gateway: 169.0.0.1

Change-Id: I99b1a104764687c8b84f2495591e0712bed73ae5
2021-03-09 10:40:31 -06:00

511 lines
14 KiB
Go

// +build !ignore_autogenerated
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by controller-gen. DO NOT EDIT.
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AllocatedIP) DeepCopyInto(out *AllocatedIP) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllocatedIP.
func (in *AllocatedIP) DeepCopy() *AllocatedIP {
if in == nil {
return nil
}
out := new(AllocatedIP)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *BMCCredentials) DeepCopyInto(out *BMCCredentials) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BMCCredentials.
func (in *BMCCredentials) DeepCopy() *BMCCredentials {
if in == nil {
return nil
}
out := new(BMCCredentials)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CPUConfiguration) DeepCopyInto(out *CPUConfiguration) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUConfiguration.
func (in *CPUConfiguration) DeepCopy() *CPUConfiguration {
if in == nil {
return nil
}
out := new(CPUConfiguration)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DaemonSetOptions) DeepCopyInto(out *DaemonSetOptions) {
*out = *in
out.Template = in.Template
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetOptions.
func (in *DaemonSetOptions) DeepCopy() *DaemonSetOptions {
if in == nil {
return nil
}
out := new(DaemonSetOptions)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DiskDrivesTemplate) DeepCopyInto(out *DiskDrivesTemplate) {
*out = *in
if in.Options != nil {
in, out := &in.Options, &out.Options
*out = new(DiskOptions)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskDrivesTemplate.
func (in *DiskDrivesTemplate) DeepCopy() *DiskDrivesTemplate {
if in == nil {
return nil
}
out := new(DiskDrivesTemplate)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DiskOptions) DeepCopyInto(out *DiskOptions) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskOptions.
func (in *DiskOptions) DeepCopy() *DiskOptions {
if in == nil {
return nil
}
out := new(DiskOptions)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IPPool) DeepCopyInto(out *IPPool) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
out.Status = in.Status
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPool.
func (in *IPPool) DeepCopy() *IPPool {
if in == nil {
return nil
}
out := new(IPPool)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *IPPool) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IPPoolList) DeepCopyInto(out *IPPoolList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]IPPool, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolList.
func (in *IPPoolList) DeepCopy() *IPPoolList {
if in == nil {
return nil
}
out := new(IPPoolList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *IPPoolList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) {
*out = *in
if in.Ranges != nil {
in, out := &in.Ranges, &out.Ranges
*out = make([]Range, len(*in))
copy(*out, *in)
}
if in.AllocatedIPs != nil {
in, out := &in.AllocatedIPs, &out.AllocatedIPs
*out = make([]AllocatedIP, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolSpec.
func (in *IPPoolSpec) DeepCopy() *IPPoolSpec {
if in == nil {
return nil
}
out := new(IPPoolSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *IPPoolStatus) DeepCopyInto(out *IPPoolStatus) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolStatus.
func (in *IPPoolStatus) DeepCopy() *IPPoolStatus {
if in == nil {
return nil
}
out := new(IPPoolStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NamespacedName) DeepCopyInto(out *NamespacedName) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedName.
func (in *NamespacedName) DeepCopy() *NamespacedName {
if in == nil {
return nil
}
out := new(NamespacedName)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Network) DeepCopyInto(out *Network) {
*out = *in
if in.DNSServers != nil {
in, out := &in.DNSServers, &out.DNSServers
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Routes != nil {
in, out := &in.Routes, &out.Routes
*out = make([]VMRoutes, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (in *Network) DeepCopy() *Network {
if in == nil {
return nil
}
out := new(Network)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NetworkInterface) DeepCopyInto(out *NetworkInterface) {
*out = *in
if in.Options != nil {
in, out := &in.Options, &out.Options
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkInterface.
func (in *NetworkInterface) DeepCopy() *NetworkInterface {
if in == nil {
return nil
}
out := new(NetworkInterface)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeSelector) DeepCopyInto(out *NodeSelector) {
*out = *in
if in.MatchLabels != nil {
in, out := &in.MatchLabels, &out.MatchLabels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSelector.
func (in *NodeSelector) DeepCopy() *NodeSelector {
if in == nil {
return nil
}
out := new(NodeSelector)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeSet) DeepCopyInto(out *NodeSet) {
*out = *in
in.NodeLabel.DeepCopyInto(&out.NodeLabel)
out.LibvirtTemplateDefinition = in.LibvirtTemplateDefinition
if in.NetworkInterfaces != nil {
in, out := &in.NetworkInterfaces, &out.NetworkInterfaces
*out = make([]NetworkInterface, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.DiskDrives != nil {
in, out := &in.DiskDrives, &out.DiskDrives
*out = new(DiskDrivesTemplate)
(*in).DeepCopyInto(*out)
}
out.NetworkDataTemplate = in.NetworkDataTemplate
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSet.
func (in *NodeSet) DeepCopy() *NodeSet {
if in == nil {
return nil
}
out := new(NodeSet)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Range) DeepCopyInto(out *Range) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Range.
func (in *Range) DeepCopy() *Range {
if in == nil {
return nil
}
out := new(Range)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VMNodeFlavor) DeepCopyInto(out *VMNodeFlavor) {
*out = *in
if in.VMFlavor != nil {
in, out := &in.VMFlavor, &out.VMFlavor
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMNodeFlavor.
func (in *VMNodeFlavor) DeepCopy() *VMNodeFlavor {
if in == nil {
return nil
}
out := new(VMNodeFlavor)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VMRoutes) DeepCopyInto(out *VMRoutes) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMRoutes.
func (in *VMRoutes) DeepCopy() *VMRoutes {
if in == nil {
return nil
}
out := new(VMRoutes)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Vino) DeepCopyInto(out *Vino) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Vino.
func (in *Vino) DeepCopy() *Vino {
if in == nil {
return nil
}
out := new(Vino)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Vino) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VinoList) DeepCopyInto(out *VinoList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Vino, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VinoList.
func (in *VinoList) DeepCopy() *VinoList {
if in == nil {
return nil
}
out := new(VinoList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *VinoList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VinoSpec) DeepCopyInto(out *VinoSpec) {
*out = *in
if in.NodeSelector != nil {
in, out := &in.NodeSelector, &out.NodeSelector
*out = new(NodeSelector)
(*in).DeepCopyInto(*out)
}
if in.CPUConfiguration != nil {
in, out := &in.CPUConfiguration, &out.CPUConfiguration
*out = new(CPUConfiguration)
**out = **in
}
if in.Networks != nil {
in, out := &in.Networks, &out.Networks
*out = make([]Network, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Nodes != nil {
in, out := &in.Nodes, &out.Nodes
*out = make([]NodeSet, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
out.DaemonSetOptions = in.DaemonSetOptions
out.BMCCredentials = in.BMCCredentials
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VinoSpec.
func (in *VinoSpec) DeepCopy() *VinoSpec {
if in == nil {
return nil
}
out := new(VinoSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *VinoStatus) DeepCopyInto(out *VinoStatus) {
*out = *in
out.ConfigMapRef = in.ConfigMapRef
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]metav1.Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VinoStatus.
func (in *VinoStatus) DeepCopy() *VinoStatus {
if in == nil {
return nil
}
out := new(VinoStatus)
in.DeepCopyInto(out)
return out
}