IXP-Manager
IXP-Manager copied to clipboard
Creating switches fails if cabinetid or infrastructure params are undefined
ISSUE TYPE
Bug Report
VERSION
6.2.0
SUMMARY
/switch/store-by-snmp
method fails with 405 if either cabinetid
or infrastructure
params are left undefined.
STEPS TO REPRODUCE
- browse to /switch/create-by-snmp
- leave either "Infrastructure" or "Rack" pull-down list unchanged
- click
Create
EXPECTED RESULTS
Should work
ACTUAL RESULTS
Oops! An Error Occurred
The server returned a "405 Method Not Allowed".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
Issue is with $r->validate()
here.
validate()
returns to the referrer but in the add-by-snmp stream, the referred is the initial page where the user enters hostname and community rather than the actual form that is being edited. Will need a little bit of work to resolve.
A first "fix" is to make it obvious that these fields must be populated. The next level fix would be to give a meaningful error message, but that might not be worth the effort.