diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2019-08-15 19:39:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-08-15 19:39:32 +0000 |
commit | 99f96e86bdf78e9d93ad1d259fc18e3fff772720 (patch) | |
tree | a517bece6c57b1d4d93785a99859036158ed01bc /src/resource_inventory | |
parent | ba7f5834366d3c1c62726cc3dfdf6381baa9b504 (diff) | |
parent | e7f5bdea4f45abf508f4179ce8e3b309c9216ed3 (diff) |
Merge "Checks if host is working"
Diffstat (limited to 'src/resource_inventory')
-rw-r--r-- | src/resource_inventory/resource_manager.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resource_inventory/resource_manager.py b/src/resource_inventory/resource_manager.py index 28bed20..e94b4ec 100644 --- a/src/resource_inventory/resource_manager.py +++ b/src/resource_inventory/resource_manager.py @@ -59,6 +59,7 @@ class ResourceManager: for profile in profile_count.keys(): available = Host.objects.filter( booked=False, + working=True, lab=grb.lab, profile=profile ).count() @@ -144,7 +145,7 @@ class ResourceManager: host_full_set = Host.objects.filter(lab__name__exact=labName, profile=genericHost.profile) if not host_full_set.first(): raise ResourceExistenceException("No matching servers found") - host_set = host_full_set.filter(booked=False) + host_set = host_full_set.filter(booked=False, working=True) if not host_set.first(): raise ResourceAvailabilityException("No unbooked hosts match requested hosts") host = host_set.first() |