Example #1
0
 def configure_host_commands():
     if EBSVol.SH_LIST_DIR is None:
         EBSVol.SH_LIST_DIR = create_host_mnt_command("ls -la")
     if EBSVol.SH_MOUNT is None:
         EBSVol.SH_MOUNT = create_host_mnt_command("mount")
     if EBSVol.SH_UMOUNT is None:
         EBSVol.SH_UMOUNT = create_host_mnt_command("umount")
Example #2
0
 def configure_host_commands():
     if EBSVol.SH_LIST_DIR is None:
         EBSVol.SH_LIST_DIR = create_host_mnt_command("ls -la")
     if EBSVol.SH_MOUNT is None:
         EBSVol.SH_MOUNT = create_host_mnt_command("mount")
     if EBSVol.SH_UMOUNT is None:
         EBSVol.SH_UMOUNT = create_host_mnt_command("umount")
Example #3
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')
Example #4
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')