Help on package netplan: NAME netplan DESCRIPTION # Copyright (C) 2023 Canonical, Ltd. # Author: Lukas Märdian <slyon AT ubuntu.com> # # This program 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; version 3. # # This program 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 this program. If not, see <http://www.gnu.org/licenses/>. PACKAGE CONTENTS _netplan_cffi _utils netdef parser state CLASSES builtins.Exception(builtins.BaseException) netplan._utils.NetplanException netplan._utils.NetplanBackendException netplan._utils.NetplanEmitterException netplan._utils.NetplanFileException netplan._utils.NetplanFormatException netplan._utils.NetplanParserException netplan._utils.NetplanParserFlagsException netplan._utils.NetplanValidationException builtins.object netplan.netdef.NetDefinition netplan.netdef.NetDefinitionIterator netplan.parser.Parser netplan.state.State class NetDefinition(builtins.object) | NetDefinition(np_state, ptr) | | Methods defined here: | | __eq__(self, other: 'NetDefinition') -> bool | Return self==value. | | __init__(self, np_state, ptr) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Readonly properties defined here: | | accept_ra | | addresses | | backend | | critical | | dhcp4 | | dhcp6 | | filepath | | id | | link_local | | links | | macaddress | | nameserver_addresses | | nameserver_search | | routes | | set_name | | type | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __hash__ = None class NetDefinitionIterator(builtins.object) | NetDefinitionIterator(np_state, dev_type: str = None) | | Methods defined here: | | __del__(self) | | __init__(self, np_state, dev_type: str = None) | Initialize self. See help(type(self)) for accurate signature. | | __iter__(self) | | __next__(self) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object class NetplanBackendException(NetplanException) | NetplanBackendException(message=None, domain=None, error=None) | | Method resolution order: | NetplanBackendException | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from NetplanException: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from NetplanException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class NetplanEmitterException(NetplanException) | NetplanEmitterException(message=None, domain=None, error=None) | | Method resolution order: | NetplanEmitterException | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from NetplanException: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from NetplanException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class NetplanException(builtins.Exception) | NetplanException(message=None, domain=None, error=None) | | Method resolution order: | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class NetplanFileException(NetplanException) | NetplanFileException(message=None, domain=None, error=None) | | Method resolution order: | NetplanFileException | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Readonly properties defined here: | | errno | | ---------------------------------------------------------------------- | Methods inherited from NetplanException: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from NetplanException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class NetplanFormatException(NetplanException) | NetplanFormatException(message=None, domain=None, error=None) | | Method resolution order: | NetplanFormatException | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from NetplanException: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from NetplanException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class NetplanParserException(NetplanException) | NetplanParserException(message=None, domain=None, error=None) | | Netplan Parser errors are expected to contain the YAML file name | and line and column numbers from where the error was found. | | A parser error might happen during the parsing stage. Parsing errors | might be due to invalid YAML files or invalid Netplan grammar. libnetplan | will check for this kind of issues while it's walking through the YAML | files, so it has access to the location where the error was found. | | Method resolution order: | NetplanParserException | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | SCHEMA_PARSER_ERROR_MSG_REGEX = r'(?P<file_path>.*):(?P<error_line>\d+... | | ---------------------------------------------------------------------- | Methods inherited from NetplanException: | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from NetplanException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class NetplanParserFlagsException(NetplanException) | NetplanParserFlagsException(message=None, domain=None, error=None) | | Method resolution order: | NetplanParserFlagsException | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Methods inherited from NetplanException: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from NetplanException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class NetplanValidationException(NetplanException) | NetplanValidationException(message=None, domain=None, error=None) | | Netplan Validation errors are expected to contain the YAML file name | from where the error was found. | | A validation error might happen after the parsing stage. libnetplan walks | through its internal representation of the network configuration and checks | if all the requirements are met. For example, if it finds that the key | "set-name" is used by an interface, it will check if "match" is present. | As "set-name" requires "match" to work, it will emit a validation error | if it's not found. | | Method resolution order: | NetplanValidationException | NetplanException | builtins.Exception | builtins.BaseException | builtins.object | | Methods defined here: | | __init__(self, message=None, domain=None, error=None) | Initialize self. See help(type(self)) for accurate signature. | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | SCHEMA_VALIDATION_ERROR_MSG_REGEX = r'(?P<file_path>.*\.yaml): (?P<mes... | | ---------------------------------------------------------------------- | Methods inherited from NetplanException: | | __str__(self) | Return str(self). | | ---------------------------------------------------------------------- | Data descriptors inherited from NetplanException: | | __weakref__ | list of weak references to the object | | ---------------------------------------------------------------------- | Static methods inherited from builtins.Exception: | | __new__(*args, **kwargs) class method of builtins.Exception | Create and return a new object. See help(type) for accurate signature. | | ---------------------------------------------------------------------- | Methods inherited from builtins.BaseException: | | __delattr__(self, name, /) | Implement delattr(self, name). | | __getattribute__(self, name, /) | Return getattr(self, name). | | __reduce__(...) | Helper for pickle. | | __repr__(self, /) | Return repr(self). | | __setattr__(self, name, value, /) | Implement setattr(self, name, value). | | __setstate__(...) | | add_note(...) | Exception.add_note(note) -- | add a note to the exception | | with_traceback(...) | Exception.with_traceback(tb) -- | set self.__traceback__ to tb and return self. | | ---------------------------------------------------------------------- | Data descriptors inherited from builtins.BaseException: | | __cause__ | exception cause | | __context__ | exception context | | __dict__ | | __suppress_context__ | | __traceback__ | | args class Parser(builtins.object) | Methods defined here: | | __del__(self) | | __init__(self) | Initialize self. See help(type(self)) for accurate signature. | | load_keyfile(self, input_file: str) | | load_nullable_fields(self, input_file: <class 'IO'>) | | load_yaml(self, input_file: Union[str, IO]) | | load_yaml_hierarchy(self, rootdir: str = None) | | ---------------------------------------------------------------------- | Readonly properties defined here: | | error_count | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object | | flags class State(builtins.object) | Methods defined here: | | __del__(self) | | __getitem__(self, netdef_id: str) | | __init__(self) | Initialize self. See help(type(self)) for accurate signature. | | __len__(self) | | import_parser_results(self, parser: netplan.parser.Parser) | | ---------------------------------------------------------------------- | Readonly properties defined here: | | backend | | bonds | | bridges | | dummy_devices | | ethernets | | modems | | netdefs | | nm_devices | | ovs_ports | | tunnels | | virtual_ethernets | | vlans | | vrfs | | wifis | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables | | __weakref__ | list of weak references to the object FUNCTIONS _create_yaml_patch(patch_object_path: List[str], patch_payload: Union[str, dict], patch_output: <class 'IO'>) _dump_yaml_subtree(prefix: List[str], input_file: <class 'IO'>, output_file: <class 'IO'>) DATA __all__ = ['Parser', 'State', 'NetDefinition', 'NetDefinitionIterator'... FILE /usr/lib/python3/dist-packages/netplan/__init__.py
Generated by phpman v4.12.29 · Markdown · JSON Author: Che Dong Under GNU General Public License
2026-12-03 06:26 @216.73.216.10
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)