Beispiel #1
0
func PoolDelete(configStore *config.Store, env, pool string) error {
	exists, err := configStore.PoolExists(env, pool)
	if err != nil {
		return err
	} else if !exists {
		return fmt.Errorf("pool '%s' does not exist", pool)
	}

	empty, err := configStore.DeletePool(pool, env)
	if err != nil {
		return err
	}

	if !empty {
		return fmt.Errorf("pool '%s' is not epmty", pool)
	}
	return nil
}