Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion SoftLayer/fixtures/SoftLayer_Product_Package.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@
{
'id': 1240,
'capacity': '4',
'description': 'Private Computing Instance',
'units': 'PRIVATE_CORE',
'description': 'Computing Instance (Dedicated)',
'itemCategory': {'categoryCode': 'Computing Instance'},
'prices': [{'id': 1007,
'categories': [{'id': 80,
Expand All @@ -358,6 +359,7 @@
{
'id': 1250,
'capacity': '4',
'units': 'CORE',
'description': 'Computing Instance',
'itemCategory': {'categoryCode': 'Computing Instance'},
'prices': [{'id': 1144,
Expand All @@ -369,6 +371,7 @@
{
'id': 112233,
'capacity': '55',
'units': 'CORE',
'description': 'Computing Instance',
'itemCategory': {'categoryCode': 'Computing Instance'},
'prices': [{'id': 332211,
Expand Down
3 changes: 2 additions & 1 deletion SoftLayer/managers/vs.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ def _get_package_items(self):
mask = [
'description',
'capacity',
'units',
'prices[id,locationGroupId,categories[name,id,categoryCode]]'
]
mask = "mask[%s]" % ','.join(mask)
Expand Down Expand Up @@ -848,7 +849,7 @@ def _get_price_id_for_upgrade(self, package_items, option, value,
}
category_code = option_category[option]
for item in package_items:
is_private = str(item['description']).startswith('Private')
is_private = (item.get('units') == 'PRIVATE_CORE')
for price in item['prices']:
if 'locationGroupId' in price and price['locationGroupId']:
# Skip location based prices
Expand Down