Merge "ISSUE: Some changes to Authorization"
authorAndrew Kim <andrekim@cisco.com>
Fri, 5 Apr 2013 03:06:41 +0000 (03:06 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 5 Apr 2013 03:06:41 +0000 (03:06 +0000)
12 files changed:
opendaylight/protocol_plugins/openflow/src/main/java/org/opendaylight/controller/protocol_plugin/openflow/vendorextension/v6extension/V6StatsReply.java
opendaylight/routing/dijkstra_implementation/src/main/java/org/opendaylight/controller/routing/dijkstra_implementation/internal/DijkstraImplementation.java
opendaylight/routing/dijkstra_implementation/src/main/resources/OSGI-INF/component.xml
opendaylight/switchmanager/src/main/java/org/opendaylight/controller/switchmanager/Switch.java
opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java
opendaylight/web/flows/src/main/java/org/opendaylight/controller/flows/web/Flows.java
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWeb.java [moved from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWeb.java with 95% similarity]
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWebAdmin.java [moved from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWebAdmin.java with 99% similarity]
opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IDaylightWeb.java [moved from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IOneWeb.java with 94% similarity]
opendaylight/web/root/src/main/resources/WEB-INF/web.xml
opendaylight/web/root/src/main/resources/js/one.js
opendaylight/web/troubleshoot/src/main/java/org/opendaylight/controller/troubleshoot/web/Troubleshoot.java

index 1b14ab069aa6eae36bcaf5e250cbf3ebf2a9a05f..8b5662ccf1bd282a96e1bafb30ea8844b409268d 100644 (file)
@@ -23,7 +23,7 @@ import org.openflow.util.U16;
  * This Class processes the OpenFlow Vendor Extension Reply message of a Stats
  * Request. It parses the reply message and initializes fields of  V6StatsReply
  * object. Multiple instances of this class objects are created and used by 
- * ONE Controller's Troubleshooting Application.
+ * OpenDaylight's Troubleshooting Application.
  * 
  */
 
index 1fed3e1c036d53b89c2bb9ee6689128f3d937234..6f1dc3f9d707bd49016a67005ef88799349bd64f 100644 (file)
@@ -61,7 +61,7 @@ public class DijkstraImplementation implements IRouting, ITopologyManagerAware {
     private IReadService readService;
     private static final long DEFAULT_LINK_SPEED = Bandwidth.BW1Gbps;
 
-    public void setLIstenRoutingUpdates(IListenRoutingUpdates i) {
+    public void setListenRoutingUpdates(IListenRoutingUpdates i) {
         if (this.routingAware == null) {
             this.routingAware = new HashSet<IListenRoutingUpdates>();
         }
index f530768230444fa886774e79adb217744e3b25eb..4f9cdc88aea4d6765d067cf3ed7a4cc2718de6c9 100644 (file)
@@ -6,13 +6,13 @@
   <implementation class="org.opendaylight.controller.routing.dijkstra_implementation.internal.DijkstraImplementation"/>
 
   <service>
-    <provide interface="org.opendaylight.controller.sal.routing.IONERouting"/>
-    <provide interface="org.opendaylight.controller.sal.topology.IONETopologyBwAware"/>
+    <provide interface="org.opendaylight.controller.sal.routing.IRouting"/>
+    <provide interface="org.opendaylight.controller.topologymanager.ITopologyManagerAware"/>
   </service>
-  <reference name="ONERoutingAware"
-             bind="setONERoutingAware"
-             unbind="unsetONERoutingAware"
+  <reference name="IListenRoutingUpdates"
+             bind="setListenRoutingUpdates"
+             unbind="unsetRoutingUpdates"
              cardinality="0..n"
              policy="dynamic"
-             interface="org.opendaylight.controller.sal.routing.IONERoutingAware"/>
+             interface="org.opendaylight.controller.sal.routing.IListenRoutingUpdates"/>
 </scr:component>
index d13c0426195920dc4ac322e2bf65371be52aacff..afca30c3a1c89a9a1ce254e925e0cc33ae89b142 100755 (executable)
@@ -36,7 +36,7 @@ public class Switch implements Serializable {
      * As we are adding switches on per event basis in a map, we do not need a default constructor
      * This way we can keep the validations internal, in the proper constructor
     public Switch() {
-        this.swPorts = new HashSet<ONESwitchPortTuple>();
+        this.swPorts = new HashSet<SwitchPortTuple>();
         this.spanPorts = new ArrayList<Short>(2);
     }
      */
index 5be771af9636967e9e076de98bfc7b60a2895ab2..ece5959dc0256e6bdef294075161cf99d57c30cd 100644 (file)
@@ -19,7 +19,7 @@ import java.util.concurrent.ConcurrentMap;
 
 import org.codehaus.jackson.map.ObjectMapper;
 import org.opendaylight.controller.usermanager.IUserManager;
-import org.opendaylight.controller.web.IOneWeb;
+import org.opendaylight.controller.web.IDaylightWeb;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -48,7 +48,7 @@ import com.google.gson.Gson;
 
 @Controller
 @RequestMapping("/")
-public class Devices implements IOneWeb {
+public class Devices implements IDaylightWeb {
     private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER;
     private final String WEB_NAME = "Devices";
     private final String WEB_ID = "devices";
@@ -56,7 +56,7 @@ public class Devices implements IOneWeb {
     private final String containerName = GlobalConstants.DEFAULT.toString();
 
     public Devices() {
-        ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+        ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
     }
 
     @Override
index d75d14c623da8bb8c4d1331415f6988a2d8c35af..4cc35e2f92dccbfaac30e64cac28da7afb827cad 100644 (file)
@@ -29,7 +29,7 @@ import org.opendaylight.controller.switchmanager.ISwitchManager;
 import org.opendaylight.controller.switchmanager.Switch;
 import org.opendaylight.controller.switchmanager.SwitchConfig;
 import org.opendaylight.controller.usermanager.IUserManager;
-import org.opendaylight.controller.web.IOneWeb;
+import org.opendaylight.controller.web.IDaylightWeb;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -42,7 +42,7 @@ import com.google.gson.Gson;
 
 @Controller
 @RequestMapping("/")
-public class Flows implements IOneWeb {
+public class Flows implements IDaylightWeb {
        private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER;
     private static final String WEB_NAME = "Flows";
     private static final String WEB_ID = "flows";
@@ -50,7 +50,7 @@ public class Flows implements IOneWeb {
     private final String containerName = GlobalConstants.DEFAULT.toString();
 
     public Flows() {
-        ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+        ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
     }
 
     @Override
similarity index 95%
rename from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWeb.java
rename to opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWeb.java
index d1237c760e4c81add1dc3a064d34df0de14f0d0e..296a8fbbd6c684bc0c441b5b05900842d3e0c7ea 100644 (file)
@@ -29,7 +29,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 @Controller
 @RequestMapping("/")
-public class OneWeb {
+public class DaylightWeb {
     @RequestMapping(value = "")
     public String index(Model model) {
        IUserManager userManager = (IUserManager) ServiceHelper
@@ -48,15 +48,15 @@ public class OneWeb {
     @RequestMapping(value = "web.json")
     @ResponseBody
     public Map<String, Map<String, Object>> bundles() {
-        Object[] instances = ServiceHelper.getGlobalInstances(IOneWeb.class,
+        Object[] instances = ServiceHelper.getGlobalInstances(IDaylightWeb.class,
                 this, null);
         Map<String, Map<String, Object>> bundles = new HashMap<String, Map<String, Object>>();
         Map<String, Object> entry;
-        IOneWeb bundle;
+        IDaylightWeb bundle;
         String userName = SecurityContextHolder.getContext().getAuthentication().getName();
         IUserManager userManger = (IUserManager) ServiceHelper.getGlobalInstance(IUserManager.class, this);
         for (Object instance : instances) {
-            bundle = (IOneWeb) instance;
+            bundle = (IDaylightWeb) instance;
             if (userManger != null &&
                        bundle.isAuthorized(userManger.getUserLevel(userName))) {
                    entry = new HashMap<String, Object>();
similarity index 99%
rename from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/OneWebAdmin.java
rename to opendaylight/web/root/src/main/java/org/opendaylight/controller/web/DaylightWebAdmin.java
index a22d749c5cdb038f60f71fb700c1cc93a9fc5820..bc3d39aa2124136f35602f0ffbcb78eb6f3de673 100644 (file)
@@ -28,7 +28,7 @@ import com.google.gson.Gson;
 
 @Controller
 @RequestMapping("/admin")
-public class OneWebAdmin {
+public class DaylightWebAdmin {
     @RequestMapping("/users")
     @ResponseBody
     public List<UserConfig> getUsers() {
similarity index 94%
rename from opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IOneWeb.java
rename to opendaylight/web/root/src/main/java/org/opendaylight/controller/web/IDaylightWeb.java
index 72a381229742e0810f82628ee37bd2db7445d826..84bbd94bae12b41654de7c906387a005db83896e 100644 (file)
@@ -15,7 +15,7 @@ import org.opendaylight.controller.sal.authorization.UserLevel;
  *
  *
  */
-public interface IOneWeb {
+public interface IDaylightWeb {
     public String getWebName();
 
     public String getWebId();
index 6c8a5606c6df4be9ba9c4e186d365aae29956502..c763531aa04ee765e4025ba5742b267667428257 100644 (file)
@@ -34,8 +34,8 @@ http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
                <url-pattern>/*</url-pattern>
        </filter-mapping>
 
-       <display-name>Cisco ONE Controller</display-name>
-       <description>Cisco ONE Controller</description>
+       <display-name>OpenDaylight Controller</display-name>
+       <description>OpenDaylight Controller</description>
 
        <listener>
                <listener-class>org.opendaylight.controller.web.ControllerUISessionManager</listener-class>
index b996e732332af1d821b6e92c28ab6f4f6d993484..4cb633e385842f42a3244d825f9bede3683d3776 100644 (file)
@@ -284,7 +284,7 @@ one.lib.alert = function(alert) {
        INITIALIZATION
        executable JS code starts here
 */
-//ONE root page
+//OpenDaylight root page
 one.main = {};
 
 one.main.constants = {
index a4083d162454938e63ffd53632fe81eb2fe217c4..903fa7b5d13499628f3683d3fe026374e3000d1c 100644 (file)
@@ -36,7 +36,7 @@ import org.opendaylight.controller.sal.utils.NetUtils;
 import org.opendaylight.controller.sal.utils.ServiceHelper;
 import org.opendaylight.controller.statisticsmanager.IStatisticsManager;
 import org.opendaylight.controller.switchmanager.ISwitchManager;
-import org.opendaylight.controller.web.IOneWeb;
+import org.opendaylight.controller.web.IDaylightWeb;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -45,7 +45,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 
 @Controller
 @RequestMapping("/")
-public class Troubleshoot implements IOneWeb {
+public class Troubleshoot implements IDaylightWeb {
     private static final UserLevel AUTH_LEVEL = UserLevel.CONTAINERUSER;
     private final String WEB_NAME = "Troubleshoot";
     private final String WEB_ID = "troubleshoot";
@@ -53,7 +53,7 @@ public class Troubleshoot implements IOneWeb {
     private final String containerName = GlobalConstants.DEFAULT.toString();
 
     public Troubleshoot() {
-        ServiceHelper.registerGlobalService(IOneWeb.class, this, null);
+        ServiceHelper.registerGlobalService(IDaylightWeb.class, this, null);
     }
 
     @Override