WIP: Improve config parsing, make --verbose and --config-file global options
Bonus: Generalize and reuse cmd_ssh() Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
parent
4cf608eeb6
commit
144acee10f
12 changed files with 122 additions and 104 deletions
|
@ -1,14 +1,10 @@
|
|||
import subprocess
|
||||
import click
|
||||
from logger import setup_logging, verbose_option
|
||||
|
||||
|
||||
@click.command(name='telnet')
|
||||
@verbose_option
|
||||
def cmd_telnet(verbose):
|
||||
setup_logging(verbose)
|
||||
|
||||
def cmd_telnet(hostname: str = '172.16.42.1'):
|
||||
subprocess.run([
|
||||
'telnet',
|
||||
'172.16.42.1',
|
||||
hostname,
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue