Fix object storage mapping

The product category mapping is missing the object storage mapping
relationship. This patch fixes it.

Change-Id: I0a320e57845443307797076ba9ecef2f373648fa
This commit is contained in:
Feilong Wang 2017-08-08 00:07:19 +12:00
parent a9b9a83e73
commit f7321d9723
1 changed files with 8 additions and 2 deletions

View File

@ -29,7 +29,12 @@ from distil import exceptions
LOG = log.getLogger(__name__)
PRODUCT_CATEGORY = ('Compute', 'Network', 'Block Storage', 'Object Storage')
COMPUTE_CATEGORY = "Compute"
NETWORK_CATEGORY = "Network"
BLOCKSTORAGE_CATEGORY = "Block Storage"
OBJECTSTORAGE_CATEGORY = "Object Storage"
PRODUCT_CATEGORY = [COMPUTE_CATEGORY, NETWORK_CATEGORY,
BLOCKSTORAGE_CATEGORY, OBJECTSTORAGE_CATEGORY]
class OdooDriver(driver.BaseDriver):
@ -150,7 +155,8 @@ class OdooDriver(driver.BaseDriver):
if len(obj_pids) > 0:
obj_p = self.product.browse(obj_pids[0])
self.product_catagory_mapping[obj_pids[0]] = \
OBJECTSTORAGE_CATEGORY
for region in regions:
# Ensure returned region name is same with what user see
# from Keystone.