public static BackupStorageZoneRefInventory valueOf(BackupStorageZoneRefVO vo) { BackupStorageZoneRefInventory inv = new BackupStorageZoneRefInventory(); inv.setBackupStorageUuid(vo.getBackupStorageUuid()); inv.setCreateDate(vo.getCreateDate()); inv.setId(vo.getId()); inv.setLastOpDate(vo.getLastOpDate()); inv.setZoneUuid(vo.getZoneUuid()); return inv; }
public static APIChangeBackupStorageStateMsg __example__() { APIChangeBackupStorageStateMsg msg = new APIChangeBackupStorageStateMsg(); msg.setUuid(uuid()); msg.setStateEvent(BackupStorageStateEvent.disable.toString()); return msg; }
protected BackupStorageVO updateBackupStorage(APIUpdateBackupStorageMsg msg) { boolean update = false; if (msg.getName() != null) { self.setName(msg.getName()); update = true; } if (msg.getDescription() != null) { self.setDescription(msg.getDescription()); update = true; } return update ? self : null; }
protected void handle(final CheckInstallPathOnBSMsg msg) { CheckInstallPathOnBSReply reply = new CheckInstallPathOnBSReply(); Long trashId = trash.getTrashId(self.getUuid(), msg.getInstallPath()); if (trashId != null) { StorageTrashSpec spec = trash.getTrash(self.getUuid(), trashId); reply.setResourceUuid(spec.getResourceUuid()); reply.setTrashId(trashId); } bus.reply(msg, reply); }
@Override public String call(BackupStorageInventory arg) { return arg.getUuid(); } });
public static APIGetBackupStorageCapacityReply __example__() { APIGetBackupStorageCapacityReply reply = new APIGetBackupStorageCapacityReply(); reply.setTotalCapacity(1024L * 1024L * 1024L); reply.setAvailableCapacity(924L * 1024L * 1024L); return reply; }
public static APIExportImageFromBackupStorageMsg __example__() { APIExportImageFromBackupStorageMsg msg = new APIExportImageFromBackupStorageMsg(); msg.setBackupStorageUuid(uuid()); msg.setImageUuid(uuid()); return msg; }
public static APIDeleteExportedImageFromBackupStorageMsg __example__() { APIDeleteExportedImageFromBackupStorageMsg msg = new APIDeleteExportedImageFromBackupStorageMsg(); msg.setBackupStorageUuid(uuid()); msg.setImageUuid(uuid()); return msg; }
public static APIDetachBackupStorageFromZoneMsg __example__() { APIDetachBackupStorageFromZoneMsg msg = new APIDetachBackupStorageFromZoneMsg(); msg.setBackupStorageUuid(uuid()); msg.setZoneUuid(uuid()); return msg; }
public static APIAttachBackupStorageToZoneMsg __example__() { APIAttachBackupStorageToZoneMsg msg = new APIAttachBackupStorageToZoneMsg(); msg.setBackupStorageUuid(uuid()); msg.setZoneUuid(uuid()); return msg; }
@Override public String call(BackupStorageType arg) { return arg.toString(); } });
public static APIGetTrashOnBackupStorageMsg __example__() { APIGetTrashOnBackupStorageMsg msg = new APIGetTrashOnBackupStorageMsg(); msg.setUuid(uuid()); return msg; } }
public static APICleanUpTrashOnBackupStorageMsg __example__() { APICleanUpTrashOnBackupStorageMsg msg = new APICleanUpTrashOnBackupStorageMsg(); msg.setUuid(uuid()); return msg; } }
public static APIDeleteBackupStorageMsg __example__() { APIDeleteBackupStorageMsg msg = new APIDeleteBackupStorageMsg(); msg.setUuid(uuid()); return msg; }
@Override public void run(BackupStorageChangeStateExtensionPoint arg) { arg.afterChangeSecondaryStorageState(inv, evt, preState); } });
@Override public void run(BackupStorageDetachExtensionPoint arg) { arg.afterDetachBackupStorage(inv, zoneUuid); } });
@Override public void run(BackupStorageAttachExtensionPoint arg) { arg.failToAttachBackupStorage(inv, zoneUuid); } });
@Override public void run(BackupStorageChangeStateExtensionPoint arg) { arg.beforeChangeSecondaryStorageState(inv, evt, next); } });
@Override public void run(BackupStorageAttachExtensionPoint arg) { arg.afterAttachBackupStorage(inv, zoneUuid); } });
@Override public void run(BackupStorageDetachExtensionPoint arg) { arg.beforeDetachBackupStorage(inv, zoneUuid); } });