Skip to content

Setup emulations and emulation args validation#35

Merged
brokensound77 merged 1 commit intomainfrom
28-update-emulate
Jul 20, 2023
Merged

Setup emulations and emulation args validation#35
brokensound77 merged 1 commit intomainfrom
28-update-emulate

Conversation

@brokensound77
Copy link
Contributor

resolves #28

This sets up the emulate and emulation commands.

TODO

  • implement cleanup functionality (may punt to next PR)

Details

High level flow of emulate Command class

  • if no emulation command passed -> print available
  • if unknown command -> print available
  • if known emulation command, load command class:
    • validate args
    • if valid, run emulation execute method

This flow instantiates the subclass calling BaseEmulation immediately to validate args before continuing.

Test

image

@brokensound77 brokensound77 changed the title Setup emulations and emulation args Setup emulations and emulation args validation Jul 20, 2023
@brokensound77
Copy link
Contributor Author

We should eventually review consistency of prints vs logger, or stdout vs stderr (see screenshot)

@brokensound77
Copy link
Contributor Author

Pycharm could just being funky with the emulated terminal. Looks good in regular terminal
image

@brokensound77 brokensound77 merged commit 6ff2f42 into main Jul 20, 2023
@brokensound77 brokensound77 deleted the 28-update-emulate branch July 20, 2023 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Maintenance] Review SWAT Commands emulate.py

1 participant