Renamed SDN-IP packages and classes.
The code use to use the name 'BgpRoute' in a number of places, which is not
descriptive and doesn't map to how we talk about SDN-IP (we always call it
SDN-IP in all other documents/presentations).
Details of changes are as follows:
net.onrc.onos.apps.bgproute -> net.onrc.onos.apps.sdnip
BgpRoute.java -> SdnIp.java
IBgpRouteService.java -> ISdnIpService.java
created new package for web classes: net.onrc.onos.apps.sdnip.web
BgpRouteResource.java -> IncomingRequestResource.java
BgpRouteResourceSynch.java -> OutgoingRequestResource.java
BgpRouteWebRoutable.java -> SdnIpWebRoutable.java
Change-Id: Ie6b1cbe4e95736d4cbd53b9f4def7cc3e0b46132
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/RibUpdate.java b/src/main/java/net/onrc/onos/apps/sdnip/RibUpdate.java
new file mode 100644
index 0000000..0476979
--- /dev/null
+++ b/src/main/java/net/onrc/onos/apps/sdnip/RibUpdate.java
@@ -0,0 +1,73 @@
+package net.onrc.onos.apps.sdnip;
+
+/**
+ * Represents a route update received from BGPd. An update has an operation
+ * describing whether the update is adding a route or revoking a route. It also
+ * contains the route prefix, and {@link RibEntry} containing next hop and
+ * sequence number information for the update.
+ */
+public class RibUpdate {
+ private final Operation operation;
+ private final Prefix prefix;
+ private final RibEntry ribEntry;
+
+ /**
+ * Updates can either add new routes or revoke old routes. The
+ * {@link Operation} enum descibes which action is being taken.
+ */
+ public enum Operation {
+ /**
+ * Represents a route update. ONOS should update its route information
+ * for this prefix to the new information provided in this
+ * {@link RibUpdate}. This means either add a new prefix, or update
+ * the information for an existing prefix.
+ */
+ UPDATE,
+ /**
+ * Represents a route delete. ONOS should remove this prefix and route
+ * information from its route table.
+ */
+ DELETE
+ }
+
+ /**
+ * Class constructor, taking the operation of the update, the route prefix
+ * and the {@link RibEntry} describing the update.
+ *
+ * @param operation the operation of the update
+ * @param prefix the route prefix
+ * @param ribEntry the update entry
+ */
+ public RibUpdate(Operation operation, Prefix prefix, RibEntry ribEntry) {
+ this.operation = operation;
+ this.prefix = prefix;
+ this.ribEntry = ribEntry;
+ }
+
+ /**
+ * Gets the operation of the update.
+ *
+ * @return the operation
+ */
+ public Operation getOperation() {
+ return operation;
+ }
+
+ /**
+ * Gets the route prefix of the update.
+ *
+ * @return the prefix
+ */
+ public Prefix getPrefix() {
+ return prefix;
+ }
+
+ /**
+ * Gets the {@link RibEntry} of the update.
+ *
+ * @return the entry
+ */
+ public RibEntry getRibEntry() {
+ return ribEntry;
+ }
+}