Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziofiorucci committed Jun 9, 2022
1 parent 80ba129 commit ff77c75
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions f5tt/bigiq.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,9 @@ def bigIqSwOnHwjson(fullJSON=None):
deviceJSON['sku'] = bigipSku
deviceJSON['provisionedModules'] = []

enabledLevels = ['nominal', 'dedicated', 'minimum']
for m in d['provisionedModules']:
if m['level'] == 'nominal' or m['level'] == 'dedicated' or m['level'] == 'minimum':
if m['level'] in enabledLevels:
deviceJSON['provisionedModules'].append(m['sku'])
if bigipSN in vCMPHostModules:
if m['sku'] not in vCMPHostModules[bigipSN]:
Expand All @@ -662,7 +663,7 @@ def bigIqSwOnHwjson(fullJSON=None):
vCMPHostModulesRewritten = []
skuModel = '-'.join(d['sku'].split('-')[2:])
for j in range(0,len(vCMPHostModules[sn])):
updatedSKU = skuModel + '-' + '-'.join(vCMPHostModules[sn][j].split('-')[2:])
updatedSKU = skuModel + '-'.join(vCMPHostModules[sn][j].split(skuModel)[1:])
vCMPHostModulesRewritten.append(updatedSKU)

d['provisionedModules'] = vCMPHostModulesRewritten
Expand All @@ -671,7 +672,7 @@ def bigIqSwOnHwjson(fullJSON=None):
vCMPGuestModulesRewritten = []
skuModel = d['elaPlatform'].split(' ')[-1].upper()
for j in range(0,len(vCMPHostModules[sn])):
updatedSKU = skuModel + '-' + '-'.join(vCMPHostModules[sn][j].split('-')[2:])
updatedSKU = skuModel + '-'.join(vCMPHostModules[sn][j].split(skuModel)[1:])
vCMPGuestModulesRewritten.append(updatedSKU)

d['provisionedModules'] = vCMPGuestModulesRewritten
Expand Down

0 comments on commit ff77c75

Please sign in to comment.