util: remove unused context.Context parameter from GetPoolID()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-05-14 13:23:55 +02:00 committed by mergify[bot]
parent c9b4ee42e0
commit 08144df2a8
2 changed files with 4 additions and 4 deletions

View File

@ -89,7 +89,7 @@ func getPools(ctx context.Context, monitors string, cr *Credentials) ([]cephStor
// GetPoolID fetches the ID of the pool that matches the passed in poolName
// parameter
func GetPoolID(ctx context.Context, monitors string, cr *Credentials, poolName string) (int64, error) {
func GetPoolID(monitors string, cr *Credentials, poolName string) (int64, error) {
conn, err := connPool.Get(monitors, cr.ID, cr.KeyFile)
if err != nil {
return 0, err
@ -127,14 +127,14 @@ func GetPoolName(ctx context.Context, monitors string, cr *Credentials, poolID i
// the passed in pools
// TODO this should take in a list and return a map[string(poolname)]int64(poolID)
func GetPoolIDs(ctx context.Context, monitors, journalPool, imagePool string, cr *Credentials) (int64, int64, error) {
journalPoolID, err := GetPoolID(ctx, monitors, cr, journalPool)
journalPoolID, err := GetPoolID(monitors, cr, journalPool)
if err != nil {
return InvalidPoolID, InvalidPoolID, err
}
imagePoolID := journalPoolID
if imagePool != journalPool {
imagePoolID, err = GetPoolID(ctx, monitors, cr, imagePool)
imagePoolID, err = GetPoolID(monitors, cr, imagePool)
if err != nil {
return InvalidPoolID, InvalidPoolID, err
}

View File

@ -145,7 +145,7 @@ func GenerateVolID(ctx context.Context, monitors string, cr *Credentials, locati
var err error
if locationID == InvalidPoolID {
locationID, err = GetPoolID(ctx, monitors, cr, pool)
locationID, err = GetPoolID(monitors, cr, pool)
if err != nil {
return "", err
}