Revamped code for VPD parser

The commit removes all the pre-existing code from the branch
and pushes the revamped code.

Major modification includes:
- Movement from multi exe to single daemon model.
- Multithreaded approach to parse FRU VPD.
- Better error handling.
- Refactored code for performance optimization.

Note: This code supports all the existing functionalities as it is.

Change-Id: I1ddce1f0725ac59020b72709689a1013643bda8b
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/service_files/com.ibm.VPD.Manager.service b/service_files/com.ibm.VPD.Manager.service
deleted file mode 100644
index 04f157d..0000000
--- a/service_files/com.ibm.VPD.Manager.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=IBM VPD Manager
-StopWhenUnneeded=false
-Requires=system-vpd.service
-After=system-vpd.service
-
-[Service]
-BusName=com.ibm.VPD.Manager
-Type=dbus
-Restart=always
-RestartSec=5
-ExecStart=/usr/bin/vpd-manager
-
-[Install]
-WantedBy=multi-user.target
diff --git a/service_files/ibm-isdimm-vpd-parser@.service b/service_files/ibm-isdimm-vpd-parser@.service
deleted file mode 100644
index d92ee52..0000000
--- a/service_files/ibm-isdimm-vpd-parser@.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Jedec format VPD Parser service for FRU %I
-Wants=mapper-wait@-xyz-openbmc_project-inventory.service
-After=mapper-wait@-xyz-openbmc_project-inventory.service
-Requires=system-vpd.service
-After=system-vpd.service
-Before=phosphor-discover-system-state@0.service
-
-[Service]
-ExecStart=/usr/bin/env ibm-read-vpd --file %f --driver ee1004
-SyslogIdentifier=ibm-isdimm-vpd-parser
-
-[Install]
-WantedBy=multi-user.target
diff --git a/service_files/ibm-spi-vpd-parser@.service b/service_files/ibm-spi-vpd-parser@.service
deleted file mode 100644
index eaecbbc..0000000
--- a/service_files/ibm-spi-vpd-parser@.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description= IPZ format SPI VPD Parser service for FRU %I
-Wants=mapper-wait@-xyz-openbmc_project-inventory.service
-After=mapper-wait@-xyz-openbmc_project-inventory.service
-Requires=system-vpd.service
-After=system-vpd.service
-Before=phosphor-discover-system-state@0.service
-
-[Service]
-ExecStart=/usr/bin/env ibm-read-vpd --file %f --driver at25
-SyslogIdentifier=ibm-spi-vpd-parser
-
-[Install]
-WantedBy=multi-user.target
diff --git a/service_files/ibm-vpd-parser@.service b/service_files/ibm-vpd-parser@.service
deleted file mode 100644
index a8b2063..0000000
--- a/service_files/ibm-vpd-parser@.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=IPZ format VPD Parser service for FRU %I
-Wants=mapper-wait@-xyz-openbmc_project-inventory.service
-After=mapper-wait@-xyz-openbmc_project-inventory.service
-Requires=system-vpd.service
-After=system-vpd.service
-Before=phosphor-discover-system-state@0.service
-
-[Service]
-ExecStart=/usr/bin/env ibm-read-vpd --file %f --driver at24
-SyslogIdentifier=ibm-vpd-parser
-
-[Install]
-WantedBy=multi-user.target
diff --git a/service_files/system-vpd.service b/service_files/system-vpd.service
index 5c1f076..019c3b2 100644
--- a/service_files/system-vpd.service
+++ b/service_files/system-vpd.service
@@ -1,19 +1,7 @@
+#currently these services are added just for backward compatibility.
+#It will perform no task in the system and will be eventually removed.
+
 [Unit]
 Description=System VPD Collection
-Wants=mapper-wait@-xyz-openbmc_project-inventory.service
-After=mapper-wait@-xyz-openbmc_project-inventory.service
-Wants=obmc-power-reset-on@0.target
-After=obmc-power-reset-on@0.target
-Wants=mapper-wait@-xyz-openbmc_project-state-chassis0.service
-After=mapper-wait@-xyz-openbmc_project-state-chassis0.service
-After=set-spi-mux.service
+After=vpd-manager.service
 Before=phosphor-discover-system-state@0.service
-
-[Service]
-ExecStart=/usr/bin/env ibm-read-vpd --file /sys/bus/i2c/drivers/at24/8-0050/eeprom --driver at24
-SyslogIdentifier=ibm-vpd-parser
-Type=oneshot
-RemainAfterExit=yes
-
-[Install]
-RequiredBy=multi-user.target
diff --git a/service_files/vpd-manager.service b/service_files/vpd-manager.service
new file mode 100644
index 0000000..8c78781
--- /dev/null
+++ b/service_files/vpd-manager.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=VPD Manager
+StopWhenUnneeded=false
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+Wants=obmc-power-reset-on@0.target
+After=obmc-power-reset-on@0.target
+Wants=mapper-wait@-xyz-openbmc_project-state-chassis0.service
+After=mapper-wait@-xyz-openbmc_project-state-chassis0.service
+After=set-spi-mux.service
+Before=phosphor-discover-system-state@0.service
+
+[Service]
+BusName=com.ibm.VPD.Manager
+SyslogIdentifier=vpd-manager
+Type=dbus
+Restart=always
+RestartSec=5
+ExecStart=/usr/bin/vpd-manager
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
diff --git a/service_files/wait-vpd-parsers.service b/service_files/wait-vpd-parsers.service
index 95fc22f..8b39310 100644
--- a/service_files/wait-vpd-parsers.service
+++ b/service_files/wait-vpd-parsers.service
@@ -1,12 +1,15 @@
+#currently these services are added just for backward compatibility.
+#It will perform no task in the system and will be eventually removed.
+
 [Unit]
 Description=Wait for VPD Collection Services to complete
-After=system-vpd.service
+Wants=vpd-manager.service
+After=vpd-manager.service
 After=set-spi-mux.service
 
 [Service]
-ExecStart=/usr/bin/wait-vpd-parsers.sh
+ExecStart=/usr/bin/wait-vpd-status.sh
 Type=oneshot
 
 [Install]
-WantedBy=multi-user.target
-#WantedBy=obmc-chassis-poweroff@0.target
+WantedBy=multi-user.target
\ No newline at end of file