cloud/bmaas/bmdb: Filter for machines based on provider

Currently the equinix shepherd tries to initialize our nodes from lumen,
which of course is not correct. This change adds another parameter to
the queries and prevents that.

Change-Id: Ib3f65e68403cb1b1282b80c1d494fb030a6d17b1
Reviewed-on: https://review.monogon.dev/c/monogon/+/2039
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Tested-by: Jenkins CI
diff --git a/cloud/bmaas/bmdb/model/queries_workflows.sql b/cloud/bmaas/bmdb/model/queries_workflows.sql
index 8400d4e..49622d8 100644
--- a/cloud/bmaas/bmdb/model/queries_workflows.sql
+++ b/cloud/bmaas/bmdb/model/queries_workflows.sql
@@ -27,6 +27,7 @@
   )
   AND work.machine_id IS NULL
   AND work_backoff.machine_id IS NULL
+  AND machine_provided.provider = $2
 LIMIT $1;
 
 -- name: GetMachineForAgentRecovery :many
@@ -66,6 +67,7 @@
   )
   AND work.machine_id IS NULL
   AND work_backoff.machine_id IS NULL
+  AND machine_provided.provider = $2
 LIMIT $1;
 
 -- name: AuthenticateAgentConnection :many