This update provides the meat for the image download feature
within the Core.   Minimal testing was done with the CLI as the
adapters have not implemented this feature so far.

Change-Id: I771340876d9aa1f368642cd44a433ced3df52673
diff --git a/adapters/common/request_handler.go b/adapters/common/request_handler.go
index ec04618..3f8465c 100644
--- a/adapters/common/request_handler.go
+++ b/adapters/common/request_handler.go
@@ -203,22 +203,22 @@
 	return new(empty.Empty), nil
 }
 
-func (rhp *RequestHandlerProxy) Download_image(args []*ic.Argument) (*empty.Empty, error) {
-	return new(empty.Empty), nil
+func (rhp *RequestHandlerProxy) Download_image(args []*ic.Argument) (*voltha.ImageDownload, error) {
+	return &voltha.ImageDownload{}, nil
 }
 
-func (rhp *RequestHandlerProxy) Get_image_download_status(args []*ic.Argument) (*empty.Empty, error) {
-	return new(empty.Empty), nil
+func (rhp *RequestHandlerProxy) Get_image_download_status(args []*ic.Argument) (*voltha.ImageDownload, error) {
+	return &voltha.ImageDownload{}, nil
 }
 
-func (rhp *RequestHandlerProxy) Cancel_image_download(args []*ic.Argument) (*empty.Empty, error) {
-	return new(empty.Empty), nil
+func (rhp *RequestHandlerProxy) Cancel_image_download(args []*ic.Argument) (*voltha.ImageDownload, error) {
+	return &voltha.ImageDownload{}, nil
 }
 
-func (rhp *RequestHandlerProxy) Activate_image_update(args []*ic.Argument) (*empty.Empty, error) {
-	return new(empty.Empty), nil
+func (rhp *RequestHandlerProxy) Activate_image_update(args []*ic.Argument) (*voltha.ImageDownload, error) {
+	return &voltha.ImageDownload{}, nil
 }
 
-func (rhp *RequestHandlerProxy) Revert_image_update(args []*ic.Argument) (*empty.Empty, error) {
-	return new(empty.Empty), nil
+func (rhp *RequestHandlerProxy) Revert_image_update(args []*ic.Argument) (*voltha.ImageDownload, error) {
+	return &voltha.ImageDownload{}, nil
 }
diff --git a/adapters/iAdapter.go b/adapters/iAdapter.go
index f8de35e..d0463f1 100644
--- a/adapters/iAdapter.go
+++ b/adapters/iAdapter.go
@@ -44,9 +44,9 @@
 	Get_ofp_device_info(device *voltha.Device) (*ic.SwitchCapability, error)
 	Get_ofp_port_info(device *voltha.Device, port_no int64) (*ic.PortCapability, error)
 	Process_inter_adapter_message(msg *ic.InterAdapterMessage) error
-	Download_image(device *voltha.Device, request *voltha.ImageDownload) error
-	Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) error
-	Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) error
-	Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) error
-	Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) error
+	Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+	Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+	Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+	Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
+	Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error)
 }
diff --git a/adapters/simulated_olt/adaptercore/simulated_olt.go b/adapters/simulated_olt/adaptercore/simulated_olt.go
index bb6883a..aa6e248 100644
--- a/adapters/simulated_olt/adaptercore/simulated_olt.go
+++ b/adapters/simulated_olt/adaptercore/simulated_olt.go
@@ -222,22 +222,22 @@
 	return errors.New("UnImplemented")
 }
 
-func (so *SimulatedOLT) Download_image(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedOLT) Download_image(device *voltha.Device, request *voltha.ImageDownload)  (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedOLT) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedOLT) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload)  (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedOLT) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedOLT) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload)  (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedOLT) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedOLT) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload)  (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedOLT) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedOLT) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload)  (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
diff --git a/adapters/simulated_onu/adaptercore/simulated_onu.go b/adapters/simulated_onu/adaptercore/simulated_onu.go
index 0a8efc6..1aefcad 100644
--- a/adapters/simulated_onu/adaptercore/simulated_onu.go
+++ b/adapters/simulated_onu/adaptercore/simulated_onu.go
@@ -216,22 +216,22 @@
 	return errors.New("UnImplemented")
 }
 
-func (so *SimulatedONU) Download_image(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedONU) Download_image(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedONU) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedONU) Get_image_download_status(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedONU) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedONU) Cancel_image_download(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedONU) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedONU) Activate_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }
 
-func (so *SimulatedONU) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) error {
-	return errors.New("UnImplemented")
+func (so *SimulatedONU) Revert_image_update(device *voltha.Device, request *voltha.ImageDownload) (*voltha.ImageDownload, error) {
+	return nil, errors.New("UnImplemented")
 }