f5devcentral / f5-automation-config-converter

Convert BIG-IP configs to AS3 and DO declarations
https://clouddocs.f5.com/products/extensions/f5-automation-config-converter/latest/
Apache License 2.0
35 stars 14 forks source link

Error "Missing or mis-indented '}'" #99

Open mrRosset opened 1 year ago

mrRosset commented 1 year ago

Environment

Summary

When trying to convert the bigip.conf or the archive.ucs, an error is produced. The error complains about missing a "}" or a misaligned "}" when the irule is perfectly valid. This does not seem to be related to #90 as its not linked to the cert-order-manager

Steps To Reproduce

Steps to reproduce the behavior:

  1. Convert following config:

    ltm rule /Common/log_ws {
    when WS_CLIENT_FRAME {
    switch -glob [WS::frame type] {
        "0" {log local0. "Type     : Continuatoin frame - 0" }
    }
    }
    when WS_SERVER_FRAME {
    switch -glob [WS::frame type] {
        "0" { log local0. "Type     : Continuatoin frame - 0" }
    }
    }
    }
  2. Observe the following error message:

    Error: Error parsing input file. Please open an issue at https://github.com/f5devcentral/f5-automation-config-converter/issues and include the following error: 
    Missing or mis-indented '}' for line: '    switch -glob [WS::frame type] {'
    at orchestrate (/app/src/engines/parser.js:65:31)                                                                                                                                                                                            
    at /app/src/engines/parser.js:275:65                                                                                                                                                                                                                     
    at Array.map (<anonymous>)                                                                                                                                                                                                                       
    at /app/src/engines/parser.js:275:52                                                                                                                                                                                                         
    at Array.forEach (<anonymous>)                                                                                                                                                                                                                
    at module.exports (/app/src/engines/parser.js:204:28)                                                                                                                                                                                        
    at mainRunner (/app/src/main.js:98:18)                                                                                                                                                                                                       
    at main (/app/src/main.js:187:30)         

Expected Behavior

The conversion continues.

Actual Behavior

An error is produced:

Error: Error parsing input file. Please open an issue at https://github.com/f5devcentral/f5-automation-config-converter/issues and include the following error: 
Missing or mis-indented '}' for line: '    switch -glob [WS::frame type] {'
    at orchestrate (/app/src/engines/parser.js:65:31)                                                                                                                                                                                            
    at /app/src/engines/parser.js:275:65                                                                                                                                                                                                                     
    at Array.map (<anonymous>)                                                                                                                                                                                                                       
    at /app/src/engines/parser.js:275:52                                                                                                                                                                                                         
    at Array.forEach (<anonymous>)                                                                                                                                                                                                                
    at module.exports (/app/src/engines/parser.js:204:28)                                                                                                                                                                                        
    at mainRunner (/app/src/main.js:98:18)                                                                                                                                                                                                       
    at main (/app/src/main.js:187:30)