Change GOPATH from gerrit.opencord.org to github.com/opencord

Ran `go fmt` which did some line reordering after this change

Conformed Makefile to template the imagename and use correct DOCKER_*
build variables

Change-Id: I52734e805698b305cf64eb9238b08f152f68ffd4
diff --git a/Dockerfile b/Dockerfile
index b57fadc..61933f8 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -31,7 +31,7 @@
  && go get -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \
  && go get -v github.com/golang/protobuf/protoc-gen-go
 
-WORKDIR /go/src/gerrit.opencord.org/voltha-bbsim
+WORKDIR /go/src/github.com/opencord/voltha-bbsim
 ENV GO111MODULE=on
 ENV GOPROXY=https://proxy.golang.org
 
@@ -69,6 +69,6 @@
 && touch /var/lib/dhcp/dhcpd.leases
 
 WORKDIR /app
-COPY --from=builder /go/src/gerrit.opencord.org/voltha-bbsim/bbsim /app/bbsim
+COPY --from=builder /go/src/github.com/opencord/voltha-bbsim/bbsim /app/bbsim
 
 CMD [ '/app/bbsim' ]
diff --git a/Makefile b/Makefile
index baadf51..48f408b 100644
--- a/Makefile
+++ b/Makefile
@@ -12,15 +12,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-BBSIM_DEPS  = $(wildcard ./*.go)
-VERSION     ?= $(shell cat ./VERSION)
-DOCKER_TAG  ?= ${VERSION}
-DOCKER_ORG  ?= voltha/
-DOCKER_REGISTRY ?= ""
+VERSION                  ?= $(shell cat ./VERSION)
+BBSIM_DEPS                = $(wildcard ./*.go)
 
 ## Docker related
+DOCKER_REGISTRY          ?= ""
+DOCKER_REPOSITORY        ?= voltha/
 DOCKER_BUILD_ARGS        ?=
 DOCKER_TAG               ?= ${VERSION}
+BBSIM_IMAGENAME          := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}voltha-bbsim:${DOCKER_TAG}
 
 ## Docker labels. Only set ref and commit date if committed
 DOCKER_LABEL_VCS_URL     ?= $(shell git remote get-url $(shell git remote))
@@ -82,10 +82,10 @@
 	        api/swagger/*.json
 
 docker-build:
-	docker build -t ${DOCKER_REGISTRY}${DOCKER_ORG}voltha-bbsim:${DOCKER_TAG} .
+	docker build ${DOCKER_BUILD_ARGS} -t ${BBSIM_IMAGENAME} .
 
 docker-save:
-	docker save ${DOCKER_REGISTRY}${DOCKER_ORG}voltha-bbsim:${DOCKER_TAG} -o voltha-bbsim_${DOCKER_TAG}.tgz
+	docker save ${BBSIM_IMAGENAME} -o voltha-bbsim_${DOCKER_TAG}.tgz
 
 docker-push:
-	docker push ${DOCKER_REGISTRY}${DOCKER_ORG}voltha-bbsim:${DOCKER_TAG}
\ No newline at end of file
+	docker push ${BBSIM_IMAGENAME}
diff --git a/bbsim.go b/bbsim.go
index dd68b82..34a61c5 100644
--- a/bbsim.go
+++ b/bbsim.go
@@ -19,8 +19,8 @@
 import (
 	"log"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/core"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/core"
 )
 
 func printBanner() {
diff --git a/core/alarms.go b/core/alarms.go
index 5c7d287..6a702ce 100644
--- a/core/alarms.go
+++ b/core/alarms.go
@@ -19,10 +19,10 @@
 import (
 	"strconv"
 
-	pb "gerrit.opencord.org/voltha-bbsim/api"
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
-	openolt "gerrit.opencord.org/voltha-bbsim/protos"
+	pb "github.com/opencord/voltha-bbsim/api"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
+	openolt "github.com/opencord/voltha-bbsim/protos"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
 )
diff --git a/core/api_handler.go b/core/api_handler.go
index eb52977..d6c051a 100644
--- a/core/api_handler.go
+++ b/core/api_handler.go
@@ -22,9 +22,9 @@
 	"strconv"
 	"time"
 
-	pb "gerrit.opencord.org/voltha-bbsim/api"
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
+	pb "github.com/opencord/voltha-bbsim/api"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
 )
diff --git a/core/api_service.go b/core/api_service.go
index 1800e9e..7475484 100644
--- a/core/api_service.go
+++ b/core/api_service.go
@@ -22,10 +22,10 @@
 	"net/http"
 	"sync"
 
-	pb "gerrit.opencord.org/voltha-bbsim/api"
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
 	"github.com/grpc-ecosystem/grpc-gateway/runtime"
+	pb "github.com/opencord/voltha-bbsim/api"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
diff --git a/core/core_server.go b/core/core_server.go
index 65b9c10..6c68706 100644
--- a/core/core_server.go
+++ b/core/core_server.go
@@ -24,15 +24,15 @@
 	"strconv"
 	"sync"
 
-	pb "gerrit.opencord.org/voltha-bbsim/api"
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
-	flowHandler "gerrit.opencord.org/voltha-bbsim/flow"
-	openolt "gerrit.opencord.org/voltha-bbsim/protos"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	"github.com/google/gopacket/pcap"
 	omci "github.com/opencord/omci-sim"
+	pb "github.com/opencord/voltha-bbsim/api"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
+	flowHandler "github.com/opencord/voltha-bbsim/flow"
+	openolt "github.com/opencord/voltha-bbsim/protos"
 	log "github.com/sirupsen/logrus"
 	"golang.org/x/sync/errgroup"
 	"google.golang.org/grpc"
diff --git a/core/dhcp.go b/core/dhcp.go
index ae890ba..b885ec5 100644
--- a/core/dhcp.go
+++ b/core/dhcp.go
@@ -26,9 +26,9 @@
 	"reflect"
 	"sync"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
+	"github.com/opencord/voltha-bbsim/common/logger"
 )
 
 // Constants for DHCP states
diff --git a/core/eapol.go b/core/eapol.go
index 7e465b3..c4dfe54 100644
--- a/core/eapol.go
+++ b/core/eapol.go
@@ -27,9 +27,9 @@
 	"sync"
 	"time"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
+	"github.com/opencord/voltha-bbsim/common/logger"
 )
 
 type clientState int
diff --git a/core/grpc_service.go b/core/grpc_service.go
index a33e21c..8e9e122 100644
--- a/core/grpc_service.go
+++ b/core/grpc_service.go
@@ -19,13 +19,13 @@
 import (
 	"net"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
-	flowHandler "gerrit.opencord.org/voltha-bbsim/flow"
-	openolt "gerrit.opencord.org/voltha-bbsim/protos"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	omci "github.com/opencord/omci-sim"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
+	flowHandler "github.com/opencord/voltha-bbsim/flow"
+	openolt "github.com/opencord/voltha-bbsim/protos"
 	log "github.com/sirupsen/logrus"
 	"golang.org/x/net/context"
 	"google.golang.org/grpc"
diff --git a/core/io_info.go b/core/io_info.go
index 36eb67f..527aaa4 100644
--- a/core/io_info.go
+++ b/core/io_info.go
@@ -20,8 +20,8 @@
 	"errors"
 	"os/exec"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
 	"github.com/google/gopacket/pcap"
+	"github.com/opencord/voltha-bbsim/common/logger"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/core/io_worker.go b/core/io_worker.go
index e0ffd10..1c090a8 100644
--- a/core/io_worker.go
+++ b/core/io_worker.go
@@ -21,11 +21,11 @@
 	"net"
 	"strconv"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
 	"github.com/google/gopacket"
 	"github.com/google/gopacket/layers"
 	"github.com/google/gopacket/pcap"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
 )
 
 // RecvWorker receives the packet and forwards to the channel
diff --git a/core/mediator.go b/core/mediator.go
index b1d33b6..66840bb 100644
--- a/core/mediator.go
+++ b/core/mediator.go
@@ -25,8 +25,8 @@
 	"strings"
 	"sync"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/core/omci.go b/core/omci.go
index 2566f2a..b0e6bbb 100644
--- a/core/omci.go
+++ b/core/omci.go
@@ -19,9 +19,9 @@
 import (
 	"context"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	openolt "gerrit.opencord.org/voltha-bbsim/protos"
 	omci "github.com/opencord/omci-sim"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	openolt "github.com/opencord/voltha-bbsim/protos"
 )
 
 // RunOmciResponder starts a go routine to process/respond to OMCI messages from VOLTHA
diff --git a/core/openolt_service.go b/core/openolt_service.go
index 489e185..fafe1c9 100644
--- a/core/openolt_service.go
+++ b/core/openolt_service.go
@@ -19,9 +19,9 @@
 import (
 	"time"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
-	openolt "gerrit.opencord.org/voltha-bbsim/protos"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
+	openolt "github.com/opencord/voltha-bbsim/protos"
 )
 
 func sendOltIndUp(stream openolt.Openolt_EnableIndicationServer, olt *device.Olt) error {
diff --git a/core/tester.go b/core/tester.go
index 605d0e4..623447d 100644
--- a/core/tester.go
+++ b/core/tester.go
@@ -24,8 +24,8 @@
 	"strconv"
 	"time"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	"gerrit.opencord.org/voltha-bbsim/device"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/device"
 )
 
 // TestManager is the structure for test manager
diff --git a/device/device_onu.go b/device/device_onu.go
index d7a5e8c..444e953 100644
--- a/device/device_onu.go
+++ b/device/device_onu.go
@@ -20,8 +20,8 @@
 	"reflect"
 	"sync"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	openolt "gerrit.opencord.org/voltha-bbsim/protos"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	openolt "github.com/opencord/voltha-bbsim/protos"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/device/utils.go b/device/utils.go
index bf5bfaa..7e0eca3 100644
--- a/device/utils.go
+++ b/device/utils.go
@@ -19,7 +19,7 @@
 import (
 	"fmt"
 
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
+	"github.com/opencord/voltha-bbsim/common/logger"
 	log "github.com/sirupsen/logrus"
 	"strconv"
 )
diff --git a/flow/flow.go b/flow/flow.go
index 8d03bb5..e86b7b7 100644
--- a/flow/flow.go
+++ b/flow/flow.go
@@ -17,8 +17,8 @@
 package flow
 
 import (
-	"gerrit.opencord.org/voltha-bbsim/common/logger"
-	openolt "gerrit.opencord.org/voltha-bbsim/protos"
+	"github.com/opencord/voltha-bbsim/common/logger"
+	openolt "github.com/opencord/voltha-bbsim/protos"
 	log "github.com/sirupsen/logrus"
 )
 
diff --git a/go.mod b/go.mod
index 40928b7..ad2890c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module gerrit.opencord.org/voltha-bbsim
+module github.com/opencord/voltha-bbsim
 
 go 1.12