- BuiltIn.Run Keyword If '${config_api_type}' == '${EMPTY}' BuiltIn.Should Contain ${resp.text} ${src}
- ${tunnel_interface_name} = BuiltIn.Run Keyword If "tunnel-interface-names" in "${json}" Genius.Get Tunnel Interface Name ${json["internal-tunnel"][0]} tunnel-interface-names
- ${tunnel_name_output} ${tunnel_name} = BuiltIn.Run Keyword Unless '${config_api_type}' == '${EMPTY}' BuiltIn.Should Match Regexp ${resp.text} "tunnel-name":"(tun[\\w\\d]+)"
- ${tunnel} = BuiltIn.Set Variable If '${config_api_type}' == '${EMPTY}' ${tunnel_interface_name} ${tunnel_name}
- [Return] ${tunnel}
+ IF '${config_api_type}' == '${EMPTY}'
+ BuiltIn.Should Contain ${resp.text} ${src}
+ END
+ IF "tunnel-interface-names" in "${json}"
+ ${tunnel_interface_name} = Genius.Get Tunnel Interface Name
+ ... ${json["internal-tunnel"][0]}
+ ... tunnel-interface-names
+ ELSE
+ ${tunnel_interface_name} = Set Variable ${None}
+ END
+ IF '${config_api_type}' != '${EMPTY}'
+ ${tunnel_name_output} ${tunnel_name} = BuiltIn.Should Match Regexp
+ ... ${resp.text}
+ ... "tunnel-name":"(tun[\\w\\d]+)"
+ ELSE
+ ${tunnel_name_output} ${tunnel_name} = Set Variable ${None} ${None}
+ END
+ ${tunnel} = BuiltIn.Set Variable If
+ ... '${config_api_type}' == '${EMPTY}'
+ ... ${tunnel_interface_name}
+ ... ${tunnel_name}
+ RETURN ${tunnel}