X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fswitchmanager%2Fapi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fswitchmanager%2FISwitchManager.java;h=8815e5e8c08a1b2f52ddabdcf9c6a28363b79419;hb=33ea0032f0837333a9181dd7556faa3266155080;hp=ee2c2c20398cf2c5deefa4b0b03bdceecde56fbb;hpb=fab5707429f1232b70ad1046a2c7abd854e74f72;p=controller.git diff --git a/opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/ISwitchManager.java b/opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/ISwitchManager.java index ee2c2c2039..8815e5e8c0 100644 --- a/opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/ISwitchManager.java +++ b/opendaylight/switchmanager/api/src/main/java/org/opendaylight/controller/switchmanager/ISwitchManager.java @@ -31,7 +31,7 @@ public interface ISwitchManager { * Add a subnet configuration * * @param configObject refer to {@link Open Declaration org.opendaylight.controller.switchmanager.SubnetConfig} - * @return "Success" or failure reason + * @return the Status object representing the result of the request */ public Status addSubnet(SubnetConfig configObject); @@ -39,10 +39,18 @@ public interface ISwitchManager { * Remove a subnet configuration * * @param configObject refer to {@link Open Declaration org.opendaylight.controller.switchmanager.SubnetConfig} - * @return "Success" or failure reason + * @return the Status object representing the result of the request */ public Status removeSubnet(SubnetConfig configObject); + /** + * Modify a subnet configuration + * + * @param configObject refer to {@link Open Declaration org.opendaylight.controller.switchmanager.SubnetConfig} + * @return the Status object representing the result of the request + */ + public Status modifySubnet(SubnetConfig configObject); + /** * Remove a subnet configuration given the name * @@ -163,20 +171,20 @@ public interface ISwitchManager { /** * Add node connectors to a subnet * - * @param name The subnet config name - * @param nodeConnectors nodePorts string specified by {@link Open Declaration org.opendaylight.controller.switchmanager.SubnetConfig} - * @return "Success" or failure reason + * @param name The configured subnet name + * @param nodeConnectors list of string each representing a node connector as specified by {@link Open Declaration org.opendaylight.controller.sal.core.NodeConnector} + * @return The Status object indicating the result of this request */ - public Status addPortsToSubnet(String name, String nodeConnectors); + public Status addPortsToSubnet(String name, List nodeConnectors); /** * Remove node connectors from a subnet * - * @param name the subnet config name - * @param nodeConnectors nodePorts string specified by {@link Open Declaration org.opendaylight.controller.switchmanager.SubnetConfig} - * @return "Success" or failure reason + * @param name the configured subnet name + * @param nodeConnectors list of string each representing a node connector as specified by {@link Open Declaration org.opendaylight.controller.sal.core.NodeConnector} + * @return The Status object indicating the result of this request */ - public Status removePortsFromSubnet(String name, String nodeConnectors); + public Status removePortsFromSubnet(String name, List nodeConnectors); /** * Return the set of all the nodes @@ -327,6 +335,14 @@ public interface ISwitchManager { */ public Boolean isNodeConnectorEnabled(NodeConnector nodeConnector); + /** + * Test whether the given node connector exists. + * + * @param nc {@link org.opendaylight.controller.sal.core.NodeConnector} + * @return True if exists, false otherwise. + */ + public boolean doesNodeConnectorExist(NodeConnector nc); + /** * Return controller MAC address * @@ -343,29 +359,19 @@ public interface ISwitchManager { public byte[] getNodeMAC(Node node); /** - * Return true if the host Refresh procedure (by sending ARP request probes - * to known hosts) is enabled. By default, the procedure is enabled. This can - * be overwritten by OSFI CLI "hostRefresh off". - * - * @return true if it is enabled; false if it's disabled. - */ - public boolean isHostRefreshEnabled(); - - /** - * Return host refresh retry count + * Create a Name/Tier/Bandwidth Property object based on given property name + * and value. Other property types are not supported yet. * - * @return host refresh retry count + * @param propName + * Name of the Property specified by + * {@link org.opendaylight.controller.sal.core.Property} and its + * extended classes + * @param propValue + * Value of the Property specified by + * {@link org.opendaylight.controller.sal.core.Property} and its + * extended classes + * @return {@link org.opendaylight.controller.sal.core.Property} */ - public int getHostRetryCount(); - - /** - * Create a Name/Tier/Bandwidth Property object based on given property - * name and value. Other property types are not supported yet. - * - * @param propName Name of the Property specified by {@link org.opendaylight.controller.sal.core.Property} and its extended classes - * @param propValue Value of the Property specified by {@link org.opendaylight.controller.sal.core.Property} and its extended classes - * @return {@link org.opendaylight.controller.sal.core.Property} - */ public Property createProperty(String propName, String propValue); /** @@ -379,4 +385,44 @@ public interface ISwitchManager { */ @Deprecated public String getNodeDescription(Node node); + + /** + * Return all the properties of the controller + * + * @return map of {@link org.opendaylight.controller.sal.core.Property} such + * as {@link org.opendaylight.controller.sal.core.Description} + * and/or {@link org.opendaylight.controller.sal.core.Tier} etc. + */ + public Map getControllerProperties(); + + /** + * Return a specific property of the controller given the property name + * + * @param propName + * the property name specified by + * {@link org.opendaylight.controller.sal.core.Property} and its + * extended classes + * @return {@link org.opendaylight.controller.sal.core.Property} + */ + public Property getControllerProperty(String propertyName); + + /** + * Set a specific property of the controller + * + * @param property + * {@link org.opendaylight.controller.sal.core.Property} + * @return + */ + public Status setControllerProperty(Property property); + + /** + * Remove a property of a node + * + * @param propertyName + * the property name specified by + * {@link org.opendaylight.controller.sal.core.Property} and its + * extended classes + * @return success or failed reason + */ + public Status removeControllerProperty(String propertyName); }