Blame libnmstate/netinfo.py

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