Change in ovirt-engine[master]: restapi: Introduce current filter

juan.hernandez at redhat.com juan.hernandez at redhat.com
Thu Apr 30 09:03:10 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Introduce current filter
......................................................................


restapi: Introduce current filter

The RESTAPI application needs to access data associated to the current
request in several places. In order to simplify this we currently use a
"Current" class that handles a map stored in a thread local. This
"Current" class populates the map before processing each request, and
cleans it after finishing processing it. To do so it is defined as a
Resteasy interceptor. This interceptor concept isn't standard, and
doesn't work the same in newer versions of Resteasy. To be able to use
other versions of Resteasy this patch replaces the interceptor with a
plain servlet filter.

Change-Id: If46bafba6e8b58624af7eb85ae231edb0cf8dc1f
Bug-Url: https://bugzilla.redhat.com/1121327
Signed-off-by: Martin Perina <mperina at redhat.com>
---
M backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/filters/RestApiSessionMgmtFilter.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/SessionConstants.java
M backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/invocation/Current.java
A backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/invocation/CurrentFilter.java
A backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/invocation/CurrentManager.java
D backend/manager/modules/restapi/interface/common/jaxrs/src/main/java/org/ovirt/engine/api/common/invocation/MetaData.java
D backend/manager/modules/restapi/interface/common/jaxrs/src/test/java/org/ovirt/engine/api/common/invocation/CurrentTest.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/BackendApplication.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendApiResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendAssignedPermissionsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClustersResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmPoolResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BaseBackendResource.java
D backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/security/auth/SessionProcessor.java
D backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/util/SessionHelper.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendBaseTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendSubResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendApiResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendCapabilityResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendExportDomainDiskResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendExportDomainDisksResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendHostHooksResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmApplicationResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmApplicationsResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmPoolResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVmSessionsResourceTest.java
M backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml
33 files changed, 204 insertions(+), 454 deletions(-)

Approvals:
  Martin Peřina: Verified
  Juan Hernandez: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/40150
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If46bafba6e8b58624af7eb85ae231edb0cf8dc1f
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbonazzo at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list