add minor quali workflow fixes

This commit is contained in:
Max Brenner
2021-11-04 14:16:03 +01:00
parent 27ad765ee3
commit b7a8e73aa0
2 changed files with 16 additions and 19 deletions

View File

@@ -46,8 +46,8 @@ on:
description: 'the AP models to test'
ap_version:
required: true
default: 'latest'
description: 'revision of firmware to flash on AP, <branch>-<commit> | latest'
default: 'next-latest'
description: 'revision of firmware to flash on AP, <branch>-<commit>'
jobs:
vars:
@@ -71,7 +71,7 @@ jobs:
echo ::set-output name=fms::$(echo "${{ github.event.inputs.openwifi_fms_revision || 'main' }}")
echo ::set-output name=ui::$(echo "${{ github.event.inputs.openwifi_ui_revision || 'main' }}")
echo ::set-output name=ap_models::$(echo "${{ github.event.inputs.ap_models || 'EC420,EAP101,ECW5211,ECW5410' }}")
echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'latest' }}")
echo ::set-output name=ap_version::$(echo "${{ github.event.inputs.ap_version || 'next-latest' }}")
generate-matrix:
name: generate AP model matrix

View File

@@ -5,6 +5,17 @@ from cloudshell.api.cloudshell_api import UpdateTopologyGlobalInputsRequest, Upd
from common import get_session
def get_attribute_value(cloudshell_session, attribute):
if attribute.Type == 'Boolean':
return True if attribute.Value == 'True' else False
elif attribute.Type == 'Numeric':
return int(attribute.Value)
elif attribute.Type == 'Password':
return cloudshell_session.DecryptPassword(attribute.Value).Value
else:
return attribute.Value
def main():
session = get_session()
res_id = sys.argv[1]
@@ -38,14 +49,7 @@ def main():
key = 'username' if key == 'uname' else key
key = 'password' if key == 'passkey' else key
if attribute.Type == 'Boolean':
value = True if attribute.Value == 'True' else False
elif attribute.Type == 'Numeric':
value = int(attribute.Value)
else:
value = attribute.Value
ap_config[key] = value
ap_config[key] = get_attribute_value(session, attribute)
config['access_point'].append(ap_config)
@@ -55,14 +59,7 @@ def main():
for attribute in details.ResourceAttributes:
key = attribute.Name.replace(f"{resource.ResourceModelName}.", '')
if attribute.Type == 'Boolean':
value = True if attribute.Value == 'True' else False
elif attribute.Type == 'Numeric':
value = int(attribute.Value)
else:
value = attribute.Value
tf_config[key] = value
tf_config[key] = get_attribute_value(session, attribute)
config['traffic_generator'] = {
'name': 'lanforge',