diff --git a/common/core/northbound/grpc/default_api_handler.go b/common/core/northbound/grpc/default_api_handler.go
new file mode 100644
index 0000000..8fa31d9
--- /dev/null
+++ b/common/core/northbound/grpc/default_api_handler.go
@@ -0,0 +1,259 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package grpc
+
+import (
+	"context"
+	"errors"
+	"github.com/golang/protobuf/ptypes/empty"
+	"github.com/opencord/voltha-go/common/log"
+	"github.com/opencord/voltha-go/protos/common"
+	"github.com/opencord/voltha-go/protos/openflow_13"
+	"github.com/opencord/voltha-go/protos/voltha"
+)
+
+type DefaultAPIHandler struct {
+}
+
+func NewDefaultAPIHandler() *DefaultAPIHandler {
+	handler := &DefaultAPIHandler{}
+	return handler
+}
+
+func (handler *DefaultAPIHandler) UpdateLogLevel(ctx context.Context, logging *voltha.Logging) (*empty.Empty, error) {
+	log.Debugw("UpdateLogLevel-request", log.Fields{"newloglevel": logging.Level, "intval": int(logging.Level)})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetVoltha(ctx context.Context, empty *empty.Empty) (*voltha.Voltha, error) {
+	log.Debug("GetVoltha-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListCoreInstances(ctx context.Context, empty *empty.Empty) (*voltha.CoreInstances, error) {
+	log.Debug("ListCoreInstances-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetCoreInstance(ctx context.Context, id *voltha.ID) (*voltha.CoreInstance, error) {
+	log.Debugw("GetCoreInstance-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListAdapters(ctx context.Context, empty *empty.Empty) (*voltha.Adapters, error) {
+	log.Debug("ListAdapters-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListLogicalDevices(ctx context.Context, empty *empty.Empty) (*voltha.LogicalDevices, error) {
+	log.Debug("ListLogicalDevices-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetLogicalDevice(ctx context.Context, id *voltha.ID) (*voltha.LogicalDevice, error) {
+	log.Debugw("GetLogicalDevice-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListLogicalDevicePorts(ctx context.Context, id *voltha.ID) (*voltha.LogicalPorts, error) {
+	log.Debugw("ListLogicalDevicePorts-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetLogicalDevicePort(ctx context.Context, id *voltha.LogicalPortId) (*voltha.LogicalPort, error) {
+	log.Debugw("GetLogicalDevicePort-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) EnableLogicalDevicePort(ctx context.Context, id *voltha.LogicalPortId) (*empty.Empty, error) {
+	log.Debugw("EnableLogicalDevicePort-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) DisableLogicalDevicePort(ctx context.Context, id *voltha.LogicalPortId) (*empty.Empty, error) {
+	log.Debugw("DisableLogicalDevicePort-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListLogicalDeviceFlows(ctx context.Context, id *voltha.ID) (*openflow_13.Flows, error) {
+	log.Debugw("ListLogicalDeviceFlows-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) UpdateLogicalDeviceFlowTable(ctx context.Context, flow *openflow_13.FlowTableUpdate) (*empty.Empty, error) {
+	log.Debugw("UpdateLogicalDeviceFlowTable-request", log.Fields{"flow": *flow})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) UpdateLogicalDeviceFlowGroupTable(ctx context.Context, flow *openflow_13.FlowGroupTableUpdate) (*empty.Empty, error) {
+	log.Debugw("UpdateLogicalDeviceFlowGroupTable-request", log.Fields{"flow": *flow})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListLogicalDeviceFlowGroups(ctx context.Context, id *voltha.ID) (*openflow_13.FlowGroups, error) {
+	log.Debugw("ListLogicalDeviceFlowGroups-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListDevices(ctx context.Context, empty *empty.Empty) (*voltha.Devices, error) {
+	log.Debug("ListDevices-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetDevice(ctx context.Context, id *voltha.ID) (*voltha.Device, error) {
+	log.Debugw("GetDevice-request", log.Fields{"id": id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) CreateDevice(ctx context.Context, device *voltha.Device) (*voltha.Device, error) {
+	log.Debugw("CreateDevice-request", log.Fields{"device": *device})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) EnableDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
+	log.Debugw("EnableDevice-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) DisableDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
+	log.Debugw("DisableDevice-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) RebootDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
+	log.Debugw("RebootDevice-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) DeleteDevice(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
+	log.Debugw("DeleteDevice-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) DownloadImage(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
+	log.Debugw("DownloadImage-request", log.Fields{"img": *img})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetImageDownloadStatus(ctx context.Context, img *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+	log.Debugw("GetImageDownloadStatus-request", log.Fields{"img": *img})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetImageDownload(ctx context.Context, img *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+	log.Debugw("getdevice-request", log.Fields{"img": *img})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListImageDownloads(ctx context.Context, id *voltha.ID) (*voltha.ImageDownloads, error) {
+	log.Debugw("ListImageDownloads-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) CancelImageDownload(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
+	log.Debugw("CancelImageDownload-request", log.Fields{"img": *img})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ActivateImageUpdate(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
+	log.Debugw("ActivateImageUpdate-request", log.Fields{"img": *img})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) RevertImageUpdate(ctx context.Context, img *voltha.ImageDownload) (*common.OperationResp, error) {
+	log.Debugw("RevertImageUpdate-request", log.Fields{"img": *img})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListDevicePorts(ctx context.Context, id *voltha.ID) (*voltha.Ports, error) {
+	log.Debugw("ListDevicePorts-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListDevicePmConfigs(ctx context.Context, id *voltha.ID) (*voltha.PmConfigs, error) {
+	log.Debugw("ListDevicePmConfigs-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) UpdateDevicePmConfigs(ctx context.Context, configs *voltha.PmConfigs) (*empty.Empty, error) {
+	log.Debugw("UpdateDevicePmConfigs-request", log.Fields{"configs": *configs})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListDeviceFlows(ctx context.Context, id *voltha.ID) (*openflow_13.Flows, error) {
+	log.Debugw("ListDeviceFlows-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListDeviceFlowGroups(ctx context.Context, id *voltha.ID) (*openflow_13.FlowGroups, error) {
+	log.Debugw("ListDeviceFlowGroups-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListDeviceTypes(ctx context.Context, empty *empty.Empty) (*voltha.DeviceTypes, error) {
+	log.Debug("ListDeviceTypes-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetDeviceType(ctx context.Context, id *voltha.ID) (*voltha.DeviceType, error) {
+	log.Debugw("GetDeviceType-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListDeviceGroups(ctx context.Context, empty *empty.Empty) (*voltha.DeviceGroups, error) {
+	log.Debug("ListDeviceGroups-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetDeviceGroup(ctx context.Context, id *voltha.ID) (*voltha.DeviceGroup, error) {
+	log.Debugw("GetDeviceGroup-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) CreateAlarmFilter(ctx context.Context, filter *voltha.AlarmFilter) (*voltha.AlarmFilter, error) {
+	log.Debugw("CreateAlarmFilter-request", log.Fields{"filter": *filter})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetAlarmFilter(ctx context.Context, id *voltha.ID) (*voltha.AlarmFilter, error) {
+	log.Debugw("GetAlarmFilter-request", log.Fields{"id": id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) UpdateAlarmFilter(ctx context.Context, filter *voltha.AlarmFilter) (*voltha.AlarmFilter, error) {
+	log.Debugw("UpdateAlarmFilter-request", log.Fields{"filter": *filter})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) DeleteAlarmFilter(ctx context.Context, id *voltha.ID) (*empty.Empty, error) {
+	log.Debugw("DeleteAlarmFilter-request", log.Fields{"id": *id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) ListAlarmFilters(ctx context.Context, empty *empty.Empty) (*voltha.AlarmFilters, error) {
+	log.Debug("ListAlarmFilters-request")
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) GetImages(ctx context.Context, id *voltha.ID) (*voltha.Images, error) {
+	log.Debugw("GetImages-request", log.Fields{"id": id})
+	return nil, errors.New("UnImplemented")
+}
+
+func (handler *DefaultAPIHandler) SelfTest(ctx context.Context, id *voltha.ID) (*voltha.SelfTestResponse, error) {
+	log.Debugw("SelfTest-request", log.Fields{"id": id})
+	return nil, errors.New("UnImplemented")
+}
diff --git a/common/grpc/security.go b/common/grpc/security.go
index e198cb8..930d2c8 100644
--- a/common/grpc/security.go
+++ b/common/grpc/security.go
@@ -1,7 +1,22 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package grpc
 
 type GrpcSecurity struct {
 	KeyFile  string
 	CertFile string
 	CaFile   string
-}
\ No newline at end of file
+}
diff --git a/common/grpc/server.go b/common/grpc/server.go
index c3f8c3f..0441fcf 100644
--- a/common/grpc/server.go
+++ b/common/grpc/server.go
@@ -1,12 +1,27 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package grpc
 
 import (
-	"net"
 	"context"
+	"github.com/opencord/voltha-go/common/log"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/credentials"
+	"net"
 	"strconv"
-	"github.com/opencord/voltha-go/common/log"
 	"strings"
 )
 
@@ -36,9 +51,7 @@
 4. Start the server
 
 	s.server.Start(ctx)
- */
-
-
+*/
 
 type GrpcServer struct {
 	gs       *grpc.Server
diff --git a/common/log/log.go b/common/log/log.go
index 93b2072..38a051d 100644
--- a/common/log/log.go
+++ b/common/log/log.go
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.apache.org/licenses/LICENSE-2.0
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package log
 
 import (
