Linux worldls-302.fr.planethoster.net 4.18.0-553.8.1.lve.el7h.x86_64 #1 SMP Thu Jul 4 15:19:33 UTC 2024 x86_64
LiteSpeed
Server IP : 10.185.0.203 & Your IP : 216.73.216.32
Domains :
Cant Read [ /etc/named.conf ]
User : gerathty
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python2.7 /
site-packages /
cloudinit /
net /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
34.08
KB
-rw-r--r--
2022-10-18 11:03
__init__.pyc
31.73
KB
-rw-r--r--
2022-10-18 11:04
__init__.pyo
31.73
KB
-rw-r--r--
2022-10-18 11:04
cmdline.py
8.63
KB
-rw-r--r--
2019-12-18 16:14
cmdline.pyc
8.24
KB
-rw-r--r--
2022-10-18 11:04
cmdline.pyo
8.24
KB
-rw-r--r--
2022-10-18 11:04
dhcp.py
14.92
KB
-rw-r--r--
2022-10-18 11:03
dhcp.pyc
13.38
KB
-rw-r--r--
2022-10-18 11:04
dhcp.pyo
13.38
KB
-rw-r--r--
2022-10-18 11:04
eni.py
20.69
KB
-rw-r--r--
2019-12-18 16:14
eni.pyc
15.42
KB
-rw-r--r--
2022-10-18 11:04
eni.pyo
15.42
KB
-rw-r--r--
2022-10-18 11:04
netplan.py
15.79
KB
-rw-r--r--
2019-12-18 16:14
netplan.pyc
13.26
KB
-rw-r--r--
2022-10-18 11:04
netplan.pyo
13.26
KB
-rw-r--r--
2022-10-18 11:04
network_state.py
33.71
KB
-rw-r--r--
2019-12-18 16:14
network_state.pyc
34.37
KB
-rw-r--r--
2022-10-18 11:04
network_state.pyo
34.37
KB
-rw-r--r--
2022-10-18 11:04
renderer.py
1.87
KB
-rw-r--r--
2019-12-18 16:14
renderer.pyc
2.66
KB
-rw-r--r--
2022-10-18 11:04
renderer.pyo
2.66
KB
-rw-r--r--
2022-10-18 11:04
renderers.py
1.35
KB
-rw-r--r--
2019-12-18 16:14
renderers.pyc
1.46
KB
-rw-r--r--
2022-10-18 11:04
renderers.pyo
1.46
KB
-rw-r--r--
2022-10-18 11:04
sysconfig.py
34.32
KB
-rw-r--r--
2022-10-18 11:03
sysconfig.pyc
25.96
KB
-rw-r--r--
2022-10-18 11:04
sysconfig.pyo
25.96
KB
-rw-r--r--
2022-10-18 11:04
udev.py
1.38
KB
-rw-r--r--
2019-12-18 16:14
udev.pyc
1.72
KB
-rw-r--r--
2022-10-18 11:04
udev.pyo
1.59
KB
-rw-r--r--
2022-10-18 11:04
Save
Rename
# Copyright (C) 2013-2014 Canonical Ltd. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Blake Rouse <blake.rouse@canonical.com> # # This file is part of cloud-init. See LICENSE file for license information. import abc import six from .network_state import parse_net_config_data from .udev import generate_udev_rule def filter_by_type(match_type): return lambda iface: match_type == iface['type'] def filter_by_name(match_name): return lambda iface: match_name == iface['name'] def filter_by_attr(match_name): return lambda iface: (match_name in iface and iface[match_name]) filter_by_physical = filter_by_type('physical') class Renderer(object): @staticmethod def _render_persistent_net(network_state): """Given state, emit udev rules to map mac to ifname.""" # TODO(harlowja): this seems shared between eni renderer and # this, so move it to a shared location. content = six.StringIO() for iface in network_state.iter_interfaces(filter_by_physical): # for physical interfaces write out a persist net udev rule if 'name' in iface and iface.get('mac_address'): driver = iface.get('driver', None) content.write(generate_udev_rule(iface['name'], iface['mac_address'], driver=driver)) return content.getvalue() @abc.abstractmethod def render_network_state(self, network_state, templates=None, target=None): """Render network state.""" def render_network_config(self, network_config, templates=None, target=None): return self.render_network_state( network_state=parse_net_config_data(network_config), templates=templates, target=target) # vi: ts=4 expandtab