PEL: Get rid of the enum for a maint procedure

It simplifies the code to just use the string name of the procedure as defined
by the message registry schema, and make it be less maintenance to add
new procedures in the future, especially if they come from the registry
so the enum isn't even needed.

This will also make it the same as upcoming support for symbolic FRU
callouts, which will always just come from the registry or an external
user so would not need an enum.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ia8550235678ba1fc717a6b0875e2d7ff3888bfec
diff --git a/test/openpower-pels/fru_identity_test.cpp b/test/openpower-pels/fru_identity_test.cpp
index 5e738aa..e31ffad 100644
--- a/test/openpower-pels/fru_identity_test.cpp
+++ b/test/openpower-pels/fru_identity_test.cpp
@@ -159,31 +159,46 @@
 // Test the constructor that takes in a maint procedure
 TEST(FRUIdentityTest, CreateProcedureCalloutTest)
 {
-    FRUIdentity fru{MaintProcedure::noVPDforFRU};
+    {
+        FRUIdentity fru{"no_vpd_for_fru"};
 
-    EXPECT_EQ(fru.flattenedSize(), 12);
-    EXPECT_EQ(fru.type(), 0x4944);
-    EXPECT_EQ(fru.failingComponentType(), FRUIdentity::maintenanceProc);
-    EXPECT_EQ(fru.getMaintProc().value(), "BMCSP01");
-    EXPECT_FALSE(fru.getPN());
-    EXPECT_FALSE(fru.getCCIN());
-    EXPECT_FALSE(fru.getSN());
+        EXPECT_EQ(fru.flattenedSize(), 12);
+        EXPECT_EQ(fru.type(), 0x4944);
+        EXPECT_EQ(fru.failingComponentType(), FRUIdentity::maintenanceProc);
+        EXPECT_EQ(fru.getMaintProc().value(), "BMCSP01");
+        EXPECT_FALSE(fru.getPN());
+        EXPECT_FALSE(fru.getCCIN());
+        EXPECT_FALSE(fru.getSN());
 
-    // Flatten and unflatten, then compare again
-    std::vector<uint8_t> data;
-    Stream stream{data};
-    fru.flatten(stream);
+        // Flatten and unflatten, then compare again
+        std::vector<uint8_t> data;
+        Stream stream{data};
+        fru.flatten(stream);
 
-    EXPECT_EQ(data.size(), fru.flattenedSize());
+        EXPECT_EQ(data.size(), fru.flattenedSize());
 
-    stream.offset(0);
-    FRUIdentity newFRU{stream};
+        stream.offset(0);
+        FRUIdentity newFRU{stream};
 
-    EXPECT_EQ(newFRU.flattenedSize(), 12);
-    EXPECT_EQ(newFRU.type(), 0x4944);
-    EXPECT_EQ(newFRU.failingComponentType(), FRUIdentity::maintenanceProc);
-    EXPECT_EQ(newFRU.getMaintProc().value(), "BMCSP01");
-    EXPECT_FALSE(newFRU.getPN());
-    EXPECT_FALSE(newFRU.getCCIN());
-    EXPECT_FALSE(newFRU.getSN());
+        EXPECT_EQ(newFRU.flattenedSize(), 12);
+        EXPECT_EQ(newFRU.type(), 0x4944);
+        EXPECT_EQ(newFRU.failingComponentType(), FRUIdentity::maintenanceProc);
+        EXPECT_EQ(newFRU.getMaintProc().value(), "BMCSP01");
+        EXPECT_FALSE(newFRU.getPN());
+        EXPECT_FALSE(newFRU.getCCIN());
+        EXPECT_FALSE(newFRU.getSN());
+    }
+
+    {
+        // Invalid maintenance procedure
+        FRUIdentity fru{"invalid"};
+
+        EXPECT_EQ(fru.flattenedSize(), 12);
+        EXPECT_EQ(fru.type(), 0x4944);
+        EXPECT_EQ(fru.failingComponentType(), FRUIdentity::maintenanceProc);
+        EXPECT_EQ(fru.getMaintProc().value(), "INVALID");
+        EXPECT_FALSE(fru.getPN());
+        EXPECT_FALSE(fru.getCCIN());
+        EXPECT_FALSE(fru.getSN());
+    }
 }