diff --git a/api/bases/baremetal.openstack.org_openstackbaremetalsets.yaml b/api/bases/baremetal.openstack.org_openstackbaremetalsets.yaml index a2a3d12..921c3da 100644 --- a/api/bases/baremetal.openstack.org_openstackbaremetalsets.yaml +++ b/api/bases/baremetal.openstack.org_openstackbaremetalsets.yaml @@ -143,10 +143,6 @@ spec: description: CtlplaneInterface - Interface on the provisioned nodes to use for ctlplane network type: string - ctlplaneNetmask: - description: 'CtlplaneNetmask - Netmask to use for ctlplane network - (TODO: acquire this is another manner?)' - type: string ctlplaneVlan: description: CtlplaneVlan - Vlan for ctlplane network type: integer diff --git a/api/v1beta1/openstackbaremetalset_types.go b/api/v1beta1/openstackbaremetalset_types.go index 4574147..232fd0d 100644 --- a/api/v1beta1/openstackbaremetalset_types.go +++ b/api/v1beta1/openstackbaremetalset_types.go @@ -81,9 +81,6 @@ type OpenStackBaremetalSetTemplateSpec struct { DeploymentSSHSecret string `json:"deploymentSSHSecret"` // CtlplaneInterface - Interface on the provisioned nodes to use for ctlplane network CtlplaneInterface string `json:"ctlplaneInterface"` - // +kubebuilder:validation:Optional - // CtlplaneNetmask - Netmask to use for ctlplane network (TODO: acquire this is another manner?) - CtlplaneNetmask string `json:"ctlplaneNetmask,omitempty"` // +kubebuilder:default=openshift-machine-api // +kubebuilder:validation:Optional // BmhNamespace Namespace to look for BaremetalHosts(default: openshift-machine-api) diff --git a/config/crd/bases/baremetal.openstack.org_openstackbaremetalsets.yaml b/config/crd/bases/baremetal.openstack.org_openstackbaremetalsets.yaml index a2a3d12..921c3da 100644 --- a/config/crd/bases/baremetal.openstack.org_openstackbaremetalsets.yaml +++ b/config/crd/bases/baremetal.openstack.org_openstackbaremetalsets.yaml @@ -143,10 +143,6 @@ spec: description: CtlplaneInterface - Interface on the provisioned nodes to use for ctlplane network type: string - ctlplaneNetmask: - description: 'CtlplaneNetmask - Netmask to use for ctlplane network - (TODO: acquire this is another manner?)' - type: string ctlplaneVlan: description: CtlplaneVlan - Vlan for ctlplane network type: integer diff --git a/pkg/openstackbaremetalset/baremetalhost.go b/pkg/openstackbaremetalset/baremetalhost.go index ed852e0..b0da8a1 100644 --- a/pkg/openstackbaremetalset/baremetalhost.go +++ b/pkg/openstackbaremetalset/baremetalhost.go @@ -99,22 +99,7 @@ func BaremetalHostProvision( // Check IP version and set template variables accordingly ipAddr, ipNet, err := net.ParseCIDR(ctlPlaneIP) if err != nil { - // TODO: Remove this conversion once all usage sets ctlPlaneIP in CIDR format. - ipAddr = net.ParseIP(ctlPlaneIP) - if ipAddr == nil { - return err - } - - var ipPrefix int - if ipAddr.To4() != nil { - ipPrefix, _ = net.IPMask(net.ParseIP(instance.Spec.CtlplaneNetmask).To4()).Size() - } else { - ipPrefix, _ = net.IPMask(net.ParseIP(instance.Spec.CtlplaneNetmask).To16()).Size() - } - _, ipNet, err = net.ParseCIDR(fmt.Sprintf("%s/%d", ipAddr, ipPrefix)) - if err != nil { - return err - } + return err } CtlplaneIPVersion := "ipv6"