SEBA-761 implemented persistent storage using local directory to save and restore device information across pod deployments / read pv mount path from an env variable

Change-Id: Ibb7c235a464d2f4388232d393a6ad836c2d45d73
diff --git a/data_collector.go b/data_collector.go
index f68f280..77a67d9 100644
--- a/data_collector.go
+++ b/data_collector.go
@@ -26,8 +26,7 @@
 func (s *Server) get_status(ip string, service string) (rtn bool, data []string) {
 	rtn = false
 
-//	uri := "https://"+ip + REDFISH_ROOT + service
-	uri := s.devicemap[ip].protocol+"://"+ip + REDFISH_ROOT + service
+	uri := s.devicemap[ip].Protocol + "://"+ip + REDFISH_ROOT + service
         fmt.Printf("%q", uri)
 	resp, err := http.Get(uri)
 	if err != nil {
@@ -44,7 +43,7 @@
 		matches := re.FindAllString(memberstr, -1)
 		for _, match := range matches {
 			m := strings.Trim(match, "[]")
-			uri = s.devicemap[ip].protocol +"://"+ip + strings.TrimPrefix(m, "@odata.id:")
+			uri = s.devicemap[ip].Protocol +"://"+ip + strings.TrimPrefix(m, "@odata.id:")
 			fmt.Println("Printing URI")
 			fmt.Println(uri)
 			resp, err = http.Get(uri)
@@ -58,8 +57,8 @@
 					data = append(data, string(b))
 					rtn = true
 				}
+				defer resp.Body.Close()
 			}
-			defer resp.Body.Close()
 		}
 	}
 	return