Thomas Vachuska
Committed by Gerrit Code Review

Fixing VTN web.xml file.

Change-Id: I03c0e3fd7f47f1b4c0c84b1e30acd2e1a57ba4f2
...@@ -20,8 +20,29 @@ ...@@ -20,8 +20,29 @@
20 id="ONOS" version="2.5"> 20 id="ONOS" version="2.5">
21 <display-name>VTNRSC REST API v1.0</display-name> 21 <display-name>VTNRSC REST API v1.0</display-name>
22 22
23 + <!-- TODO: this should be uncommented
24 + <security-constraint>
25 + <web-resource-collection>
26 + <web-resource-name>Secured</web-resource-name>
27 + <url-pattern>/*</url-pattern>
28 + </web-resource-collection>
29 + <auth-constraint>
30 + <role-name>admin</role-name>
31 + </auth-constraint>
32 + </security-constraint>
33 +
34 + <security-role>
35 + <role-name>admin</role-name>
36 + </security-role>
37 +
38 + <login-config>
39 + <auth-method>BASIC</auth-method>
40 + <realm-name>karaf</realm-name>
41 + </login-config>
42 + -->
43 +
23 <servlet> 44 <servlet>
24 - <servlet-name>JAX-RS Service</servlet-name> 45 + <servlet-name>VTNRSC JAX-RS Service</servlet-name>
25 <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class> 46 <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
26 <init-param> 47 <init-param>
27 <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name> 48 <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
...@@ -30,14 +51,24 @@ ...@@ -30,14 +51,24 @@
30 <init-param> 51 <init-param>
31 <param-name>com.sun.jersey.config.property.classnames</param-name> 52 <param-name>com.sun.jersey.config.property.classnames</param-name>
32 <param-value> 53 <param-value>
54 + org.onosproject.rest.exceptions.EntityNotFoundMapper,
55 + org.onosproject.rest.exceptions.ServiceNotFoundMapper,
56 + org.onosproject.rest.exceptions.NotFoundMapper,
57 + org.onosproject.rest.exceptions.ServerErrorMapper,
58 + org.onosproject.rest.exceptions.BadRequestMapper,
59 + org.onosproject.rest.exceptions.WebApplicationExceptionMapper,
60 + org.onosproject.rest.exceptions.IllegalArgumentExceptionMapper,
61 + org.onosproject.rest.exceptions.IllegalStateExceptionMapper,
62 + org.onosproject.rest.resources.JsonBodyWriter,
63 +
33 org.onosproject.vtnweb.resources.TenantNetworkWebResource, 64 org.onosproject.vtnweb.resources.TenantNetworkWebResource,
34 org.onosproject.vtnweb.resources.SubnetWebResource, 65 org.onosproject.vtnweb.resources.SubnetWebResource,
35 - org.onosproject.vtnweb.resources.VirtualPortWebResource 66 + org.onosproject.vtnweb.resources.VirtualPortWebResource,
36 - org.onosproject.vtnweb.resources.FlowClassifierWebResource 67 + org.onosproject.vtnweb.resources.FlowClassifierWebResource,
37 - org.onosproject.vtnweb.resources.PortChainWebResource 68 + org.onosproject.vtnweb.resources.PortChainWebResource,
38 - org.onosproject.vtnweb.resources.PortPairGroupWebResource 69 + org.onosproject.vtnweb.resources.PortPairGroupWebResource,
39 - org.onosproject.vtnweb.resources.PortPairWebResource 70 + org.onosproject.vtnweb.resources.PortPairWebResource,
40 - org.onosproject.vtnweb.resources.FloatingIpWebResource 71 + org.onosproject.vtnweb.resources.FloatingIpWebResource,
41 org.onosproject.vtnweb.resources.RouterWebResource 72 org.onosproject.vtnweb.resources.RouterWebResource
42 </param-value> 73 </param-value>
43 </init-param> 74 </init-param>
...@@ -45,7 +76,7 @@ ...@@ -45,7 +76,7 @@
45 </servlet> 76 </servlet>
46 77
47 <servlet-mapping> 78 <servlet-mapping>
48 - <servlet-name>JAX-RS Service</servlet-name> 79 + <servlet-name>VTNRSC JAX-RS Service</servlet-name>
49 <url-pattern>/*</url-pattern> 80 <url-pattern>/*</url-pattern>
50 </servlet-mapping> 81 </servlet-mapping>
51 </web-app> 82 </web-app>
......