Пример #1
0
    def configure():
        polsar_location = os.path.expanduser(JBoxCfg.get("polsar_location"))

        make_sure_path_exists(polsar_location)

        JBoxPolsarDiskVol.FS_LOC = polsar_location
        JBoxPolsarDiskVol.refresh_disk_use_status()
Пример #2
0
    def configure():
        backup_location = JBoxCfg.get('backup_location')
        if backup_location is not None:
            backup_location = os.path.expanduser(backup_location)
            make_sure_path_exists(backup_location)
            JBoxVol.BACKUP_LOC = backup_location

        JBoxVol.DCKR = JBoxCfg.dckr
        JBoxVol.NOTEBOOK_WEBSOCK_PROTO = JBoxCfg.get(
            'websocket_protocol') + '://'
        JBoxVol.USER_HOME_IMG = os.path.expanduser(
            JBoxCfg.get('user_home_image'))
        JBoxVol.PKG_IMG = os.path.expanduser(JBoxCfg.get('pkg_image'))
        JBoxVol.LOCAL_TZ_OFFSET = JBoxVol.local_time_offset()
        JBoxVol.BACKUP_BUCKET = JBoxCfg.get('cloud_host.backup_bucket')

        for plugin in JBoxVol.plugins:
            assert issubclass(plugin, JBoxVol)
            plugin.configure()
            JBoxVol.log_info("Found plugin %r provides %r", plugin,
                             plugin.provides)

        if len(JBoxVol.plugins) == 0:
            JBoxVol.log_warn("No plugins found!")

        if JBoxVol.SH_DEVICE_VERSION is None:
            JBoxVol.SH_DEVICE_VERSION = create_host_mnt_command(
                'stat --format 0x%t,0x%T')
Пример #3
0
    def configure():
        pkg_location = os.path.expanduser(JBoxCfg.get('pkg_location'))
        make_sure_path_exists(pkg_location)

        JBoxDefaultPackagesVol.FS_LOC = pkg_location
        JBoxDefaultPackagesVol.LOCK = threading.Lock()
        JBoxDefaultPackagesVol.refresh_disk_use_status()
Пример #4
0
    def configure():
        pkg_location = os.path.expanduser(JBoxCfg.get('pkg_location'))
        make_sure_path_exists(pkg_location)

        JBoxDefaultPackagesVol.FS_LOC = pkg_location
        JBoxDefaultPackagesVol.LOCK = threading.Lock()
        JBoxDefaultPackagesVol.refresh_disk_use_status()
Пример #5
0
    def configure():
        backup_location = JBoxCfg.get('backup_location')
        if backup_location is not None:
            backup_location = os.path.expanduser(backup_location)
            make_sure_path_exists(backup_location)
            JBoxVol.BACKUP_LOC = backup_location

        JBoxVol.DCKR = JBoxCfg.dckr
        JBoxVol.NOTEBOOK_WEBSOCK_PROTO = JBoxCfg.get('websocket_protocol') + '://'
        JBoxVol.USER_HOME_IMG = os.path.expanduser(JBoxCfg.get('user_home_image'))
        JBoxVol.PKG_IMG = os.path.expanduser(JBoxCfg.get('pkg_image'))
        JBoxVol.LOCAL_TZ_OFFSET = JBoxVol.local_time_offset()
        JBoxVol.BACKUP_BUCKET = JBoxCfg.get('cloud_host.backup_bucket')

        for plugin in JBoxVol.plugins:
            assert issubclass(plugin, JBoxVol)
            plugin.configure()
            JBoxVol.log_info("Found plugin %r provides %r", plugin, plugin.provides)

        if len(JBoxVol.plugins) == 0:
            JBoxVol.log_warn("No plugins found!")

        if JBoxVol.SH_DEVICE_VERSION is None:
            JBoxVol.SH_DEVICE_VERSION = create_host_mnt_command('stat --format 0x%t,0x%T')
Пример #6
0
 def configure():
     cfg_location = os.path.expanduser(JBoxCfg.get('cfg_location'))
     make_sure_path_exists(cfg_location)
     JBoxDefaultConfigVol.FS_LOC = cfg_location
Пример #7
0
 def configure():
     cfg_location = os.path.expanduser(JBoxCfg.get('cfg_location'))
     make_sure_path_exists(cfg_location)
     JBoxDefaultConfigVol.FS_LOC = cfg_location