func (p *UpgradeTask) PreUpgrade() bool {
	var err error
	bdcList := &apis.BlockDeviceClaimList{}
	err = p.client.List(context.TODO(), bdcList)
	if err != nil {
		p.err = err
		return false
	}

	for i := range bdcList.Items {
		err = p.copyHostName(&bdcList.Items[i])
		if err != nil {
			p.err = err
			return false
		}
	}
	return true
}
// PreUpgrade runs the pre-upgrade tasks and returns whether it succeeded or not
PreUpgrade runs the pre-upgrade tasks and returns whether it succeeded or not
// PreUpgrade runs the pre - upgrade tasks and returns whether it succeeded or not
func (p *UpgradeTask) PreUpgrade() bool {
	var err error
	bdcList := &apis.BlockDeviceClaimList{}
	err = p.client.List(context.TODO(), bdcList)
	if err != nil {
		p.err = err
		return false
	}
	for i := range bdcList.Items {
		err = p.copyHostName(&bdcList.Items[i])
		if err != nil {
			p.err = err
			return false
		}
	}
	return true
}
func ( p * UpgradeTask ) PreUpgrade ( ) bool { var err error bdcList := & apis . BlockDeviceClaimList { } err = p . client . List ( context . TODO ( ) , bdcList ) if err != nil { p . err = err return false } for i := range bdcList . Items { err = p . copyHostName ( & bdcList . Items [ i ] ) if err != nil { p . err = err return false } } return true }
PreUpgrade runs the pre-upgrade tasks and returns whether it succeeded or not
PreUpgrade runs the pre - upgrade tasks and returns whether it succeeded or not