Skip to content

POC sketch #1

Description

@plajjan
import ssh
import drivers

actor Client(tcp_connect_cap, address, username, password=None, key=None, protocol="ssh", port=22 if protocol == "ssh" else 23):
    client = ssh.Client() if protocol == "ssh" else ..? telnet? or what? maybe just support ssh for now
    driver = drivers.auto_detect(client)  # figure out which driver to use, like IOS XR or JUNOS

    def cmd(cb: action(err: ?Exception, response: ?str) -> None, command: str):
        """Run a command on device and return the result via callback
        """
        driver.cmd(cb, command)

    def conf(cb: action(err: ?Exception) -> None, config: list[str]):
        """Apply configuration on device
        """
        driver.conf(cb, config)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions