Allow setting the number of workers to be used.

Environments with large numbers of CPUs will create a large
number of workers which can have an unnecessarily large
impact on memory usage, particular where you know how many
workers are needed.

Change-Id: Ie4bb075310a61a0873c9e56e4974600dbb4794a1
diff --git a/lib/cinder b/lib/cinder
index ce13b86..1e7f9c4 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -307,6 +307,9 @@
     iniset $CINDER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME
     iniset $CINDER_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
 
+    if [ -n "$API_WORKERS" ]; then
+        iniset $CINDER_CONF DEFAULT osapi_volume_workers "$API_WORKERS"
+    fi
 }
 
 # create_cinder_accounts() - Set up common required cinder accounts