Server : Apache System : Linux 145.162.205.92.host.secureserver.net 5.14.0-611.45.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 1 05:56:53 EDT 2026 x86_64 User : tradze ( 1001) PHP Version : 8.1.34 Disable Function : NONE Directory : /lib/python3.9/site-packages/cloudinit/net/netops/ |
from abc import abstractmethod
from typing import Optional
from cloudinit.subp import SubpResult
class NetOps:
@staticmethod
@abstractmethod
def link_up(interface: str) -> SubpResult:
pass
@staticmethod
@abstractmethod
def link_down(interface: str) -> SubpResult:
pass
@staticmethod
@abstractmethod
def link_rename(current_name: str, new_name: str):
pass
@staticmethod
def add_route(
interface: str,
route: str,
*,
gateway: Optional[str] = None,
source_address: Optional[str] = None
):
pass
@staticmethod
def append_route(interface: str, address: str, gateway: str):
pass
@staticmethod
def del_route(
interface: str,
address: str,
*,
gateway: Optional[str] = None,
source_address: Optional[str] = None
):
pass
@staticmethod
@abstractmethod
def get_default_route() -> str:
pass
@staticmethod
def add_addr(
interface: str, address: str, broadcast: Optional[str] = None
):
pass
@staticmethod
def del_addr(interface: str, address: str):
pass
@staticmethod
def flush_addr(interface: str):
pass