VOL-291 : PON simulator refactoring for cluster integration

- Added ponsim build target in Makefile
- Added new option to vcore to select comm type with ponsim
- Modified all proto files to include destination go package

Amendments:

- Clean up based on review comments
- Properly close GRPC connections in ponsim_olt adapter
- Added voltha namespace to some k8s templates

Change-Id: I2f349fa7b3550a8a8cc8fc676cc896f33fbb9372
diff --git a/ponsim/v2/core/xponsim_device.go b/ponsim/v2/core/xponsim_device.go
new file mode 100644
index 0000000..aa7d64a
--- /dev/null
+++ b/ponsim/v2/core/xponsim_device.go
@@ -0,0 +1,215 @@
+package core
+
+import (
+	"context"
+	"github.com/opencord/voltha/ponsim/v2/common"
+	"github.com/opencord/voltha/protos/go/bbf_fiber"
+	"github.com/opencord/voltha/protos/go/voltha"
+	"github.com/sirupsen/logrus"
+)
+
+type XPonSimDevice struct {
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) Start(ctx context.Context) {
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) Stop(ctx context.Context) {
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) CreateInterface(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("create-interface-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) UpdateInterface(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("update-interface-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) RemoveInterface(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("remove-interface-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) CreateTcont(ctx context.Context,
+	config *bbf_fiber.TcontsConfigData,
+	profile *bbf_fiber.TrafficDescriptorProfileData,
+) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":                                ctx,
+		"device":                                 d,
+		"tcont_config_data":                      config,
+		"traffic_descriptor_profile_config_data": profile,
+	}).Info("create-tcont-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) UpdateTcont(
+	ctx context.Context,
+	config *bbf_fiber.TcontsConfigData,
+	profile *bbf_fiber.TrafficDescriptorProfileData,
+) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":                                ctx,
+		"device":                                 d,
+		"tcont_config_data":                      config,
+		"traffic_descriptor_profile_config_data": profile,
+	}).Info("update-tcont-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) RemoveTcont(
+	ctx context.Context,
+	config *bbf_fiber.TcontsConfigData,
+	profile *bbf_fiber.TrafficDescriptorProfileData,
+) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":                                ctx,
+		"device":                                 d,
+		"tcont_config_data":                      config,
+		"traffic_descriptor_profile_config_data": profile,
+	}).Info("remove-tcont-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) CreateGemport(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("create-gemport-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) UpdateGemport(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("update-gemport-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) RemoveGemport(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("remove-gemport-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) CreateMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("create-multicast-gemport-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) UpdateMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("update-multicast-gemport-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) RemoveMulticastGemport(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("remove-multicast-gemport-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) CreateMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("create-multicast-distribution-set-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) UpdateMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("update-multicast-distribution-set-request")
+}
+
+/*
+
+ */
+func (d *XPonSimDevice) RemoveMulticastDistributionSet(ctx context.Context, config *voltha.InterfaceConfig) {
+	common.Logger().WithFields(logrus.Fields{
+		"context":        ctx,
+		"device":         d,
+		"interface_type": config.GetInterfaceType(),
+		"data":           config,
+	}).Info("remove-multicast-distribution-set-request")
+}