OXIESEC PANEL
- Current Dir:
/
/
snap
/
core24
/
988
/
usr
/
share
/
netplan
/
netplan_cli
/
cli
/
commands
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
05/04/2025 04:37:50 PM
rwxr-xr-x
π
__init__.py
1.23 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
apply.py
20.05 KB
03/19/2025 10:40:11 AM
rw-r--r--
π
generate.py
4.11 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
get.py
1.52 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
info.py
2.4 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
ip.py
6.08 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
migrate.py
20.11 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
set.py
5.57 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
sriov_rebind.py
7.74 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
status.py
36.5 KB
01/20/2025 06:19:16 PM
rw-r--r--
π
try_command.py
7.83 KB
01/20/2025 06:19:16 PM
rw-r--r--
Editing: get.py
Close
#!/usr/bin/python3 # # Copyright (C) 2020-2023 Canonical, Ltd. # Author: Lukas MΓ€rdian <slyon@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/>. '''netplan get command line''' from ..state import NetplanConfigState from .. import utils class NetplanGet(utils.NetplanCommand): def __init__(self): super().__init__(command_id='get', description='Get a setting by specifying a nested key like "ethernets.eth0.addresses", or "all"', leaf=True) def run(self): self.parser.add_argument('key', type=str, nargs='?', default='all', help='The nested key in dotted format') self.parser.add_argument('--root-dir', default='/', help='Read configuration files from this root directory instead of /') self.func = self.command_get self.parse_args() self.run_command() def command_get(self): state_data = NetplanConfigState(self.key, self.root_dir) print(state_data, end='')