VOL-3503 Add a device operational state of RECONCILING

Change-Id: I96118a15974f96fc5059320ab075b9c704d4ce73
diff --git a/go.mod b/go.mod
index 02802a3..75a32ef 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@
 	github.com/golang/protobuf v1.3.2
 	github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
 	github.com/opencord/voltha-lib-go/v4 v4.3.1
-	github.com/opencord/voltha-protos/v4 v4.1.1
+	github.com/opencord/voltha-protos/v4 v4.1.2
 	go.etcd.io/etcd v0.0.0-20190930204107-236ac2a90522
 	google.golang.org/grpc v1.25.1
 )
diff --git a/go.sum b/go.sum
index 1af3d67..48e5bf3 100644
--- a/go.sum
+++ b/go.sum
@@ -143,8 +143,9 @@
 github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
 github.com/opencord/voltha-lib-go/v4 v4.3.1 h1:z2CgB3un53IgbYTsz+pdRtmQ3E6e6+PieGQDyHaQN1A=
 github.com/opencord/voltha-lib-go/v4 v4.3.1/go.mod h1:65GN71j4os0ApBRR+xbJ93iAMJMKIwVi/npG/hbPt8w=
-github.com/opencord/voltha-protos/v4 v4.1.1 h1:yovQHC+JQSrw5zxj0UeQqmyFUBQ+487JdG5w5ttrRyc=
 github.com/opencord/voltha-protos/v4 v4.1.1/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
+github.com/opencord/voltha-protos/v4 v4.1.2 h1:iK7rhQXBtd6H2UWqdCPLQchcoGn8XV8XcVI3CBzGDfg=
+github.com/opencord/voltha-protos/v4 v4.1.2/go.mod h1:W/OIFIyvFh/C0vchRUuarIsMylEhzCRM9pNxLvkPtKc=
 github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
 github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
 github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 h1:JhzVVoYvbOACxoUmOs6V/G4D5nPVUW73rKvXxP4XUJc=
diff --git a/internal/pkg/core/openolt.go b/internal/pkg/core/openolt.go
index 6564e29..34e681e 100644
--- a/internal/pkg/core/openolt.go
+++ b/internal/pkg/core/openolt.go
@@ -186,6 +186,11 @@
 		handler.adapterPreviouslyConnected = true
 		oo.addDeviceHandlerToMap(handler)
 		handler.transitionMap = NewTransitionMap(handler)
+		//Setting state to RECONCILING
+		err := handler.coreProxy.DeviceStateUpdate(ctx, device.Id, device.ConnectStatus, voltha.OperStatus_RECONCILING)
+		if err != nil {
+			return err
+		}
 		handler.transitionMap.Handle(ctx, DeviceInit)
 	}
 	return nil
diff --git a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/core.pb.go b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/core.pb.go
index 4c92095..64d42d0 100644
--- a/vendor/github.com/opencord/voltha-protos/v4/go/voltha/core.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/v4/go/voltha/core.pb.go
@@ -37,6 +37,8 @@
 	DeviceTransientState_DELETING_POST_ADAPTER_RESPONSE DeviceTransientState_Types = 4
 	// State to represent that the device deletion is failed
 	DeviceTransientState_DELETE_FAILED DeviceTransientState_Types = 5
