X7ROOT File Manager
Current Path:
/usr/lib/python2.7/site-packages/cloudinit/net
usr
/
lib
/
python2.7
/
site-packages
/
cloudinit
/
net
/
📁
..
📄
__init__.py
(34.08 KB)
📄
__init__.pyc
(31.73 KB)
📄
__init__.pyo
(31.73 KB)
📄
cmdline.py
(8.63 KB)
📄
cmdline.pyc
(8.24 KB)
📄
cmdline.pyo
(8.24 KB)
📄
dhcp.py
(14.92 KB)
📄
dhcp.pyc
(13.38 KB)
📄
dhcp.pyo
(13.38 KB)
📄
eni.py
(20.69 KB)
📄
eni.pyc
(15.42 KB)
📄
eni.pyo
(15.42 KB)
📄
netplan.py
(15.79 KB)
📄
netplan.pyc
(13.26 KB)
📄
netplan.pyo
(13.26 KB)
📄
network_state.py
(33.71 KB)
📄
network_state.pyc
(34.37 KB)
📄
network_state.pyo
(34.37 KB)
📄
renderer.py
(1.87 KB)
📄
renderer.pyc
(2.66 KB)
📄
renderer.pyo
(2.66 KB)
📄
renderers.py
(1.35 KB)
📄
renderers.pyc
(1.46 KB)
📄
renderers.pyo
(1.46 KB)
📄
sysconfig.py
(34.31 KB)
📄
sysconfig.pyc
(25.94 KB)
📄
sysconfig.pyo
(25.94 KB)
📄
udev.py
(1.38 KB)
📄
udev.pyc
(1.72 KB)
📄
udev.pyo
(1.59 KB)
Editing: renderers.py
# This file is part of cloud-init. See LICENSE file for license information. from . import eni from . import netplan from . import RendererNotFoundError from . import sysconfig NAME_TO_RENDERER = { "eni": eni, "netplan": netplan, "sysconfig": sysconfig, } DEFAULT_PRIORITY = ["eni", "sysconfig", "netplan"] def search(priority=None, target=None, first=False): if priority is None: priority = DEFAULT_PRIORITY available = NAME_TO_RENDERER unknown = [i for i in priority if i not in available] if unknown: raise ValueError( "Unknown renderers provided in priority list: %s" % unknown) found = [] for name in priority: render_mod = available[name] if render_mod.available(target): cur = (name, render_mod.Renderer) if first: return cur found.append(cur) return found def select(priority=None, target=None): found = search(priority, target=target, first=True) if not found: if priority is None: priority = DEFAULT_PRIORITY tmsg = "" if target and target != "/": tmsg = " in target=%s" % target raise RendererNotFoundError( "No available network renderers found%s. Searched " "through list: %s" % (tmsg, priority)) return found # vi: ts=4 expandtab
Upload File
Create Folder