From c8e3679ace7d14e0039b45b7124597ce18d1dd4e Mon Sep 17 00:00:00 2001
From: Lucas Alvares Gomes <lucasagomes@gmail.com>
Date: Thu, 4 May 2017 09:53:01 +0100
Subject: [PATCH] DevStack: Install gunicorn and sushy based on g-r constraints

It also removes a comma (",") from an error message.

Depends-On: Ie77b220f630babd325e8d31cdc60ddea680c81a1
Change-Id: I3dc1b4df602912516ffdcef0f8bfd0d0750d7698
---
 devstack/lib/ironic | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index 5350923ad6..3071fdcf60 100644
--- a/devstack/lib/ironic
+++ b/devstack/lib/ironic
@@ -570,7 +570,7 @@ IRONIC_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-$IRONIC_DEFAULT_IMAGE_NAME}
 # the redfish driver
 if is_deployed_by_redfish && [[ "$IRONIC_ENABLED_HARDWARE_TYPES" != *"redfish"* ]]; then
     die $LINENO "Please make sure that the redfish hardware" \
-        "type, is enabled. Take a look at the " \
+        "type is enabled. Take a look at the " \
         "IRONIC_ENABLED_HARDWARE_TYPES configuration option" \
         "for DevStack"
 fi
@@ -690,7 +690,7 @@ function start_redfish_emulator {
     if is_ubuntu; then
         install_package gunicorn
     else
-        pip_install "gunicorn"
+        pip_install_gr "gunicorn"
     fi
 
     sudo gunicorn sushy_tools.emulator.main:app --bind "${HOST_IP}:${IRONIC_REDFISH_EMULATOR_PORT}" \
@@ -708,9 +708,7 @@ function setup_redfish {
         git_clone_by_name "sushy"
         setup_dev_lib "sushy"
     else
-        # TODO(lucasagomes): use pip_install_gr once sushy is added to
-        # the global requirements
-        pip_install "sushy"
+        pip_install_gr "sushy"
     fi
 
     pip_install "sushy-tools"