summaryrefslogtreecommitdiffstats
path: root/conductor
diff options
context:
space:
mode:
Diffstat (limited to 'conductor')
-rw-r--r--conductor/conductor/solver/service.py18
1 files changed, 11 insertions, 7 deletions
diff --git a/conductor/conductor/solver/service.py b/conductor/conductor/solver/service.py
index f0bdb81..e539acd 100644
--- a/conductor/conductor/solver/service.py
+++ b/conductor/conductor/solver/service.py
@@ -17,23 +17,22 @@
# -------------------------------------------------------------------------
#
-import cotyledon
-import time
import socket
-from oslo_config import cfg
-from oslo_log import log
+import time
+import cotyledon
+from conductor import messaging
+from conductor import service
from conductor.common.models import plan
from conductor.common.music import api
from conductor.common.music import messaging as music_messaging
from conductor.common.music.model import base
from conductor.i18n import _LE, _LI
-from conductor import messaging
-from conductor import service
from conductor.solver.optimizer import optimizer
from conductor.solver.request import parser
from conductor.solver.utils import constraint_engine_interface as cei
-
+from oslo_config import cfg
+from oslo_log import log
# To use oslo.log in services:
#
@@ -347,6 +346,11 @@ class SolverService(cotyledon.Service):
rec["attributes"]["host_id"] = resource.get("host_id")
rec["candidate"]["host_id"] = resource.get("host_id")
+ if rec["candidate"]["inventory_type"] == "cloud":
+ if resource.get("flavor_map"):
+ rec["attributes"]["flavors"] = resource.get(
+ "flavor_map")
+
# TODO(snarayanan): Add total value to recommendations?
# msg = "--- total value of decision = {}"
# LOG.debug(msg.format(_best_path.total_value))