* Authentication realm : <b>opendaylight</b><br>
* Transport : <b>HTTP and HTTPS</b><br>
* <br>
- * HTTPS Authentication is disabled by default. Administrator can enable it in
- * tomcat-server.xml after adding a proper keystore / SSL certificate from a
- * trusted authority.<br>
- * More info :
- * http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html#Configuration
+ * HTTPS Authentication is disabled by default.
*
*/
@Path("/")
@Context
public void setSecurityContext(SecurityContext context) {
- username = context.getUserPrincipal().getName();
+ if (context != null && context.getUserPrincipal() != null) username = context.getUserPrincipal().getName();
}
protected String getUserName() {
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/flow
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "flowStatistics": [
* {
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
* <flowStatistics>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/flow/node/OF/00:00:00:00:00:00:00:01
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "node": {
* "id":"00:00:00:00:00:00:00:01",
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <nodeFlowStatistics>
* <node>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/port
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "portStatistics": [
* {
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
* <portStatistics>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/port/node/OF/00:00:00:00:00:00:00:01
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "node": {
* "id":"00:00:00:00:00:00:00:01",
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <nodePortStatistics>
* <node>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/table
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "tableStatistics": [
* {
* },
* "activeCount": "11",
* "lookupCount": "816",
- * "matchedCount": "220"
+ * "matchedCount": "220",
+ * "maximumEntries": "1000"
* },
* {
* ...another table
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <list>
* <tableStatistics>
* <activeCount>12</activeCount>
* <lookupCount>10935</lookupCount>
* <matchedCount>10084</matchedCount>
+ * <maximumEntries>1000</maximumEntries>
* </tableStatistic>
* <tableStatistic>
* <nodeTable>
* <activeCount>0</activeCount>
* <lookupCount>0</lookupCount>
* <matchedCount>0</matchedCount>
+ * <maximumEntries>0</maximumEntries>
* </tableStatistic>
* <tableStatistic>
* <nodeTable>
* <activeCount>0</activeCount>
* <lookupCount>0</lookupCount>
* <matchedCount>0</matchedCount>
+ * <maximumEntries>0</maximumEntries>
* </tableStatistic>
* </tableStatistics>
* <tableStatistics>
* Request URL:
* http://localhost:8080/controller/nb/v2/statistics/default/table/node/OF/00:00:00:00:00:00:00:01
*
- * Response in JSON:
+ * Response body in JSON:
* {
* "node": {
* "id":"00:00:00:00:00:00:00:01",
* },
* "activeCount": "12",
* "lookupCount": "11382",
- * "matchedCount": "10524"
+ * "matchedCount": "10524",
+ * "maximumEntries": "1000"
* },
* {
* "nodeTable": {
* },
* "activeCount": "0",
* "lookupCount": "0",
- * "matchedCount": "0"
+ * "matchedCount": "0",
+ * "maximumEntries": "0"
* }
* ]
* }
*
- * Response in XML:
+ * Response body in XML:
* <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
* <nodeTableStatistics>
* <node>
* <activeCount>12</activeCount>
* <lookupCount>10935</lookupCount>
* <matchedCount>10084</matchedCount>
+ * <maximumEntries>1000</maximumEntries>
* </tableStatistic>
* <tableStatistic>
* <nodeTable>
* <activeCount>0</activeCount>
* <lookupCount>0</lookupCount>
* <matchedCount>0</matchedCount>
+ * <maximumEntries>0</maximumEntries>
* </tableStatistic>
* <tableStatistic>
* <nodeTable>
* <activeCount>0</activeCount>
* <lookupCount>0</lookupCount>
* <matchedCount>0</matchedCount>
+ * <maximumEntries>0</maximumEntries>
* </tableStatistic>
* </nodeTableStatistics>
*