+	// State to represent that reconcile is in progress
+	DeviceTransientState_RECONCILE_IN_PROGRESS DeviceTransientState_Types = 6
 )
 
 var DeviceTransientState_Types_name = map[int32]string{
@@ -46,6 +48,7 @@
 	3: "DELETING_FROM_ADAPTER",
 	4: "DELETING_POST_ADAPTER_RESPONSE",
 	5: "DELETE_FAILED",
+	6: "RECONCILE_IN_PROGRESS",
 }
 
 var DeviceTransientState_Types_value = map[string]int32{
@@ -55,6 +58,7 @@
 	"DELETING_FROM_ADAPTER":          3,
 	"DELETING_POST_ADAPTER_RESPONSE": 4,
 	"DELETE_FAILED":                  5,
+	"RECONCILE_IN_PROGRESS":          6,
 }
 
 func (x DeviceTransientState_Types) String() string {
@@ -112,22 +116,23 @@
 func init() { proto.RegisterFile("voltha_protos/core.proto", fileDescriptor_39634f15fb8a505e) }
 
 var fileDescriptor_39634f15fb8a505e = []byte{
-	// 264 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x4d, 0x4b, 0xc4, 0x30,
-	0x10, 0x86, 0xad, 0xfb, 0xa1, 0x0c, 0x58, 0x63, 0x54, 0x58, 0x2f, 0x22, 0x3d, 0x79, 0x31, 0x05,
-	0xf5, 0x0f, 0x54, 0x3b, 0x95, 0xc5, 0xb5, 0x2d, 0x6d, 0x2e, 0x7a, 0x09, 0xdd, 0x1a, 0xba, 0x05,
-	0x6d, 0x4a, 0x1a, 0x0b, 0xde, 0xfc, 0xb5, 0xfe, 0x0e, 0xb1, 0x1f, 0x82, 0xb0, 0xb7, 0x99, 0xe7,
-	0x99, 0xf7, 0x30, 0x2f, 0x2c, 0x5a, 0xf5, 0x66, 0x36, 0x99, 0xa8, 0xb5, 0x32, 0xaa, 0x71, 0x73,
-	0xa5, 0x25, 0xeb, 0x66, 0x3a, 0xef, 0x8d, 0xf3, 0x6d, 0xc1, 0x89, 0x2f, 0xdb, 0x32, 0x97, 0x5c,
-	0x67, 0x55, 0x53, 0xca, 0xca, 0xa4, 0x26, 0x33, 0x92, 0x3e, 0xc2, 0xa1, 0x19, 0x89, 0x68, 0x7e,
-	0xd1, 0xc2, 0xba, 0xb0, 0x2e, 0xed, 0x6b, 0x87, 0xf5, 0x51, 0xb6, 0x2d, 0xc6, 0xf8, 0x67, 0x2d,
-	0x9b, 0xc4, 0x36, 0xff, 0xa8, 0xf3, 0x65, 0xc1, 0xac, 0x33, 0x74, 0x1f, 0xa6, 0x61, 0x14, 0x22,
-	0xd9, 0xa1, 0x7b, 0x30, 0xf1, 0xc2, 0x67, 0x62, 0x51, 0x0a, 0x76, 0x10, 0x25, 0xf7, 0x28, 0x7c,
-	0x5c, 0x21, 0x5f, 0x86, 0x0f, 0x64, 0x97, 0x9e, 0xc1, 0xe9, 0xb8, 0x89, 0x20, 0x89, 0x9e, 0x84,
-	0xe7, 0x7b, 0x31, 0xc7, 0x84, 0x4c, 0xa8, 0x03, 0xe7, 0x7f, 0x2a, 0x8e, 0x52, 0x3e, 0x2a, 0x91,
-	0x60, 0x1a, 0x47, 0x61, 0x8a, 0x64, 0x4a, 0x8f, 0xe0, 0xa0, 0xbb, 0x41, 0x11, 0x78, 0xcb, 0x15,
-	0xfa, 0x64, 0x76, 0x87, 0x70, 0xac, 0x74, 0xc1, 0x54, 0x2d, 0xab, 0x5c, 0xe9, 0xd7, 0xe1, 0x89,
-	0x17, 0x56, 0x94, 0x66, 0xf3, 0xb1, 0x66, 0xb9, 0x7a, 0x77, 0x47, 0xe7, 0xf6, 0xee, 0x6a, 0x68,
-	0xad, 0xbd, 0x75, 0x0b, 0x35, 0xb0, 0xf5, 0xbc, 0x83, 0x37, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
-	0xe3, 0x06, 0xbc, 0xa1, 0x5a, 0x01, 0x00, 0x00,
+	// 284 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x4d, 0x4b, 0xf4, 0x30,
+	0x10, 0xc7, 0x9f, 0xee, 0xdb, 0x23, 0x01, 0xd7, 0x18, 0x15, 0xd6, 0x8b, 0x48, 0x4f, 0x5e, 0x4c,
+	0x41, 0xfd, 0x02, 0x75, 0x3b, 0xbb, 0x14, 0xd7, 0xa4, 0x24, 0xbd, 0xe8, 0x25, 0x74, 0x6b, 0xe8,
+	0x16, 0xb4, 0x29, 0x6d, 0x2c, 0x78, 0xf4, 0x73, 0xf8, 0x65, 0x65, 0xfb, 0x22, 0x08, 0xde, 0x66,
+	0x7e, 0xbf, 0xf9, 0x0f,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7b, 0xdf, 0xd2, 0xd4, 0xbc, 0x79, 0x83, 0xf3,
+	0x3a, 0x77, 0xdd, 0x3f, 0xb4, 0xb9, 0xf3, 0x32, 0xd3, 0xb3, 0xed, 0xac, 0x85, 0xb7, 0xdf, 0x01,
+	0x00, 0x00, 0xff, 0xff, 0x1a, 0x0c, 0x99, 0x87, 0x75, 0x01, 0x00, 0x00,
 }
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 0e28f74..d643249 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -75,7 +75,7 @@
 github.com/opencord/voltha-lib-go/v4/pkg/probe
 github.com/opencord/voltha-lib-go/v4/pkg/techprofile
 github.com/opencord/voltha-lib-go/v4/pkg/version
-# github.com/opencord/voltha-protos/v4 v4.1.1
+# github.com/opencord/voltha-protos/v4 v4.1.2
 ## explicit
 github.com/opencord/voltha-protos/v4/go/common
 github.com/opencord/voltha-protos/v4/go/ext/config