Blame libnmstate/netinfo.py

Packit b9ca78
#
Packit b9ca78
# Copyright (c) 2018-2020 Red Hat, Inc.
Packit b9ca78
#
Packit b9ca78
# This file is part of nmstate
Packit b9ca78
#
Packit b9ca78
# This program is free software: you can redistribute it and/or modify
Packit b9ca78
# it under the terms of the GNU Lesser General Public License as published by
Packit b9ca78
# the Free Software Foundation, either version 2.1 of the License, or
Packit b9ca78
# (at your option) any later version.
Packit b9ca78
#
Packit b9ca78
# This program is distributed in the hope that it will be useful,
Packit b9ca78
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit b9ca78
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit b9ca78
# GNU Lesser General Public License for more details.
Packit b9ca78
#
Packit b9ca78
# You should have received a copy of the GNU Lesser General Public License
Packit b9ca78
# along with this program. If not, see <https://www.gnu.org/licenses/>.
Packit b9ca78
#
Packit b9ca78
Packit b9ca78
from .nmstate import plugin_context
Packit Service 5e62f7
from .nmstate import show_with_plugins
Packit Service dd31ba
from .nmstate import show_running_config_with_plugins
Packit b9ca78
Packit b9ca78
Packit b9ca78
def show(*, include_status_data=False):
Packit b9ca78
    """
Packit b9ca78
    Reports configuration and status data on the system.
Packit b9ca78
    Configuration data is the set of writable data which can change the system
Packit b9ca78
    state.
Packit b9ca78
    Status data is the additional data which is not configuration data,
Packit b9ca78
    including read-only and statistics information.
Packit b9ca78
    When include_status_data is set, both are reported, otherwise only the
Packit b9ca78
    configuration data is reported.
Packit b9ca78
    """
Packit b9ca78
    with plugin_context() as plugins:
Packit b9ca78
        return show_with_plugins(plugins, include_status_data)
Packit Service 5e62f7
Packit Service 5e62f7
Packit Service 5e62f7
def show_running_config():
Packit Service 5e62f7
    with plugin_context() as plugins:
Packit Service 5e62f7
        return show_running_config_with_plugins(plugins)