[VOL-5548] Handle ONU SW download and upgrade during context cancellation or timeout

Change-Id: I3a901833e2e69c52911f9ffc13e7dd5dc1abcea6
Signed-off-by: bseeniva <balaji.seenivasan@radisys.com>
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index 704aa77..e23e077 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -68,6 +68,7 @@
 	MinBackoffRetryDelay        time.Duration
 	MaxBackoffRetryDelay        time.Duration
 	RPCTimeout                  time.Duration
+	ONUSwUpgradeTimeout         time.Duration
 	MaxConcurrentFlowsPerUni    int
 	PerRPCRetryTimeout          time.Duration
 	MaxRetries                  uint
@@ -282,6 +283,11 @@
 		10*time.Second,
 		"The default timeout when making an RPC request")
 
+	fs.DurationVar(&(so.ONUSwUpgradeTimeout),
+		"onu_sw_upgrade_timeout",
+		3*time.Hour,
+		"The default timeout for ONU software upgrade")
+
 	fs.DurationVar(&(so.MinBackoffRetryDelay),
 		"min_retry_delay",
 		500*time.Millisecond,