def do_replication_failover(cs, args): """Failover a replication.""" replication = cs.replications.failover(args.replication_id) utils.print_dict(replication.to_dict())
def do_replication_reverse(cs, args): """Reverse a replication.""" replication = cs.replications.reverse(args.replication_id) utils.print_dict(replication.to_dict())
def do_backup_restore(cs, args): """Restore backup.""" backup = cs.backups.restore(args.backup_id, args.volume_id) utils.print_dict(backup.to_dict())
def do_replication_disable(cs, args): """Disable a replication.""" replication = cs.replications.disable(args.replication_id) utils.print_dict(replication.to_dict())
def do_replication_create(cs, args): """Create a replication.""" replication = cs.replications.create(args.name, args.master_volume, args.slave_volume, args.description) utils.print_dict(replication.to_dict())
def do_backup_show(cs, args): """Get backup.""" backup = cs.backups.get(args.backup_id) utils.print_dict(backup.to_dict())
def do_snapshot_show(cs, args): """Get snapshot.""" snapshot = cs.snapshots.get(args.snapshot_id) utils.print_dict(snapshot.to_dict())
def do_initialize_connection(cs, args): """Initialize volume attachment.""" connection_info = cs.volumes.initialize_connection(args.volume_id) utils.print_dict(connection_info.to_dict())
def do_replicate_reverse(cs, args): """Reverse volume's replicate.""" volume = cs.replicates.reverse(args.volume_id) utils.print_dict(volume.to_dict())
def do_snapshot_create(cs, args): """Create snapshot.""" snapshot = cs.snapshots.create(args.volume_id, args.name, args.description) utils.print_dict(snapshot.to_dict())
def do_replicate_failover(cs, args): """Failover volume's replicate.""" volume = cs.replicates.failover(args.volume_id) utils.print_dict(volume.to_dict())
def do_replicate_disable(cs, args): """Disable volume's replicate.""" volume = cs.replicates.disable(args.volume_id) utils.print_dict(volume.to_dict())
def do_replicate_create(cs, args): """Create volume's replicate.""" volume = cs.replicates.create(args.volume_id, args.mode, args.peer_volume) utils.print_dict(volume.to_dict())
def do_replication_show(cs, args): """Get a replication.""" replication = cs.replications.get(args.replication_id) utils.print_dict(replication.to_dict())
def do_backup_create(cs, args): """Create backup.""" backup = cs.backups.create(args.volume_id, args.name, args.description) utils.print_dict(backup.to_dict())
def do_get(cs, args): """Get a volume.""" volume = cs.volumes.get(args.volume_id) utils.print_dict(volume.to_dict())
def do_disable_sg(cs, args): """Disable volume's SG.""" volume = cs.volumes.disable(args.volume_id) utils.print_dict(volume.to_dict())