# This file is part of the project mb-netmgmt
#
# (C) 2022 Deutsche Telekom AG
#
# Deutsche Telekom AG and all other contributors / copyright
# owners license this file to you under the terms of the GPL-2.0:
#
# mb-netmgmt is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# mb-netmgmt is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with mb-netmgmt. If not, see <https://www.gnu.org/licenses/

from mb_netmgmt.ssh import Server, Handler as SshHandler


class Handler(SshHandler):
    message_terminators = [b"]]>]]>", b"\n##\n"]
    default_port = 830

    def open_upstream(self):
        SshHandler.open_upstream(self)
        self.upstream_channel.invoke_subsystem("netconf")

    def handle_prompt(self):
        pass
