func (p *UpgradeTask) copyHostName(claim *apis.BlockDeviceClaim) error {
	// copy the value only if .spec.hostName is non-empty and nodeAttributes.hostName
	// is empty. If hostname field is empty, it is not required to copy the value, as
	// it may be a new BDC.
	if len(claim.Spec.HostName) != 0 &&
		len(claim.Spec.BlockDeviceNodeAttributes.HostName) == 0 {
		claim.Spec.BlockDeviceNodeAttributes.HostName = claim.Spec.HostName
		return p.client.Update(context.TODO(), claim)
	}
	return nil
}
// copyHostName will copy the hostname string from .spec.hostName to
// .spec.nodeAttributes.hostName
copyHostName will copy the hostname string from .spec.hostName to
.spec.nodeAttributes.hostName
// copyHostName will copy the hostname string from . spec . hostName to // . spec . nodeAttributes . hostName
func (p *UpgradeTask) copyHostName(claim *apis.BlockDeviceClaim) error {
	if len(claim.Spec.HostName) != 0 &&
		len(claim.Spec.BlockDeviceNodeAttributes.HostName) == 0 {
		claim.Spec.BlockDeviceNodeAttributes.HostName = claim.Spec.HostName
		return p.client.Update(context.TODO(), claim)
	}
	return nil
}
func ( p * UpgradeTask ) copyHostName ( claim * apis . BlockDeviceClaim ) error { if len ( claim . Spec . HostName ) != 0 && len ( claim . Spec . BlockDeviceNodeAttributes . HostName ) == 0 { claim . Spec . BlockDeviceNodeAttributes . HostName = claim . Spec . HostName return p . client . Update ( context . TODO ( ) , claim ) } return nil }
copyHostName will copy the hostname string from .spec.hostName to
.spec.nodeAttributes.hostName
copyHostName will copy the hostname string from . spec . hostName to . spec . nodeAttributes . hostName
// copy the value only if .spec.hostName is non-empty and nodeAttributes.hostName // is empty. If hostname field is empty, it is not required to copy the value, as // it may be a new BDC.