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/ponsim_device_state.go b/ponsim/v2/core/ponsim_device_state.go
new file mode 100644
index 0000000..a5805a2
--- /dev/null
+++ b/ponsim/v2/core/ponsim_device_state.go
@@ -0,0 +1,22 @@
+package core
+
+type PonSimDeviceState uint8
+
+const (
+ DISCONNECTED_FROM_PON PonSimDeviceState = iota
+ CONNECTED_TO_PON
+ REGISTERED_WITH_OLT
+ CONNECTED_IO_INTERFACE
+)
+
+// Execute state string equivalents
+var PonSimDeviceStateEnum = []string{
+ "DISCONNECTED_FROM_PON",
+ "CONNECTED_TO_PON",
+ "REGISTERED_WITH_OLT",
+ "CONNECTED_IO_INTERFACE",
+}
+
+func (s PonSimDeviceState) String() string {
+ return PonSimDeviceStateEnum[s]
+}