FT: [FortiGate] Support 8.0#463
Open
KarelChanivecky wants to merge 3 commits into
Open
Conversation
- Improve CLI state detection. Regex patterns were checked against source code ensuring compatibility from 7.0 and accross similar product families such as FortiProxy. - Refactor bootstrap_spin into a table-based FSM. - Add command queue mechanism. - Handle credential change request. - Handle hostname update. - Add exits on error. - Add state logging to help with debugging. - All terminal output is logged. Not just unmatched output. - Handle missing VM image. - Better error message when fail to launch due to not meeting password policy Tested on: - FGT 8.0.0:0167 GA (Debug) - FGT 7.6.6:3652 GA (Debug) - FGT 7.4.12:2902 GA - FGT 7.0.19:0696 GA - FGT 6.4.16:2098 GA - FPX 7.6.6:1628 GA - FPX 7.4.13:0722 GA (Debug) - FPX 7.2.16:0465 GA - FPX 7.0.23:0222 GA
Non admin user terminal prompts are terminated with $ instead of #. Also, the build label in the prompt is limited to STS or Interim values.
Author
|
Please hold. There is a change coming in the default hostname string that will not match the regex in this PR. |
Author
Fixed with d077076 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR updates the existing
fortinet/fortigate/launch.pylauncher toaddress several deficiencies in CLI pattern parsing and bootstrap sequencing.
These changes allow the launcher to support a broader set of FOS-derived
products, such as FortiProxy, as well as newer FortiGate versions. The pattern
recognition and command execution logic has been refactored into a table-based
finite state machine to make future feature support easier to add.
This PR does not add new user-facing features. It focuses on making the
existing launcher work reliably across the tested Fortinet images.
Fixes #461
Changes
bootstrap_spin()into a table-based finite state machine.does not satisfy Fortinet password policy requirements.
Testing
Test:
Assert:
Tested on:
Notes
launch.pypassword was not changed. Some FortiProxy images mayship with a stricter default password policy. To launch those images
successfully, pass a compliant password with the password argument.