import tempfile import shutil import pprint import subprocess import glob import submodules import onlyaml import onlu from string import Template import re import json import lsb_release g_dist_codename = lsb_release.get_distro_information().get("CODENAME") logger = onlu.init_logging("onlpm", logging.INFO) class OnlPackageError(Exception): """General Package Error Exception This class is used to communicate user-level configuration and runtime errors related to package contents, package building, and similar operations. This exception should be caught at the highest level and the error message comminicated to the user.""" def __init__(self, value): self.value = value
import fcntl import subprocess import glob import submodules import StringIO from collections import Iterable import onlyaml import onlu import fileinput import crypt import string import random import re import json logger = onlu.init_logging('onlrfs') class OnlRfsError(Exception): """General Error Exception""" def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class OnlRfsSystemAdmin(object): def __init__(self, chroot): self.chroot = chroot
import fcntl import subprocess import glob import submodules import StringIO from collections import Iterable import onlyaml import onlu import fileinput import crypt import string import random import re import json logger = onlu.init_logging('onlrfs') class OnlRfsError(Exception): """General Error Exception""" def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class OnlRfsSystemAdmin(object): def __init__(self, chroot):
import tempfile import shutil import pprint import subprocess import glob import submodules import onlyaml import onlu from string import Template import re import json import lsb_release g_dist_codename = lsb_release.get_distro_information().get('CODENAME') logger = onlu.init_logging('onlpm', logging.INFO) class OnlPackageError(Exception): """General Package Error Exception This class is used to communicate user-level configuration and runtime errors related to package contents, package building, and similar operations. This exception should be caught at the highest level and the error message comminicated to the user.""" def __init__(self, value): self.value = value def __str__(self):
import tempfile import shutil import pprint import subprocess import glob import submodules import onlyaml import onlu from string import Template import re import json import lsb_release g_dist_codename = lsb_release.get_distro_information().get('CODENAME') logger = onlu.init_logging('onlpm') class OnlPackageError(Exception): """General Package Error Exception This class is used to communicate user-level configuration and runtime errors related to package contents, package building, and similar operations. This exception should be caught at the highest level and the error message comminicated to the user.""" def __init__(self, value): self.value = value def __str__(self):
import fcntl import subprocess import glob import submodules import StringIO from collections import Iterable import onlyaml import onlu import fileinput import crypt import string import random import re import json logger = onlu.init_logging("onlrfs") class OnlRfsError(Exception): """General Error Exception""" def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class OnlRfsSystemAdmin(object): def __init__(self, chroot): self.chroot = chroot
#!/usr/bin/python ############################################################ import argparse import sys import os import zipfile import json import apt_inst import onlu logger = onlu.init_logging("switool") class OnlSwitchImage(object): def __init__(self, fname, mode): self.fname = fname self.mode = mode self.zipfile = zipfile.ZipFile(fname, mode=mode) self.manifest = None def add(self, fname, arcname=None, compressed=True): self.zipfile.write( fname, arcname=arcname, compress_type=zipfile.ZIP_DEFLATED if compressed else zipefile.ZIP_STORED ) def add_rootfs(self, rootfs_sqsh): self.add(rootfs_sqsh) def add_manifest(self, manifest): self.add(manifest, arcname="manifest.json")
#!/usr/bin/python ############################################################ import argparse import sys import os import zipfile import json import apt_inst import onlu logger = onlu.init_logging('switool') class OnlSwitchImage(object): def __init__(self, fname, mode): self.fname = fname self.mode = mode self.zipfile = zipfile.ZipFile(fname, mode=mode) self.manifest = None def add(self, fname, arcname=None, compressed=True): self.zipfile.write(fname, arcname=arcname, compress_type = zipfile.ZIP_DEFLATED if compressed else zipefile.ZIP_STORED) def add_rootfs(self, rootfs_sqsh): self.add(rootfs_sqsh) def add_manifest(self, manifest): self.add(manifest, arcname="manifest.json") def get_manifest(self): if 'manifest.json' in self.zipfile.namelist():