def configure(dckr, cfg): cloud_cfg = cfg['cloud_host'] backup_location = os.path.expanduser(cfg['backup_location']) user_home_img = os.path.expanduser(cfg['user_home_image']) mnt_location = os.path.expanduser(cfg['mnt_location']) backup_bucket = cloud_cfg['backup_bucket'] num_disks_max = cfg["numdisksmax"] make_sure_path_exists(backup_location) JBoxVol.configure_base(dckr, user_home_img, backup_location, backup_bucket=backup_bucket) JBoxLoopbackVol.configure(cfg['disk_limit'], mnt_location, num_disks_max) if cloud_cfg['ebs']: VolMgr.HAS_EBS = True ebs_mnt_location = os.path.expanduser(cloud_cfg['ebs_mnt_location']) JBoxEBSVol.configure(1000000000, ebs_mnt_location, num_disks_max, cloud_cfg['ebs_template'])
def configure(dckr, cfg): cloud_cfg = cfg['cloud_host'] backup_location = os.path.expanduser(cfg['backup_location']) user_home_img = os.path.expanduser(cfg['user_home_image']) wsock_proto = cfg['websocket_protocol'] mnt_location = os.path.expanduser(cfg['mnt_location']) backup_bucket = cloud_cfg['backup_bucket'] num_disks_max = cfg["numdisksmax"] make_sure_path_exists(backup_location) JBoxVol.configure_base(dckr, wsock_proto, user_home_img, backup_location, backup_bucket=backup_bucket) JBoxLoopbackVol.configure(cfg['disk_limit'], mnt_location, num_disks_max) if cloud_cfg['ebs']: VolMgr.HAS_EBS = True ebs_mnt_location = os.path.expanduser( cloud_cfg['ebs_mnt_location']) JBoxEBSVol.configure(1, ebs_mnt_location, num_disks_max, cloud_cfg['ebs_template'])