mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 04:41:26 -07:00
Pluribus Networks network cli terminal and cliconf plugins (#53735)
* Pluribus Networks network cli terminal and cliconf plugins * Changes in Unit tests and modules according to network_cli connection * Changes in Unit tests and modules according to network_cli connection
This commit is contained in:
parent
4594aee25a
commit
e2d92e82c4
53 changed files with 345 additions and 155 deletions
39
lib/ansible/plugins/terminal/netvisor.py
Normal file
39
lib/ansible/plugins/terminal/netvisor.py
Normal file
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# (c) 2016 Red Hat Inc.
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible 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 Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
import re
|
||||
|
||||
from ansible.errors import AnsibleConnectionFailure
|
||||
from ansible.module_utils._text import to_text, to_bytes
|
||||
from ansible.plugins.terminal import TerminalBase
|
||||
|
||||
|
||||
class TerminalModule(TerminalBase):
|
||||
|
||||
terminal_stdout_re = [
|
||||
re.compile(br">.*[\r\n]?(.*)")
|
||||
|
||||
]
|
||||
|
||||
terminal_stderr_re = [
|
||||
re.compile(br"% ?Error: (?!\bdoes not exist\b)(?!\balready exists\b)")
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue