private Response copy(Action action) { GlusterHookManageParameters params = new GlusterHookManageParameters(guid); if (action.isSetHost()) { validateParameters(action.getHost(), "id|name"); Guid hostId = getHostId(action); params.setSourceServerId(hostId); } return doAction(ActionType.UpdateGlusterHook, params, action); }
@Override public Response migrate(Action action) { boolean forceMigration = action.isSetForce() ? action.isForce() : false; if (!action.isSetHost()) { return doAction(ActionType.MigrateVm, new MigrateVmParameters(forceMigration, guid, getTargetClusterId(action)), action); } else { return doAction(ActionType.MigrateVmToServer, new MigrateVmToServerParameters(forceMigration, guid, getHostId(action), getTargetClusterId(action)), action); } }
if (action.isSetHost()) { if (action.getHost().isSetOverrideIptables()) { params.setOverrideFirewall(action.getHost().isOverrideIptables());
to.setGracePeriod(adaptOut(from.getGracePeriod())); if (from.isSetHost()) { to.setHost(adaptOut(from.getHost()));