Skip to content
Snippets Groups Projects
Verified Commit 6c5c163c authored by Karel Koci's avatar Karel Koci :metal:
Browse files

treewide: format with isort

This sorts all includes in nsfarm project.
parent 3f10a701
Branches
Tags
1 merge request!39Gitlab-CI: add style checks
Pipeline #92271 passed with stages
Showing with 55 additions and 48 deletions
import logging
import os
import re
import logging
import pytest
import pkg_resources
import pytest
import selenium
import nsfarm.target
import nsfarm.web
......
import sys
import argparse
import logging
import sys
from .lxd import __main__ as lxd
from .target import __main__ as target
......
from ..target.target import Target as _Target
from .mox import Mox
from .omnia import Omnia
from .turris1x import Turris1x
from ..target.target import Target as _Target
def get_board(target_config: _Target):
......
"""This defines generic board and its helpers.
"""
import sys
import abc
import time
import logging
import sys
import time
import pylxd
import serial
import serial.tools.miniterm
from pexpect import fdpexpect
from .. import cli
from ..lxd import Container
from ..target.target import Target
......
......@@ -3,22 +3,19 @@
This ensures systematic logging and access to terminals. We implement two special terminal types at the moment. We have
support for shell and u-boot. They differ in a way how they handle prompt and methods they provide to user.
"""
# Notest on some of the hacks in this file:
#
# There are new line character matches in regular expressions. Correct one is \r\n but some serial controlles for some
# reason also use \n\r so we match both alternatives.
#
import os
import io
import abc
import logging
import base64
import fcntl
import io
import logging
import os
import select
import socket
import threading
import typing
import pexpect
from . import mterm
CTRL_C = "\x03"
......
import logging
from .image import Image
from .container import Container
from . import exceptions
from . import exceptions
from .container import Container
from .image import Image
IMAGE_REPO = "https://images.linuxcontainers.org"
......
import sys
import argparse
import pylxd
import subprocess
import sys
import dateutil.relativedelta
from . import utils
from . import Container
import pylxd
from . import Container, utils
def parser(parser):
......
......@@ -6,9 +6,9 @@ import logging
import os
import typing
import warnings
import pylxd
import pexpect
import pylxd
from .. import cli, lxd
from .device import Device
......
"""Images management.
"""
import functools
import hashlib
import io
import time
import typing
import logging
import pathlib
import hashlib
import functools
import platform
import time
import typing
import pylxd
from .. import lxd
from .device import CharDevice, Device, NetInterface
from .exceptions import (
LXDImageUndefinedError,
LXDImageParentError,
LXDImageParameterError,
LXDImageParentError,
LXDImageUndefinedError,
)
from .device import Device, NetInterface, CharDevice
from .. import lxd
logger = logging.getLogger(__package__)
......
import ipaddress
import contextlib
import ipaddress
import socket
......
"""Various utility functions to manage NSFarm containers and images.
"""
import os
import logging
import os
from datetime import datetime
import dateutil.parser
import pylxd
from .container import Container
from .image import Image
......
"""Micro terminal to interface on top of generic socket and stdout/stderr.
"""
import os
import io
import sys
import fcntl
import io
import logging
import os
import select
import sys
import termios
import logging
import warnings
EXIT_CHAR = b"\x1d"
......
import sys
import argparse
from . import Targets
import sys
from ..board import get_board
from ..mterm import mterm
from . import Targets
def parser(parser):
......
"""NSFarm configuration classes.
"""
import pathlib
import collections.abc
import configparser
import functools
import pathlib
import typing
import collections.abc
TARGET_CONFS = (
"/etc/nsfarm_targets.ini",
......
"""This contains implementations of common actions that are commonly performed on router in tests.
"""
import json
from .cli import Shell
......
from . import reforis
from .container import Container, DRIVER_PORTS as _DRIVER_PORTS
from .container import DRIVER_PORTS as _DRIVER_PORTS
from .container import Container
__all__ = ["reforis", "Container"]
......
......@@ -3,8 +3,8 @@
import contextlib
import subprocess
import typing
import pylxd
import pylxd
import selenium.webdriver
from ..lxd import Container as LXDContainer
......
from . import admin, guide, network, packages
from .top import *
from . import admin
from . import guide
from . import network
from . import packages
__all__ = [
"ReForis",
......
"""Shell class tests.
"""
import pytest
from nsfarm.cli import Shell
from nsfarm.lxd import Container
......
import pytest
import pylxd
import pytest
@pytest.fixture(name="lxd_client", scope="package")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment