Extend getJsonResult() to accommodate HTTP methods other than "GET".
[controller.git] / opendaylight / northbound / integrationtest / src / test / java / org / opendaylight / controller / northbound / integrationtest / NorthboundIntegrationTest.java
1 package org.opendaylight.controller.northbound.integrationtest;
2
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5 import org.osgi.framework.ServiceReference;
6 import org.osgi.framework.Bundle;
7 import javax.inject.Inject;
8 import org.junit.Assert;
9 import org.junit.Test;
10 import org.junit.Before;
11 import org.junit.runner.RunWith;
12 import org.ops4j.pax.exam.junit.PaxExam;
13 import org.osgi.framework.BundleContext;
14 import static org.junit.Assert.*;
15 import org.ops4j.pax.exam.junit.Configuration;
16 import static org.ops4j.pax.exam.CoreOptions.*;
17 import org.ops4j.pax.exam.Option;
18 import org.ops4j.pax.exam.util.PathUtils;
19 import java.io.BufferedReader;
20 import java.io.InputStream;
21 import java.io.InputStreamReader;
22 import java.net.HttpURLConnection;
23 import java.net.MalformedURLException;
24 import java.net.URL;
25 import java.net.URLConnection;
26 import java.nio.charset.Charset;
27 import java.util.Arrays;
28
29 import org.apache.commons.codec.binary.Base64;
30
31 import org.codehaus.jettison.json.JSONArray;
32 import org.codehaus.jettison.json.JSONObject;
33 import org.codehaus.jettison.json.JSONTokener;
34
35 import org.opendaylight.controller.usermanager.IUserManager;
36
37 @RunWith(PaxExam.class)
38 public class NorthboundIntegrationTest {
39     private Logger log = LoggerFactory
40             .getLogger(NorthboundIntegrationTest.class);
41     // get the OSGI bundle context
42     @Inject
43     private BundleContext bc;
44     private IUserManager users = null;
45
46     private String stateToString(int state) {
47         switch (state) {
48         case Bundle.ACTIVE:
49             return "ACTIVE";
50         case Bundle.INSTALLED:
51             return "INSTALLED";
52         case Bundle.RESOLVED:
53             return "RESOLVED";
54         case Bundle.UNINSTALLED:
55             return "UNINSTALLED";
56         default:
57             return "Not CONVERTED";
58         }
59     }
60
61     @Before
62     public void areWeReady() {
63         assertNotNull(bc);
64         boolean debugit = false;
65         Bundle b[] = bc.getBundles();
66         for (int i = 0; i < b.length; i++) {
67             int state = b[i].getState();
68             if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
69                 log.debug("Bundle:" + b[i].getSymbolicName() + " state:"
70                         + stateToString(state));
71                 debugit = true;
72             }
73         }
74         if (debugit) {
75             log.debug("Do some debugging because some bundle is "
76                     + "unresolved");
77         }
78         // Assert if true, if false we are good to go!
79         assertFalse(debugit);
80
81         ServiceReference r = bc.getServiceReference(IUserManager.class
82                 .getName());
83         if (r != null) {
84             this.users = (IUserManager) bc.getService(r);
85         }
86         // If UserManager is null, cannot login to run tests.
87         assertNotNull(this.users);
88
89     }
90
91     // static variable to pass response code from getJsonResult()
92     private static Integer httpResponseCode = null;
93
94     private String getJsonResult(String restUrl) {
95         return getJsonResult(restUrl, "GET");
96     }
97
98     private String getJsonResult(String restUrl, String method) {
99         // initialize response code to indicate error
100         httpResponseCode = 400;
101         
102         try {
103           URL url = new URL(restUrl);
104
105           this.users.getAuthorizationList();
106           this.users.authenticate("admin", "admin");
107           String authString = "admin:admin";
108           byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
109           String authStringEnc = new String(authEncBytes);
110           
111           HttpURLConnection connection = (HttpURLConnection)url.openConnection();
112           connection.setRequestMethod(method);
113           connection.setRequestProperty("Authorization", "Basic "
114                   + authStringEnc);
115           connection.setRequestProperty("Content-Type", "application/json");
116           connection.setRequestProperty("Accept", "application/json");
117
118           connection.connect();
119           connection.getContentType();
120           
121           // Response code for success should be 2xx
122           httpResponseCode = connection.getResponseCode();
123           
124           InputStream is = connection.getInputStream();
125           BufferedReader rd = new BufferedReader(new InputStreamReader(is,
126                   Charset.forName("UTF-8")));
127           StringBuilder sb = new StringBuilder();
128           int cp;
129           while ((cp = rd.read()) != -1) {
130               sb.append((char) cp);
131           }
132           is.close();
133           connection.disconnect();
134           return sb.toString();
135       } catch (Exception e) {
136           return null;
137       }
138       
139   }
140
141     @Test
142     public void testStatistics() {
143
144         System.out.println("Starting Statistics JAXB client.");
145
146         String baseURL = "http://127.0.0.1:8080/controller/nb/v2/statistics/default/";
147         try {
148             String actionTypes[] = { "drop", "loopback", "flood", "floodAll",
149                     "controller", "swPath", "hwPath", "output", "setDlSrc",
150                     "setDlDst", "setDlType", "setVlanId", "setVlanPcp",
151                     "setVlanCfi", "popVlan", "pushVlan", "setNwSrc",
152                     "setNwDst", "setNwTos", "setTpSrc", "setTpDst" };
153             String result = getJsonResult(baseURL + "flowstats");
154             JSONTokener jt = new JSONTokener(result);
155             JSONObject json = new JSONObject(jt);
156             JSONObject flowStatistics = json.getJSONObject("flowStatistics");
157             JSONObject node = flowStatistics.getJSONObject("node");
158             // test that node was returned properly
159             Assert.assertTrue(node.getInt("@id") == 0xCAFE);
160             Assert.assertTrue(node.getString("@type").equals("STUB"));
161
162             // test that flow statistics results are correct
163             JSONArray flowStats = flowStatistics.getJSONArray("flowStat");
164             for (int i = 0; i < flowStats.length(); i++) {
165
166                 JSONObject flowStat = flowStats.getJSONObject(i);
167                 Assert.assertTrue(flowStat.getInt("tableId") == 1);
168                 Assert.assertTrue(flowStat.getInt("durationSeconds") == 40);
169                 Assert.assertTrue(flowStat.getInt("durationNanoseconds") == 400);
170                 Assert.assertTrue(flowStat.getInt("packetCount") == 200);
171                 Assert.assertTrue(flowStat.getInt("byteCount") == 100);
172
173                 // test that flow information is correct
174                 JSONObject flow = flowStat.getJSONObject("flow");
175                 Assert.assertTrue(flow.getInt("priority") == 3500);
176                 Assert.assertTrue(flow.getInt("idleTimeout") == 1000);
177                 Assert.assertTrue(flow.getInt("hardTimeout") == 2000);
178                 Assert.assertTrue(flow.getInt("id") == 12345);
179
180                 JSONObject match = (flow.getJSONObject("match")
181                         .getJSONObject("matchField"));
182                 Assert.assertTrue(match.getString("type").equals("NW_DST"));
183                 Assert.assertTrue(match.getString("value").equals("1.1.1.1"));
184
185                 JSONObject act = flow.getJSONObject("actions");
186                 Assert.assertTrue(act.getString("@type").equals(actionTypes[i]));
187
188                 if (act.getString("@type").equals("output")) {
189                     JSONObject port = act.getJSONObject("port");
190                     JSONObject port_node = port.getJSONObject("node");
191                     Assert.assertTrue(port.getInt("@id") == 51966);
192                     Assert.assertTrue(port.getString("@type").equals("STUB"));
193                     Assert.assertTrue(port_node.getInt("@id") == 51966);
194                     Assert.assertTrue(port_node.getString("@type").equals(
195                             "STUB"));
196                 }
197
198                 if (act.getString("@type").equals("setDlSrc")) {
199                     byte srcMatch[] = { (byte) 5, (byte) 4, (byte) 3, (byte) 2,
200                             (byte) 1 };
201                     String src = act.getString("address");
202                     byte srcBytes[] = new byte[5];
203                     srcBytes[0] = Byte.parseByte(src.substring(0, 2));
204                     srcBytes[1] = Byte.parseByte(src.substring(2, 4));
205                     srcBytes[2] = Byte.parseByte(src.substring(4, 6));
206                     srcBytes[3] = Byte.parseByte(src.substring(6, 8));
207                     srcBytes[4] = Byte.parseByte(src.substring(8, 10));
208                     Assert.assertTrue(Arrays.equals(srcBytes, srcMatch));
209                 }
210
211                 if (act.getString("@type").equals("setDlDst")) {
212                     byte dstMatch[] = { (byte) 1, (byte) 2, (byte) 3, (byte) 4,
213                             (byte) 5 };
214                     String dst = act.getString("address");
215                     byte dstBytes[] = new byte[5];
216                     dstBytes[0] = Byte.parseByte(dst.substring(0, 2));
217                     dstBytes[1] = Byte.parseByte(dst.substring(2, 4));
218                     dstBytes[2] = Byte.parseByte(dst.substring(4, 6));
219                     dstBytes[3] = Byte.parseByte(dst.substring(6, 8));
220                     dstBytes[4] = Byte.parseByte(dst.substring(8, 10));
221                     Assert.assertTrue(Arrays.equals(dstBytes, dstMatch));
222                 }
223                 if (act.getString("@type").equals("setDlType"))
224                     Assert.assertTrue(act.getInt("dlType") == 10);
225                 if (act.getString("@type").equals("setVlanId"))
226                     Assert.assertTrue(act.getInt("vlanId") == 2);
227                 if (act.getString("@type").equals("setVlanPcp"))
228                     Assert.assertTrue(act.getInt("pcp") == 3);
229                 if (act.getString("@type").equals("setVlanCfi"))
230                     Assert.assertTrue(act.getInt("cfi") == 1);
231
232                 if (act.getString("@type").equals("setNwSrc"))
233                     Assert.assertTrue(act.getString("address")
234                             .equals("2.2.2.2"));
235                 if (act.getString("@type").equals("setNwDst"))
236                     Assert.assertTrue(act.getString("address")
237                             .equals("1.1.1.1"));
238
239                 if (act.getString("@type").equals("pushVlan")) {
240                     int head = act.getInt("VlanHeader");
241                     // parsing vlan header
242                     int id = head & 0xfff;
243                     int cfi = (head >> 12) & 0x1;
244                     int pcp = (head >> 13) & 0x7;
245                     int tag = (head >> 16) & 0xffff;
246                     Assert.assertTrue(id == 1234);
247                     Assert.assertTrue(cfi == 1);
248                     Assert.assertTrue(pcp == 1);
249                     Assert.assertTrue(tag == 0x8100);
250                 }
251                 if (act.getString("@type").equals("setNwTos"))
252                     Assert.assertTrue(act.getInt("tos") == 16);
253                 if (act.getString("@type").equals("setTpSrc"))
254                     Assert.assertTrue(act.getInt("port") == 4201);
255                 if (act.getString("@type").equals("setTpDst"))
256                     Assert.assertTrue(act.getInt("port") == 8080);
257             }
258
259             // for /controller/nb/v2/statistics/default/portstats
260             result = getJsonResult(baseURL + "portstats");
261             jt = new JSONTokener(result);
262             json = new JSONObject(jt);
263             JSONObject portStatistics = json.getJSONObject("portStatistics");
264             JSONObject node2 = portStatistics.getJSONObject("node");
265             // test that node was returned properly
266             Assert.assertTrue(node2.getInt("@id") == 0xCAFE);
267             Assert.assertTrue(node2.getString("@type").equals("STUB"));
268
269             // test that port statistic results are correct
270             JSONObject portStat = portStatistics.getJSONObject("portStat");
271             Assert.assertTrue(portStat.getInt("receivePackets") == 250);
272             Assert.assertTrue(portStat.getInt("transmitPackets") == 500);
273             Assert.assertTrue(portStat.getInt("receiveBytes") == 1000);
274             Assert.assertTrue(portStat.getInt("transmitBytes") == 5000);
275             Assert.assertTrue(portStat.getInt("receiveDrops") == 2);
276             Assert.assertTrue(portStat.getInt("transmitDrops") == 50);
277             Assert.assertTrue(portStat.getInt("receiveErrors") == 3);
278             Assert.assertTrue(portStat.getInt("transmitErrors") == 10);
279             Assert.assertTrue(portStat.getInt("receiveFrameError") == 5);
280             Assert.assertTrue(portStat.getInt("receiveOverRunError") == 6);
281             Assert.assertTrue(portStat.getInt("receiveCrcError") == 1);
282             Assert.assertTrue(portStat.getInt("collisionCount") == 4);
283
284             // String result = getJsonResult(baseURL+"flowstats/STUB/51966");
285             // System.out.println(result);
286
287         } catch (Exception e) {
288             // Got an unexpected exception
289             Assert.assertTrue(false);
290
291         }
292     }
293
294     // Configure the OSGi container
295     @Configuration
296     public Option[] config() {
297         return options(
298                 //
299                 systemProperty("logback.configurationFile").value(
300                         "file:" + PathUtils.getBaseDir()
301                                 + "/src/test/resources/logback.xml"),
302                 // To start OSGi console for inspection remotely
303                 systemProperty("osgi.console").value("2401"),
304                 systemProperty("org.eclipse.gemini.web.tomcat.config.path")
305                         .value(PathUtils.getBaseDir()
306                                 + "/src/test/resources/tomcat-server.xml"),
307
308                 // setting default level. Jersey bundles will need to be started
309                 // earlier.
310                 systemProperty("osgi.bundles.defaultStartLevel").value("4"),
311
312                 // Set the systemPackages (used by clustering)
313                 systemPackages("sun.reflect", "sun.reflect.misc", "sun.misc"),
314                 mavenBundle("javax.servlet", "servlet-api", "2.5"),
315
316                 mavenBundle("org.slf4j", "jcl-over-slf4j", "1.7.2"),
317                 mavenBundle("org.slf4j", "slf4j-api", "1.7.2"),
318                 mavenBundle("org.slf4j", "log4j-over-slf4j", "1.7.2"),
319                 mavenBundle("ch.qos.logback", "logback-core", "1.0.9"),
320                 mavenBundle("ch.qos.logback", "logback-classic", "1.0.9"),
321                 mavenBundle("org.apache.commons", "commons-lang3", "3.1"),
322                 mavenBundle("org.apache.felix",
323                         "org.apache.felix.dependencymanager", "3.1.0"),
324
325                 // the plugin stub to get data for the tests
326                 mavenBundle("org.opendaylight.controller",
327                         "protocol_plugins.stub", "0.4.0-SNAPSHOT"),
328
329                 // List all the opendaylight modules
330                 mavenBundle("org.opendaylight.controller", "security",
331                         "0.4.0-SNAPSHOT").noStart(),
332                 mavenBundle("org.opendaylight.controller", "sal",
333                         "0.5.0-SNAPSHOT"),
334                 mavenBundle("org.opendaylight.controller",
335                         "sal.implementation", "0.4.0-SNAPSHOT"),
336                 mavenBundle("org.opendaylight.controller", "statisticsmanager",
337                         "0.4.0-SNAPSHOT"),
338                 mavenBundle("org.opendaylight.controller",
339                         "statisticsmanager.implementation", "0.4.0-SNAPSHOT"),
340                 mavenBundle("org.opendaylight.controller", "containermanager",
341                         "0.4.0-SNAPSHOT"),
342                 mavenBundle("org.opendaylight.controller",
343                         "containermanager.implementation", "0.4.0-SNAPSHOT"),
344                 mavenBundle("org.opendaylight.controller",
345                         "forwardingrulesmanager", "0.4.0-SNAPSHOT"),
346                 mavenBundle("org.opendaylight.controller",
347                         "forwardingrulesmanager.implementation",
348                         "0.4.0-SNAPSHOT"),
349                 mavenBundle("org.opendaylight.controller", "arphandler",
350                         "0.4.0-SNAPSHOT"),
351                 mavenBundle("org.opendaylight.controller",
352                         "clustering.services", "0.4.0-SNAPSHOT"),
353                 mavenBundle("org.opendaylight.controller",
354                         "clustering.services-implementation", "0.4.0-SNAPSHOT"),
355                 mavenBundle("org.opendaylight.controller", "switchmanager",
356                         "0.4.0-SNAPSHOT"),
357                 mavenBundle("org.opendaylight.controller",
358                         "switchmanager.implementation", "0.4.0-SNAPSHOT"),
359                 mavenBundle("org.opendaylight.controller", "configuration",
360                         "0.4.0-SNAPSHOT"),
361                 mavenBundle("org.opendaylight.controller",
362                         "configuration.implementation", "0.4.0-SNAPSHOT"),
363                 mavenBundle("org.opendaylight.controller", "hosttracker",
364                         "0.4.0-SNAPSHOT"),
365                 mavenBundle("org.opendaylight.controller",
366                         "hosttracker.implementation", "0.4.0-SNAPSHOT"),
367                 mavenBundle("org.opendaylight.controller", "arphandler",
368                         "0.4.0-SNAPSHOT"),
369                 mavenBundle("org.opendaylight.controller",
370                         "routing.dijkstra_implementation", "0.4.0-SNAPSHOT"),
371                 mavenBundle("org.opendaylight.controller", "topologymanager",
372                         "0.4.0-SNAPSHOT"),
373
374                 mavenBundle("org.opendaylight.controller", "usermanager",
375                         "0.4.0-SNAPSHOT"),
376                 mavenBundle("org.opendaylight.controller", "logging.bridge",
377                         "0.4.0-SNAPSHOT"),
378                 mavenBundle("org.opendaylight.controller", "clustering.test",
379                         "0.4.0-SNAPSHOT"),
380
381                 mavenBundle("org.opendaylight.controller",
382                         "forwarding.staticrouting", "0.4.0-SNAPSHOT"),
383
384                 // Northbound bundles
385                 mavenBundle("org.opendaylight.controller",
386                         "commons.northbound", "0.4.0-SNAPSHOT"),
387                 mavenBundle("org.opendaylight.controller",
388                         "forwarding.staticrouting.northbound", "0.4.0-SNAPSHOT"),
389                 mavenBundle("org.opendaylight.controller",
390                         "statistics.northbound", "0.4.0-SNAPSHOT"),
391                 mavenBundle("org.opendaylight.controller",
392                         "topology.northbound", "0.4.0-SNAPSHOT"),
393                 mavenBundle("org.opendaylight.controller",
394                         "hosttracker.northbound", "0.4.0-SNAPSHOT"),
395                 mavenBundle("org.opendaylight.controller",
396                         "switchmanager.northbound", "0.4.0-SNAPSHOT"),
397                 mavenBundle("org.opendaylight.controller",
398                         "flowprogrammer.northbound", "0.4.0-SNAPSHOT"),
399                 mavenBundle("org.opendaylight.controller",
400                         "subnets.northbound", "0.4.0-SNAPSHOT"),
401
402                 mavenBundle("org.codehaus.jackson", "jackson-mapper-asl",
403                         "1.9.8"),
404                 mavenBundle("org.codehaus.jackson", "jackson-core-asl", "1.9.8"),
405                 mavenBundle("org.codehaus.jackson", "jackson-jaxrs", "1.9.8"),
406                 mavenBundle("org.codehaus.jettison", "jettison", "1.3.3"),
407
408                 mavenBundle("commons-io", "commons-io", "2.3"),
409
410                 mavenBundle("commons-fileupload", "commons-fileupload", "1.2.2"),
411
412                 mavenBundle("equinoxSDK381", "javax.servlet",
413                         "3.0.0.v201112011016"),
414                 mavenBundle("equinoxSDK381", "javax.servlet.jsp",
415                         "2.2.0.v201112011158"),
416                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.ds",
417                         "1.4.0.v20120522-1841"),
418                 mavenBundle("orbit", "javax.xml.rpc", "1.1.0.v201005080400"),
419                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.util",
420                         "1.0.400.v20120522-2049"),
421                 mavenBundle("equinoxSDK381", "org.eclipse.osgi.services",
422                         "3.3.100.v20120522-1822"),
423                 mavenBundle("equinoxSDK381", "org.apache.felix.gogo.command",
424                         "0.8.0.v201108120515"),
425                 mavenBundle("equinoxSDK381", "org.apache.felix.gogo.runtime",
426                         "0.8.0.v201108120515"),
427                 mavenBundle("equinoxSDK381", "org.apache.felix.gogo.shell",
428                         "0.8.0.v201110170705"),
429                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.cm",
430                         "1.0.400.v20120522-1841"),
431                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.console",
432                         "1.0.0.v20120522-1841"),
433                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.launcher",
434                         "1.3.0.v20120522-1813"),
435
436                 mavenBundle("geminiweb", "org.eclipse.gemini.web.core",
437                         "2.2.0.RELEASE"),
438                 mavenBundle("geminiweb", "org.eclipse.gemini.web.extender",
439                         "2.2.0.RELEASE"),
440                 mavenBundle("geminiweb", "org.eclipse.gemini.web.tomcat",
441                         "2.2.0.RELEASE"),
442                 mavenBundle("geminiweb",
443                         "org.eclipse.virgo.kernel.equinox.extensions",
444                         "3.6.0.RELEASE").noStart(),
445                 mavenBundle("geminiweb", "org.eclipse.virgo.util.common",
446                         "3.6.0.RELEASE"),
447                 mavenBundle("geminiweb", "org.eclipse.virgo.util.io",
448                         "3.6.0.RELEASE"),
449                 mavenBundle("geminiweb", "org.eclipse.virgo.util.math",
450                         "3.6.0.RELEASE"),
451                 mavenBundle("geminiweb", "org.eclipse.virgo.util.osgi",
452                         "3.6.0.RELEASE"),
453                 mavenBundle("geminiweb",
454                         "org.eclipse.virgo.util.osgi.manifest", "3.6.0.RELEASE"),
455                 mavenBundle("geminiweb",
456                         "org.eclipse.virgo.util.parser.manifest",
457                         "3.6.0.RELEASE"),
458
459                 mavenBundle("org.apache.felix",
460                         "org.apache.felix.dependencymanager", "3.1.0"),
461                 mavenBundle("org.apache.felix",
462                         "org.apache.felix.dependencymanager.shell", "3.0.1"),
463
464                 mavenBundle("com.google.code.gson", "gson", "2.1"),
465                 mavenBundle("org.jboss.spec.javax.transaction",
466                         "jboss-transaction-api_1.1_spec", "1.0.1.Final"),
467                 mavenBundle("org.apache.felix", "org.apache.felix.fileinstall",
468                         "3.1.6"),
469                 mavenBundle("org.apache.commons", "commons-lang3", "3.1"),
470                 mavenBundle("commons-codec", "commons-codec"),
471                 mavenBundle("virgomirror",
472                         "org.eclipse.jdt.core.compiler.batch",
473                         "3.8.0.I20120518-2145"),
474                 mavenBundle("eclipselink", "javax.persistence",
475                         "2.0.4.v201112161009"),
476
477                 mavenBundle("orbit", "javax.activation", "1.1.0.v201211130549"),
478                 mavenBundle("orbit", "javax.annotation", "1.1.0.v201209060031"),
479                 mavenBundle("orbit", "javax.ejb", "3.1.1.v201204261316"),
480                 mavenBundle("orbit", "javax.el", "2.2.0.v201108011116"),
481                 mavenBundle("orbit", "javax.mail.glassfish",
482                         "1.4.1.v201108011116"),
483                 mavenBundle("orbit", "javax.xml.rpc", "1.1.0.v201005080400"),
484                 mavenBundle("orbit", "org.apache.catalina",
485                         "7.0.32.v201211201336"),
486                 // these are bundle fragments that can't be started on its own
487                 mavenBundle("orbit", "org.apache.catalina.ha",
488                         "7.0.32.v201211201952").noStart(),
489                 mavenBundle("orbit", "org.apache.catalina.tribes",
490                         "7.0.32.v201211201952").noStart(),
491                 mavenBundle("orbit", "org.apache.coyote",
492                         "7.0.32.v201211201952").noStart(),
493                 mavenBundle("orbit", "org.apache.jasper",
494                         "7.0.32.v201211201952").noStart(),
495
496                 mavenBundle("orbit", "org.apache.el", "7.0.32.v201211081135"),
497                 mavenBundle("orbit", "org.apache.juli.extras",
498                         "7.0.32.v201211081135"),
499                 mavenBundle("orbit", "org.apache.tomcat.api",
500                         "7.0.32.v201211081135"),
501                 mavenBundle("orbit", "org.apache.tomcat.util",
502                         "7.0.32.v201211201952").noStart(),
503                 mavenBundle("orbit", "javax.servlet.jsp.jstl",
504                         "1.2.0.v201105211821"),
505                 mavenBundle("orbit", "javax.servlet.jsp.jstl.impl",
506                         "1.2.0.v201210211230"),
507
508                 mavenBundle("org.ops4j.pax.exam", "pax-exam-container-native"),
509                 mavenBundle("org.ops4j.pax.exam", "pax-exam-junit4"),
510                 mavenBundle("org.ops4j.pax.exam", "pax-exam-link-mvn"),
511                 mavenBundle("org.ops4j.pax.url", "pax-url-aether"),
512
513                 mavenBundle("org.springframework", "org.springframework.asm",
514                         "3.1.3.RELEASE"),
515                 mavenBundle("org.springframework", "org.springframework.aop",
516                         "3.1.3.RELEASE"),
517                 mavenBundle("org.springframework",
518                         "org.springframework.context", "3.1.3.RELEASE"),
519                 mavenBundle("org.springframework",
520                         "org.springframework.context.support", "3.1.3.RELEASE"),
521                 mavenBundle("org.springframework", "org.springframework.core",
522                         "3.1.3.RELEASE"),
523                 mavenBundle("org.springframework", "org.springframework.beans",
524                         "3.1.3.RELEASE"),
525                 mavenBundle("org.springframework",
526                         "org.springframework.expression", "3.1.3.RELEASE"),
527                 mavenBundle("org.springframework", "org.springframework.web",
528                         "3.1.3.RELEASE"),
529
530                 mavenBundle("org.aopalliance",
531                         "com.springsource.org.aopalliance", "1.0.0"),
532                 mavenBundle("org.springframework",
533                         "org.springframework.web.servlet", "3.1.3.RELEASE"),
534                 mavenBundle("org.springframework.security",
535                         "spring-security-config", "3.1.3.RELEASE"),
536                 mavenBundle("org.springframework.security",
537                         "spring-security-core", "3.1.3.RELEASE"),
538                 mavenBundle("org.springframework.security",
539                         "spring-security-web", "3.1.3.RELEASE"),
540                 mavenBundle("org.springframework.security",
541                         "spring-security-taglibs", "3.1.3.RELEASE"),
542                 mavenBundle("org.springframework",
543                         "org.springframework.transaction", "3.1.3.RELEASE"),
544
545                 mavenBundle("org.ow2.chameleon.management", "chameleon-mbeans",
546                         "1.0.0"),
547                 mavenBundle("org.opendaylight.controller.thirdparty",
548                         "net.sf.jung2", "2.0.1-SNAPSHOT"),
549                 mavenBundle("org.opendaylight.controller.thirdparty",
550                         "com.sun.jersey.jersey-servlet", "1.17-SNAPSHOT"),
551
552                 // Jersey needs to be started before the northbound application
553                 // bundles, using a lower start level
554                 mavenBundle("com.sun.jersey", "jersey-client", "1.17"),
555                 mavenBundle("com.sun.jersey", "jersey-server", "1.17")
556                         .startLevel(2),
557                 mavenBundle("com.sun.jersey", "jersey-core", "1.17")
558                         .startLevel(2),
559                 mavenBundle("com.sun.jersey", "jersey-json", "1.17")
560                         .startLevel(2), junitBundles());
561     }
562 }