Statistics Northbound Integration Test
[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
112                     .openConnection();
113             connection.setRequestMethod(method);
114             connection.setRequestProperty("Authorization", "Basic "
115                     + authStringEnc);
116             connection.setRequestProperty("Content-Type", "application/json");
117             connection.setRequestProperty("Accept", "application/json");
118
119             connection.connect();
120             connection.getContentType();
121
122             // Response code for success should be 2xx
123             httpResponseCode = connection.getResponseCode();
124
125             InputStream is = connection.getInputStream();
126             BufferedReader rd = new BufferedReader(new InputStreamReader(is,
127                     Charset.forName("UTF-8")));
128             StringBuilder sb = new StringBuilder();
129             int cp;
130             while ((cp = rd.read()) != -1) {
131                 sb.append((char) cp);
132             }
133             is.close();
134             connection.disconnect();
135             return sb.toString();
136         } catch (Exception e) {
137             return null;
138         }
139
140     }
141
142     @Test
143     public void testStatistics() {
144         String actionTypes[] = { "drop", "loopback", "flood", "floodAll",
145                 "controller", "swPath", "hwPath", "output", "setDlSrc",
146                 "setDlDst", "setDlType", "setVlanId", "setVlanPcp",
147                 "setVlanCfi", "popVlan", "pushVlan", "setNwSrc", "setNwDst",
148                 "setNwTos", "setTpSrc", "setTpDst" };
149         System.out.println("Starting Statistics JAXB client.");
150
151         String baseURL = "http://127.0.0.1:8080/controller/nb/v2/statistics/default/";
152         try {
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                 testFlowStat(flowStat, actionTypes[i]);
168
169             }
170
171             // for /controller/nb/v2/statistics/default/portstats
172             result = getJsonResult(baseURL + "portstats");
173             jt = new JSONTokener(result);
174             json = new JSONObject(jt);
175             JSONObject portStatistics = json.getJSONObject("portStatistics");
176             JSONObject node2 = portStatistics.getJSONObject("node");
177             // test that node was returned properly
178             Assert.assertTrue(node2.getInt("@id") == 0xCAFE);
179             Assert.assertTrue(node2.getString("@type").equals("STUB"));
180
181             // test that port statistic results are correct
182             JSONObject portStat = portStatistics.getJSONObject("portStat");
183             Assert.assertTrue(portStat.getInt("receivePackets") == 250);
184             Assert.assertTrue(portStat.getInt("transmitPackets") == 500);
185             Assert.assertTrue(portStat.getInt("receiveBytes") == 1000);
186             Assert.assertTrue(portStat.getInt("transmitBytes") == 5000);
187             Assert.assertTrue(portStat.getInt("receiveDrops") == 2);
188             Assert.assertTrue(portStat.getInt("transmitDrops") == 50);
189             Assert.assertTrue(portStat.getInt("receiveErrors") == 3);
190             Assert.assertTrue(portStat.getInt("transmitErrors") == 10);
191             Assert.assertTrue(portStat.getInt("receiveFrameError") == 5);
192             Assert.assertTrue(portStat.getInt("receiveOverRunError") == 6);
193             Assert.assertTrue(portStat.getInt("receiveCrcError") == 1);
194             Assert.assertTrue(portStat.getInt("collisionCount") == 4);
195
196             // test for getting one specific node's stats
197             result = getJsonResult(baseURL + "flowstats/STUB/51966");
198             jt = new JSONTokener(result);
199             json = new JSONObject(jt);
200             node = json.getJSONObject("node");
201             // test that node was returned properly
202             Assert.assertTrue(node.getInt("@id") == 0xCAFE);
203             Assert.assertTrue(node.getString("@type").equals("STUB"));
204
205             // test that flow statistics results are correct
206             flowStats = json.getJSONArray("flowStat");
207             for (int i = 0; i < flowStats.length(); i++) {
208                 JSONObject flowStat = flowStats.getJSONObject(i);
209                 testFlowStat(flowStat, actionTypes[i]);
210             }
211
212             result = getJsonResult(baseURL + "portstats/STUB/51966");
213             jt = new JSONTokener(result);
214             json = new JSONObject(jt);
215             node2 = json.getJSONObject("node");
216             // test that node was returned properly
217             Assert.assertTrue(node2.getInt("@id") == 0xCAFE);
218             Assert.assertTrue(node2.getString("@type").equals("STUB"));
219
220             // test that port statistic results are correct
221             portStat = json.getJSONObject("portStat");
222             Assert.assertTrue(portStat.getInt("receivePackets") == 250);
223             Assert.assertTrue(portStat.getInt("transmitPackets") == 500);
224             Assert.assertTrue(portStat.getInt("receiveBytes") == 1000);
225             Assert.assertTrue(portStat.getInt("transmitBytes") == 5000);
226             Assert.assertTrue(portStat.getInt("receiveDrops") == 2);
227             Assert.assertTrue(portStat.getInt("transmitDrops") == 50);
228             Assert.assertTrue(portStat.getInt("receiveErrors") == 3);
229             Assert.assertTrue(portStat.getInt("transmitErrors") == 10);
230             Assert.assertTrue(portStat.getInt("receiveFrameError") == 5);
231             Assert.assertTrue(portStat.getInt("receiveOverRunError") == 6);
232             Assert.assertTrue(portStat.getInt("receiveCrcError") == 1);
233             Assert.assertTrue(portStat.getInt("collisionCount") == 4);
234
235         } catch (Exception e) {
236             // Got an unexpected exception
237             Assert.assertTrue(false);
238
239         }
240     }
241
242     private void testFlowStat(JSONObject flowStat, String actionType) {
243         try {
244             Assert.assertTrue(flowStat.getInt("tableId") == 1);
245             Assert.assertTrue(flowStat.getInt("durationSeconds") == 40);
246             Assert.assertTrue(flowStat.getInt("durationNanoseconds") == 400);
247             Assert.assertTrue(flowStat.getInt("packetCount") == 200);
248             Assert.assertTrue(flowStat.getInt("byteCount") == 100);
249
250             // test that flow information is correct
251             JSONObject flow = flowStat.getJSONObject("flow");
252             Assert.assertTrue(flow.getInt("priority") == 3500);
253             Assert.assertTrue(flow.getInt("idleTimeout") == 1000);
254             Assert.assertTrue(flow.getInt("hardTimeout") == 2000);
255             Assert.assertTrue(flow.getInt("id") == 12345);
256
257             JSONObject match = (flow.getJSONObject("match")
258                     .getJSONObject("matchField"));
259             Assert.assertTrue(match.getString("type").equals("NW_DST"));
260             Assert.assertTrue(match.getString("value").equals("1.1.1.1"));
261
262             JSONObject act = flow.getJSONObject("actions");
263             Assert.assertTrue(act.getString("@type").equals(actionType));
264
265             if (act.getString("@type").equals("output")) {
266                 JSONObject port = act.getJSONObject("port");
267                 JSONObject port_node = port.getJSONObject("node");
268                 Assert.assertTrue(port.getInt("@id") == 51966);
269                 Assert.assertTrue(port.getString("@type").equals("STUB"));
270                 Assert.assertTrue(port_node.getInt("@id") == 51966);
271                 Assert.assertTrue(port_node.getString("@type").equals("STUB"));
272             }
273
274             if (act.getString("@type").equals("setDlSrc")) {
275                 byte srcMatch[] = { (byte) 5, (byte) 4, (byte) 3, (byte) 2,
276                         (byte) 1 };
277                 String src = act.getString("address");
278                 byte srcBytes[] = new byte[5];
279                 srcBytes[0] = Byte.parseByte(src.substring(0, 2));
280                 srcBytes[1] = Byte.parseByte(src.substring(2, 4));
281                 srcBytes[2] = Byte.parseByte(src.substring(4, 6));
282                 srcBytes[3] = Byte.parseByte(src.substring(6, 8));
283                 srcBytes[4] = Byte.parseByte(src.substring(8, 10));
284                 Assert.assertTrue(Arrays.equals(srcBytes, srcMatch));
285             }
286
287             if (act.getString("@type").equals("setDlDst")) {
288                 byte dstMatch[] = { (byte) 1, (byte) 2, (byte) 3, (byte) 4,
289                         (byte) 5 };
290                 String dst = act.getString("address");
291                 byte dstBytes[] = new byte[5];
292                 dstBytes[0] = Byte.parseByte(dst.substring(0, 2));
293                 dstBytes[1] = Byte.parseByte(dst.substring(2, 4));
294                 dstBytes[2] = Byte.parseByte(dst.substring(4, 6));
295                 dstBytes[3] = Byte.parseByte(dst.substring(6, 8));
296                 dstBytes[4] = Byte.parseByte(dst.substring(8, 10));
297                 Assert.assertTrue(Arrays.equals(dstBytes, dstMatch));
298             }
299             if (act.getString("@type").equals("setDlType"))
300                 Assert.assertTrue(act.getInt("dlType") == 10);
301             if (act.getString("@type").equals("setVlanId"))
302                 Assert.assertTrue(act.getInt("vlanId") == 2);
303             if (act.getString("@type").equals("setVlanPcp"))
304                 Assert.assertTrue(act.getInt("pcp") == 3);
305             if (act.getString("@type").equals("setVlanCfi"))
306                 Assert.assertTrue(act.getInt("cfi") == 1);
307
308             if (act.getString("@type").equals("setNwSrc"))
309                 Assert.assertTrue(act.getString("address").equals("2.2.2.2"));
310             if (act.getString("@type").equals("setNwDst"))
311                 Assert.assertTrue(act.getString("address").equals("1.1.1.1"));
312
313             if (act.getString("@type").equals("pushVlan")) {
314                 int head = act.getInt("VlanHeader");
315                 // parsing vlan header
316                 int id = head & 0xfff;
317                 int cfi = (head >> 12) & 0x1;
318                 int pcp = (head >> 13) & 0x7;
319                 int tag = (head >> 16) & 0xffff;
320                 Assert.assertTrue(id == 1234);
321                 Assert.assertTrue(cfi == 1);
322                 Assert.assertTrue(pcp == 1);
323                 Assert.assertTrue(tag == 0x8100);
324             }
325             if (act.getString("@type").equals("setNwTos"))
326                 Assert.assertTrue(act.getInt("tos") == 16);
327             if (act.getString("@type").equals("setTpSrc"))
328                 Assert.assertTrue(act.getInt("port") == 4201);
329             if (act.getString("@type").equals("setTpDst"))
330                 Assert.assertTrue(act.getInt("port") == 8080);
331         } catch (Exception e) {
332             Assert.assertTrue(false);
333         }
334     }
335
336     // Configure the OSGi container
337     @Configuration
338     public Option[] config() {
339         return options(
340                 //
341                 systemProperty("logback.configurationFile").value(
342                         "file:" + PathUtils.getBaseDir()
343                                 + "/src/test/resources/logback.xml"),
344                 // To start OSGi console for inspection remotely
345                 systemProperty("osgi.console").value("2401"),
346                 systemProperty("org.eclipse.gemini.web.tomcat.config.path")
347                         .value(PathUtils.getBaseDir()
348                                 + "/src/test/resources/tomcat-server.xml"),
349
350                 // setting default level. Jersey bundles will need to be started
351                 // earlier.
352                 systemProperty("osgi.bundles.defaultStartLevel").value("4"),
353
354                 // Set the systemPackages (used by clustering)
355                 systemPackages("sun.reflect", "sun.reflect.misc", "sun.misc"),
356                 mavenBundle("javax.servlet", "servlet-api", "2.5"),
357
358                 mavenBundle("org.slf4j", "jcl-over-slf4j", "1.7.2"),
359                 mavenBundle("org.slf4j", "slf4j-api", "1.7.2"),
360                 mavenBundle("org.slf4j", "log4j-over-slf4j", "1.7.2"),
361                 mavenBundle("ch.qos.logback", "logback-core", "1.0.9"),
362                 mavenBundle("ch.qos.logback", "logback-classic", "1.0.9"),
363                 mavenBundle("org.apache.commons", "commons-lang3", "3.1"),
364                 mavenBundle("org.apache.felix",
365                         "org.apache.felix.dependencymanager", "3.1.0"),
366
367                 // the plugin stub to get data for the tests
368                 mavenBundle("org.opendaylight.controller",
369                         "protocol_plugins.stub", "0.4.0-SNAPSHOT"),
370
371                 // List all the opendaylight modules
372                 mavenBundle("org.opendaylight.controller", "security",
373                         "0.4.0-SNAPSHOT").noStart(),
374                 mavenBundle("org.opendaylight.controller", "sal",
375                         "0.5.0-SNAPSHOT"),
376                 mavenBundle("org.opendaylight.controller",
377                         "sal.implementation", "0.4.0-SNAPSHOT"),
378                 mavenBundle("org.opendaylight.controller", "statisticsmanager",
379                         "0.4.0-SNAPSHOT"),
380                 mavenBundle("org.opendaylight.controller",
381                         "statisticsmanager.implementation", "0.4.0-SNAPSHOT"),
382                 mavenBundle("org.opendaylight.controller", "containermanager",
383                         "0.4.0-SNAPSHOT"),
384                 mavenBundle("org.opendaylight.controller",
385                         "containermanager.implementation", "0.4.0-SNAPSHOT"),
386                 mavenBundle("org.opendaylight.controller",
387                         "forwardingrulesmanager", "0.4.0-SNAPSHOT"),
388                 mavenBundle("org.opendaylight.controller",
389                         "forwardingrulesmanager.implementation",
390                         "0.4.0-SNAPSHOT"),
391                 mavenBundle("org.opendaylight.controller", "arphandler",
392                         "0.4.0-SNAPSHOT"),
393                 mavenBundle("org.opendaylight.controller",
394                         "clustering.services", "0.4.0-SNAPSHOT"),
395                 mavenBundle("org.opendaylight.controller",
396                         "clustering.services-implementation", "0.4.0-SNAPSHOT"),
397                 mavenBundle("org.opendaylight.controller", "switchmanager",
398                         "0.4.0-SNAPSHOT"),
399                 mavenBundle("org.opendaylight.controller",
400                         "switchmanager.implementation", "0.4.0-SNAPSHOT"),
401                 mavenBundle("org.opendaylight.controller", "configuration",
402                         "0.4.0-SNAPSHOT"),
403                 mavenBundle("org.opendaylight.controller",
404                         "configuration.implementation", "0.4.0-SNAPSHOT"),
405                 mavenBundle("org.opendaylight.controller", "hosttracker",
406                         "0.4.0-SNAPSHOT"),
407                 mavenBundle("org.opendaylight.controller",
408                         "hosttracker.implementation", "0.4.0-SNAPSHOT"),
409                 mavenBundle("org.opendaylight.controller", "arphandler",
410                         "0.4.0-SNAPSHOT"),
411                 mavenBundle("org.opendaylight.controller",
412                         "routing.dijkstra_implementation", "0.4.0-SNAPSHOT"),
413                 mavenBundle("org.opendaylight.controller", "topologymanager",
414                         "0.4.0-SNAPSHOT"),
415
416                 mavenBundle("org.opendaylight.controller", "usermanager",
417                         "0.4.0-SNAPSHOT"),
418                 mavenBundle("org.opendaylight.controller", "logging.bridge",
419                         "0.4.0-SNAPSHOT"),
420                 mavenBundle("org.opendaylight.controller", "clustering.test",
421                         "0.4.0-SNAPSHOT"),
422
423                 mavenBundle("org.opendaylight.controller",
424                         "forwarding.staticrouting", "0.4.0-SNAPSHOT"),
425
426                 // Northbound bundles
427                 mavenBundle("org.opendaylight.controller",
428                         "commons.northbound", "0.4.0-SNAPSHOT"),
429                 mavenBundle("org.opendaylight.controller",
430                         "forwarding.staticrouting.northbound", "0.4.0-SNAPSHOT"),
431                 mavenBundle("org.opendaylight.controller",
432                         "statistics.northbound", "0.4.0-SNAPSHOT"),
433                 mavenBundle("org.opendaylight.controller",
434                         "topology.northbound", "0.4.0-SNAPSHOT"),
435                 mavenBundle("org.opendaylight.controller",
436                         "hosttracker.northbound", "0.4.0-SNAPSHOT"),
437                 mavenBundle("org.opendaylight.controller",
438                         "switchmanager.northbound", "0.4.0-SNAPSHOT"),
439                 mavenBundle("org.opendaylight.controller",
440                         "flowprogrammer.northbound", "0.4.0-SNAPSHOT"),
441                 mavenBundle("org.opendaylight.controller",
442                         "subnets.northbound", "0.4.0-SNAPSHOT"),
443
444                 mavenBundle("org.codehaus.jackson", "jackson-mapper-asl",
445                         "1.9.8"),
446                 mavenBundle("org.codehaus.jackson", "jackson-core-asl", "1.9.8"),
447                 mavenBundle("org.codehaus.jackson", "jackson-jaxrs", "1.9.8"),
448                 mavenBundle("org.codehaus.jettison", "jettison", "1.3.3"),
449
450                 mavenBundle("commons-io", "commons-io", "2.3"),
451
452                 mavenBundle("commons-fileupload", "commons-fileupload", "1.2.2"),
453
454                 mavenBundle("equinoxSDK381", "javax.servlet",
455                         "3.0.0.v201112011016"),
456                 mavenBundle("equinoxSDK381", "javax.servlet.jsp",
457                         "2.2.0.v201112011158"),
458                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.ds",
459                         "1.4.0.v20120522-1841"),
460                 mavenBundle("orbit", "javax.xml.rpc", "1.1.0.v201005080400"),
461                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.util",
462                         "1.0.400.v20120522-2049"),
463                 mavenBundle("equinoxSDK381", "org.eclipse.osgi.services",
464                         "3.3.100.v20120522-1822"),
465                 mavenBundle("equinoxSDK381", "org.apache.felix.gogo.command",
466                         "0.8.0.v201108120515"),
467                 mavenBundle("equinoxSDK381", "org.apache.felix.gogo.runtime",
468                         "0.8.0.v201108120515"),
469                 mavenBundle("equinoxSDK381", "org.apache.felix.gogo.shell",
470                         "0.8.0.v201110170705"),
471                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.cm",
472                         "1.0.400.v20120522-1841"),
473                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.console",
474                         "1.0.0.v20120522-1841"),
475                 mavenBundle("equinoxSDK381", "org.eclipse.equinox.launcher",
476                         "1.3.0.v20120522-1813"),
477
478                 mavenBundle("geminiweb", "org.eclipse.gemini.web.core",
479                         "2.2.0.RELEASE"),
480                 mavenBundle("geminiweb", "org.eclipse.gemini.web.extender",
481                         "2.2.0.RELEASE"),
482                 mavenBundle("geminiweb", "org.eclipse.gemini.web.tomcat",
483                         "2.2.0.RELEASE"),
484                 mavenBundle("geminiweb",
485                         "org.eclipse.virgo.kernel.equinox.extensions",
486                         "3.6.0.RELEASE").noStart(),
487                 mavenBundle("geminiweb", "org.eclipse.virgo.util.common",
488                         "3.6.0.RELEASE"),
489                 mavenBundle("geminiweb", "org.eclipse.virgo.util.io",
490                         "3.6.0.RELEASE"),
491                 mavenBundle("geminiweb", "org.eclipse.virgo.util.math",
492                         "3.6.0.RELEASE"),
493                 mavenBundle("geminiweb", "org.eclipse.virgo.util.osgi",
494                         "3.6.0.RELEASE"),
495                 mavenBundle("geminiweb",
496                         "org.eclipse.virgo.util.osgi.manifest", "3.6.0.RELEASE"),
497                 mavenBundle("geminiweb",
498                         "org.eclipse.virgo.util.parser.manifest",
499                         "3.6.0.RELEASE"),
500
501                 mavenBundle("org.apache.felix",
502                         "org.apache.felix.dependencymanager", "3.1.0"),
503                 mavenBundle("org.apache.felix",
504                         "org.apache.felix.dependencymanager.shell", "3.0.1"),
505
506                 mavenBundle("com.google.code.gson", "gson", "2.1"),
507                 mavenBundle("org.jboss.spec.javax.transaction",
508                         "jboss-transaction-api_1.1_spec", "1.0.1.Final"),
509                 mavenBundle("org.apache.felix", "org.apache.felix.fileinstall",
510                         "3.1.6"),
511                 mavenBundle("org.apache.commons", "commons-lang3", "3.1"),
512                 mavenBundle("commons-codec", "commons-codec"),
513                 mavenBundle("virgomirror",
514                         "org.eclipse.jdt.core.compiler.batch",
515                         "3.8.0.I20120518-2145"),
516                 mavenBundle("eclipselink", "javax.persistence",
517                         "2.0.4.v201112161009"),
518
519                 mavenBundle("orbit", "javax.activation", "1.1.0.v201211130549"),
520                 mavenBundle("orbit", "javax.annotation", "1.1.0.v201209060031"),
521                 mavenBundle("orbit", "javax.ejb", "3.1.1.v201204261316"),
522                 mavenBundle("orbit", "javax.el", "2.2.0.v201108011116"),
523                 mavenBundle("orbit", "javax.mail.glassfish",
524                         "1.4.1.v201108011116"),
525                 mavenBundle("orbit", "javax.xml.rpc", "1.1.0.v201005080400"),
526                 mavenBundle("orbit", "org.apache.catalina",
527                         "7.0.32.v201211201336"),
528                 // these are bundle fragments that can't be started on its own
529                 mavenBundle("orbit", "org.apache.catalina.ha",
530                         "7.0.32.v201211201952").noStart(),
531                 mavenBundle("orbit", "org.apache.catalina.tribes",
532                         "7.0.32.v201211201952").noStart(),
533                 mavenBundle("orbit", "org.apache.coyote",
534                         "7.0.32.v201211201952").noStart(),
535                 mavenBundle("orbit", "org.apache.jasper",
536                         "7.0.32.v201211201952").noStart(),
537
538                 mavenBundle("orbit", "org.apache.el", "7.0.32.v201211081135"),
539                 mavenBundle("orbit", "org.apache.juli.extras",
540                         "7.0.32.v201211081135"),
541                 mavenBundle("orbit", "org.apache.tomcat.api",
542                         "7.0.32.v201211081135"),
543                 mavenBundle("orbit", "org.apache.tomcat.util",
544                         "7.0.32.v201211201952").noStart(),
545                 mavenBundle("orbit", "javax.servlet.jsp.jstl",
546                         "1.2.0.v201105211821"),
547                 mavenBundle("orbit", "javax.servlet.jsp.jstl.impl",
548                         "1.2.0.v201210211230"),
549
550                 mavenBundle("org.ops4j.pax.exam", "pax-exam-container-native"),
551                 mavenBundle("org.ops4j.pax.exam", "pax-exam-junit4"),
552                 mavenBundle("org.ops4j.pax.exam", "pax-exam-link-mvn"),
553                 mavenBundle("org.ops4j.pax.url", "pax-url-aether"),
554
555                 mavenBundle("org.springframework", "org.springframework.asm",
556                         "3.1.3.RELEASE"),
557                 mavenBundle("org.springframework", "org.springframework.aop",
558                         "3.1.3.RELEASE"),
559                 mavenBundle("org.springframework",
560                         "org.springframework.context", "3.1.3.RELEASE"),
561                 mavenBundle("org.springframework",
562                         "org.springframework.context.support", "3.1.3.RELEASE"),
563                 mavenBundle("org.springframework", "org.springframework.core",
564                         "3.1.3.RELEASE"),
565                 mavenBundle("org.springframework", "org.springframework.beans",
566                         "3.1.3.RELEASE"),
567                 mavenBundle("org.springframework",
568                         "org.springframework.expression", "3.1.3.RELEASE"),
569                 mavenBundle("org.springframework", "org.springframework.web",
570                         "3.1.3.RELEASE"),
571
572                 mavenBundle("org.aopalliance",
573                         "com.springsource.org.aopalliance", "1.0.0"),
574                 mavenBundle("org.springframework",
575                         "org.springframework.web.servlet", "3.1.3.RELEASE"),
576                 mavenBundle("org.springframework.security",
577                         "spring-security-config", "3.1.3.RELEASE"),
578                 mavenBundle("org.springframework.security",
579                         "spring-security-core", "3.1.3.RELEASE"),
580                 mavenBundle("org.springframework.security",
581                         "spring-security-web", "3.1.3.RELEASE"),
582                 mavenBundle("org.springframework.security",
583                         "spring-security-taglibs", "3.1.3.RELEASE"),
584                 mavenBundle("org.springframework",
585                         "org.springframework.transaction", "3.1.3.RELEASE"),
586
587                 mavenBundle("org.ow2.chameleon.management", "chameleon-mbeans",
588                         "1.0.0"),
589                 mavenBundle("org.opendaylight.controller.thirdparty",
590                         "net.sf.jung2", "2.0.1-SNAPSHOT"),
591                 mavenBundle("org.opendaylight.controller.thirdparty",
592                         "com.sun.jersey.jersey-servlet", "1.17-SNAPSHOT"),
593
594                 // Jersey needs to be started before the northbound application
595                 // bundles, using a lower start level
596                 mavenBundle("com.sun.jersey", "jersey-client", "1.17"),
597                 mavenBundle("com.sun.jersey", "jersey-server", "1.17")
598                         .startLevel(2),
599                 mavenBundle("com.sun.jersey", "jersey-core", "1.17")
600                         .startLevel(2),
601                 mavenBundle("com.sun.jersey", "jersey-json", "1.17")
602                         .startLevel(2), junitBundles());
603     }
604 }