Rename ArgumentValidatingCommand as SSHCommand
All commands can and should be validating arguments. Commands requiring no argument should be considered "validly typed" if their arguments are None.
With this in mind and as ArgumentValidatingCommand is a subclass of SSHCommand and should be able to provide all of its superclass' functionality, it would simplify MockSSH from a usage perspective to consolidate these classes functionalities under the same one.
With this fix:
- ArgumentValidatingCommand is renamed to SSHCommand
- SSHCommand is renamed to _SSHCommand
- ArgumentValidatingCommand is removed from all
- Examples (examples/mock_cisco.py and examples/mock_F5.py) are updated to reflect this change
- The hy DSL is updated to reflect this change
The ArgumentValidatingCommand does not support unknown positional arguments, this is a problem in this use case (see examples/mock_cisco.py):
username john password jd03
In order to replace SSHCommand with ArgumentValidatingCommand we would need to provide that functionality.
Here is an example of what it should support:
command_username = MockSSH.SSHCommand('username',
[username_command_success],
[username_command_failure],
*["<username>", "password", "<password>"])
Where "