Upgrade to Atomix 3.1.0-beta3

Change-Id: Ic55798690b89db8b9e866d7ecae47d746d0e89c2
diff --git a/core/store/primitives/BUILD b/core/store/primitives/BUILD
index 0cb83ef..ea85222 100644
--- a/core/store/primitives/BUILD
+++ b/core/store/primitives/BUILD
@@ -21,6 +21,7 @@
     "iterator",
     "list",
     "lock",
+    "log",
     "map",
     "multimap",
     "multiset",
@@ -49,7 +50,7 @@
 ])
 
 # A list of all core protocol packages for dynamic class loading
-PROTOCOL_PACKAGES = ",".join(["io.atomix.primitive.partition.impl"] + ["io.atomix.protocols.{protocol},io.atomix.protocols.{protocol}.partition".format(protocol = protocol) for protocol in _protocol_package_names] + ["io.atomix.protocols.gossip"])
+PROTOCOL_PACKAGES = ",".join(["io.atomix.primitive.partition.impl"] + ["io.atomix.protocols.{protocol},io.atomix.protocols.{protocol}.partition".format(protocol = protocol) for protocol in _protocol_package_names])
 
 # A list of all additional core packages used in dynamic class loading
 CORE_PACKAGES = ",".join([
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java b/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java
index 1135fda..c46ce87 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/atomix/impl/AtomixManager.java
@@ -15,6 +15,7 @@
  */
 package org.onosproject.store.atomix.impl;
 
+import io.atomix.cluster.Node;
 import io.atomix.cluster.discovery.BootstrapDiscoveryProvider;
 import io.atomix.core.Atomix;
 import io.atomix.protocols.raft.partition.RaftPartitionGroup;
@@ -76,13 +77,15 @@
             return Atomix.builder(getClass().getClassLoader())
                 .withClusterId(metadata.getName())
                 .withMemberId(metadataService.getLocalNode().id().id())
-                .withAddress(metadataService.getLocalNode().host(), metadataService.getLocalNode().tcpPort())
+                .withHost(metadata.getLocalNode().host())
+                .withPort(metadata.getLocalNode().tcpPort())
                 .withProperty("type", "onos")
                 .withMembershipProvider(BootstrapDiscoveryProvider.builder()
                     .withNodes(metadata.getStorageNodes().stream()
-                        .map(node -> io.atomix.cluster.Node.builder()
+                        .map(node -> Node.builder()
                             .withId(node.id().id())
-                            .withAddress(node.host(), node.tcpPort())
+                            .withHost(node.host())
+                            .withPort(node.tcpPort())
                             .build())
                         .collect(Collectors.toList()))
                     .build())
@@ -101,13 +104,15 @@
             return Atomix.builder(getClass().getClassLoader())
                 .withClusterId(metadata.getName())
                 .withMemberId(metadataService.getLocalNode().id().id())
-                .withAddress(metadataService.getLocalNode().host(), metadataService.getLocalNode().tcpPort())
+                .withHost(metadata.getLocalNode().host())
+                .withPort(metadata.getLocalNode().tcpPort())
                 .withProperty("type", "onos")
                 .withMembershipProvider(BootstrapDiscoveryProvider.builder()
                     .withNodes(metadata.getControllerNodes().stream()
                         .map(node -> io.atomix.cluster.Node.builder()
                             .withId(node.id().id())
-                            .withAddress(node.host(), node.tcpPort())
+                            .withHost(node.host())
+                            .withPort(node.tcpPort())
                             .build())
                         .collect(Collectors.toList()))
                     .build())
diff --git a/lib/deps.json b/lib/deps.json
index 9d48632..f21cca0 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -112,7 +112,6 @@
     "ATOMIX": [
       "atomix",
       "atomix-cluster",
-      "atomix-gossip",
       "atomix-primary-backup",
       "atomix-primitive",
       "atomix-raft",
@@ -146,14 +145,13 @@
     "aopalliance-repackaged": "mvn:org.glassfish.hk2.external:aopalliance-repackaged:2.5.0-b42",
     "amqp-client": "mvn:com.rabbitmq:amqp-client:jar:3.6.1",
     "asm": "mvn:org.ow2.asm:asm:5.2",
-    "atomix": "mvn:io.atomix:atomix:3.1.0-beta2",
-    "atomix-cluster": "mvn:io.atomix:atomix-cluster:3.1.0-beta2",
-    "atomix-gossip": "mvn:io.atomix:atomix-gossip:3.1.0-beta2",
-    "atomix-primary-backup": "mvn:io.atomix:atomix-primary-backup:3.1.0-beta2",
-    "atomix-primitive": "mvn:io.atomix:atomix-primitive:3.1.0-beta2",
-    "atomix-raft": "mvn:io.atomix:atomix-raft:3.1.0-beta2",
-    "atomix-storage": "mvn:io.atomix:atomix-storage:3.1.0-beta2",
-    "atomix-utils": "mvn:io.atomix:atomix-utils:3.1.0-beta2",
+    "atomix": "mvn:io.atomix:atomix:3.1.0-beta3",
+    "atomix-cluster": "mvn:io.atomix:atomix-cluster:3.1.0-beta3",
+    "atomix-primary-backup": "mvn:io.atomix:atomix-primary-backup:3.1.0-beta3",
+    "atomix-primitive": "mvn:io.atomix:atomix-primitive:3.1.0-beta3",
+    "atomix-raft": "mvn:io.atomix:atomix-raft:3.1.0-beta3",
+    "atomix-storage": "mvn:io.atomix:atomix-storage:3.1.0-beta3",
+    "atomix-utils": "mvn:io.atomix:atomix-utils:3.1.0-beta3",
     "classgraph": "mvn:io.github.classgraph:classgraph:4.2.3",
     "commons-codec": "mvn:commons-codec:commons-codec:1.10",
     "commons-cli": "mvn:commons-cli:commons-cli:1.3",
diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl
index 5af5d21..494eedd 100644
--- a/tools/build/bazel/generate_workspace.bzl
+++ b/tools/build/bazel/generate_workspace.bzl
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Tue, 27 Nov 2018 19:16:26 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Tue, 27 Nov 2018 23:06:01 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION")
@@ -114,7 +114,6 @@
 ATOMIX = [
     "@atomix//jar",
     "@atomix_cluster//jar",
-    "@atomix_gossip//jar",
     "@atomix_primary_backup//jar",
     "@atomix_primitive//jar",
     "@atomix_raft//jar",
@@ -163,51 +162,45 @@
     if "atomix" not in native.existing_rules():
         java_import_external(
             name = "atomix",
-            jar_sha256 = "8a8be58c76b0facbbd065724334af8463c6bcfac8d453585bdbe070492a5226d",
+            jar_sha256 = "31a8e0be0942cb08f06c0aea638b2d8a43a7744241cbebacaa8fe189e1ef38e8",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix/3.1.0-beta2/atomix-3.1.0-beta2.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix/3.1.0-beta3/atomix-3.1.0-beta3.jar"],        )
     if "atomix_cluster" not in native.existing_rules():
         java_import_external(
             name = "atomix_cluster",
-            jar_sha256 = "cf3e14eb0ba6f8dd4dc83f78ab3349bdeb8e8c4af6116f5edde79584c86da0b1",
+            jar_sha256 = "8a14dc47b56b05fa034a0b49597b7e45bc794aa264cae19e67d5c25e8029ff6c",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-cluster/3.1.0-beta2/atomix-cluster-3.1.0-beta2.jar"],        )
-    if "atomix_gossip" not in native.existing_rules():
-        java_import_external(
-            name = "atomix_gossip",
-            jar_sha256 = "91c328892cfcf0b302f36f528a53aef653ac3ffb7d6d745a0973c914584ce856",
-            licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-gossip/3.1.0-beta2/atomix-gossip-3.1.0-beta2.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-cluster/3.1.0-beta3/atomix-cluster-3.1.0-beta3.jar"],        )
     if "atomix_primary_backup" not in native.existing_rules():
         java_import_external(
             name = "atomix_primary_backup",
-            jar_sha256 = "f565a8c26cca2f372b24e73a71726b20bf56b369839afd2311aae231a8fce10b",
+            jar_sha256 = "7e442d45b65e896c910273b09403d2f61da1a23f825f2a85bec8e2591f9850af",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-primary-backup/3.1.0-beta2/atomix-primary-backup-3.1.0-beta2.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-primary-backup/3.1.0-beta3/atomix-primary-backup-3.1.0-beta3.jar"],        )
     if "atomix_primitive" not in native.existing_rules():
         java_import_external(
             name = "atomix_primitive",
-            jar_sha256 = "996ed33aa3cfea69ae2c0eaa494bcbae3acd16aee11f04b97b576cd84c52f37b",
+            jar_sha256 = "b1a333aae7c6e86a00f01a64f5dd2fc14df05813143c91ed4cefe13447c7d12e",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-primitive/3.1.0-beta2/atomix-primitive-3.1.0-beta2.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-primitive/3.1.0-beta3/atomix-primitive-3.1.0-beta3.jar"],        )
     if "atomix_raft" not in native.existing_rules():
         java_import_external(
             name = "atomix_raft",
-            jar_sha256 = "3126cfed3d00c87f2556f77c03c520f6802e9a9ecea5eda6bdc74d64e14fb40a",
+            jar_sha256 = "c9d071b2547fc22771d0837e68eb8b843d0e0088f4c54697105f2616c22ba109",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-raft/3.1.0-beta2/atomix-raft-3.1.0-beta2.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-raft/3.1.0-beta3/atomix-raft-3.1.0-beta3.jar"],        )
     if "atomix_storage" not in native.existing_rules():
         java_import_external(
             name = "atomix_storage",
-            jar_sha256 = "3bc582c317d0799ad6da103af94a775882c1cad717d7f7f92594ab29a53c4e12",
+            jar_sha256 = "9e48f2b8d305f55cad8d3d105bd7d68aa6c040abf1aefd4b5560704e11aa8bf1",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-storage/3.1.0-beta2/atomix-storage-3.1.0-beta2.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-storage/3.1.0-beta3/atomix-storage-3.1.0-beta3.jar"],        )
     if "atomix_utils" not in native.existing_rules():
         java_import_external(
             name = "atomix_utils",
-            jar_sha256 = "1a037ee3a613c63016025ca75e85826515a7d8014f4778c06fdf320e5f378ba0",
+            jar_sha256 = "b761bcae99c0a0e6970b4192589a6d57b8da42d5a8f4443e6f1b810c3f464684",
             licenses = ["notice"],
-            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-utils/3.1.0-beta2/atomix-utils-3.1.0-beta2.jar"],        )
+            jar_urls = ["http://repo1.maven.org/maven2/io/atomix/atomix-utils/3.1.0-beta3/atomix-utils-3.1.0-beta3.jar"],        )
     if "classgraph" not in native.existing_rules():
         java_import_external(
             name = "classgraph",
@@ -1424,14 +1417,13 @@
 artifact_map["@aopalliance_repackaged//:aopalliance_repackaged"] = "mvn:org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42"
 artifact_map["@amqp_client//:amqp_client"] = "mvn:com.rabbitmq:amqp-client:jar:3.6.1"
 artifact_map["@asm//:asm"] = "mvn:org.ow2.asm:asm:jar:5.2"
-artifact_map["@atomix//:atomix"] = "mvn:io.atomix:atomix:jar:3.1.0-beta2"
-artifact_map["@atomix_cluster//:atomix_cluster"] = "mvn:io.atomix:atomix-cluster:jar:3.1.0-beta2"
-artifact_map["@atomix_gossip//:atomix_gossip"] = "mvn:io.atomix:atomix-gossip:jar:3.1.0-beta2"
-artifact_map["@atomix_primary_backup//:atomix_primary_backup"] = "mvn:io.atomix:atomix-primary-backup:jar:3.1.0-beta2"
-artifact_map["@atomix_primitive//:atomix_primitive"] = "mvn:io.atomix:atomix-primitive:jar:3.1.0-beta2"
-artifact_map["@atomix_raft//:atomix_raft"] = "mvn:io.atomix:atomix-raft:jar:3.1.0-beta2"
-artifact_map["@atomix_storage//:atomix_storage"] = "mvn:io.atomix:atomix-storage:jar:3.1.0-beta2"
-artifact_map["@atomix_utils//:atomix_utils"] = "mvn:io.atomix:atomix-utils:jar:3.1.0-beta2"
+artifact_map["@atomix//:atomix"] = "mvn:io.atomix:atomix:jar:3.1.0-beta3"
+artifact_map["@atomix_cluster//:atomix_cluster"] = "mvn:io.atomix:atomix-cluster:jar:3.1.0-beta3"
+artifact_map["@atomix_primary_backup//:atomix_primary_backup"] = "mvn:io.atomix:atomix-primary-backup:jar:3.1.0-beta3"
+artifact_map["@atomix_primitive//:atomix_primitive"] = "mvn:io.atomix:atomix-primitive:jar:3.1.0-beta3"
+artifact_map["@atomix_raft//:atomix_raft"] = "mvn:io.atomix:atomix-raft:jar:3.1.0-beta3"
+artifact_map["@atomix_storage//:atomix_storage"] = "mvn:io.atomix:atomix-storage:jar:3.1.0-beta3"
+artifact_map["@atomix_utils//:atomix_utils"] = "mvn:io.atomix:atomix-utils:jar:3.1.0-beta3"
 artifact_map["@classgraph//:classgraph"] = "mvn:io.github.classgraph:classgraph:jar:4.2.3"
 artifact_map["@commons_codec//:commons_codec"] = "mvn:commons-codec:commons-codec:jar:1.10"
 artifact_map["@commons_cli//:commons_cli"] = "mvn:commons-cli:commons-cli:jar:1.3"
diff --git a/tools/test/bin/atomix-push-bits b/tools/test/bin/atomix-push-bits
index ba35c10..b5159a9 100755
--- a/tools/test/bin/atomix-push-bits
+++ b/tools/test/bin/atomix-push-bits
@@ -26,7 +26,7 @@
 
 . $ONOS_ROOT/tools/build/envDefaults
 
-ATOMIX_VERSION=${ATOMIX_VERSION:-3.1.0-beta2}
+ATOMIX_VERSION=${ATOMIX_VERSION:-3.1.0-beta3}
 ATOMIX_MAVEN=~/.m2/repository/io/atomix/atomix-dist/$ATOMIX_VERSION/atomix-dist-$ATOMIX_VERSION.tar.gz
 ATOMIX_LOCAL=/tmp/atomix-$ATOMIX_VERSION.tar.gz
 ATOMIX_REMOTE=https://oss.sonatype.org/content/repositories/releases/io/atomix/atomix-dist/$ATOMIX_VERSION/atomix-dist-$ATOMIX_VERSION.tar.gz