Fix remnants of config_name to config_key

There are some excess references to config_name. Need to change them to config_key to be consistent and reduce confusion.

#tlbmc

PiperOrigin-RevId: 819891377
Change-Id: I1d275da4c9190a3344060a30a92ee1620f92fc0d
diff --git a/tlbmc/redfish/app.cc b/tlbmc/redfish/app.cc
index eedcf8a..74892ed 100644
--- a/tlbmc/redfish/app.cc
+++ b/tlbmc/redfish/app.cc
@@ -104,9 +104,9 @@
 }
 
 absl::StatusOr<ResourceType> GetResourceType(
-    const std::unique_ptr<Store>& store, absl::string_view config_name) {
+    const std::unique_ptr<Store>& store, absl::string_view config_key) {
   ECCLESIA_ASSIGN_OR_RETURN(absl::string_view fru_key,
-                            store->GetFruKeyByConfigKey(config_name));
+                            store->GetFruKeyByConfigKey(config_key));
   ECCLESIA_ASSIGN_OR_RETURN(const Fru* fru, store->GetFru(fru_key));
   return fru->attributes().resource_type();
 }
diff --git a/tlbmc/redfish/routes/cable.cc b/tlbmc/redfish/routes/cable.cc
index b6aa8f0..b66e04b 100644
--- a/tlbmc/redfish/routes/cable.cc
+++ b/tlbmc/redfish/routes/cable.cc
@@ -33,15 +33,15 @@
   resp.SetKeyInJsonBody("/Name", "Cable Collection");
 
   const Store& store = *app.GetStore();
-  absl::StatusOr<std::vector<std::string>> config_names =
+  absl::StatusOr<std::vector<std::string>> config_keys =
       store.GetAllConfigKeys();
-  if (!config_names.ok()) {
-    resp.SetToAbslStatus(config_names.status());
+  if (!config_keys.ok()) {
+    resp.SetToAbslStatus(config_keys.status());
     return;
   }
 
   std::vector<std::string> cable_names;
-  for (const std::string& name : *config_names) {
+  for (const std::string& name : *config_keys) {
     absl::StatusOr<std::string> fru_key = store.GetFruKeyByConfigKey(name);
     if (!fru_key.ok()) {
       continue;
diff --git a/tlbmc/store/store.h b/tlbmc/store/store.h
index fb28848..011a70a 100644
--- a/tlbmc/store/store.h
+++ b/tlbmc/store/store.h
@@ -64,7 +64,7 @@
 
   // Returns the sorted list of sensor names contained by the given config key.
   virtual std::vector<std::string> GetAllSensorKeysByConfigKey(
-      const std::string& board_config_name) const = 0;
+      const std::string& board_config_key) const = 0;
 
   // Returns all the sensors sorted by sensor name.
   virtual std::vector<std::shared_ptr<const Sensor>> GetAllSensors() const = 0;
@@ -76,14 +76,14 @@
   // Returns the sensor for the given board config key and given sensor
   // key.
   virtual std::shared_ptr<const Sensor> GetSensorByConfigKeyAndSensorKey(
-      const std::string& board_config_name,
+      const std::string& board_config_key,
       const std::string& sensor_key) const = 0;
 
   // FRU accessors.
   virtual absl::StatusOr<const Fru*> GetFru(absl::string_view key) const = 0;
   virtual absl::StatusOr<const FruTable*> GetAllFrus() const = 0;
   virtual absl::StatusOr<const TopologyConfigNode*> GetFruTopology(
-      absl::string_view config_name) const = 0;
+      absl::string_view config_key) const = 0;
   // Returns the topology config of all configs.
   virtual absl::StatusOr<const TopologyConfig*> GetTopologyConfig() const = 0;
   // Returns all the config keys.
@@ -93,7 +93,7 @@
   virtual absl::StatusOr<std::string> GetConfigKeyByFruKey(
       absl::string_view fru_key) const = 0;
   virtual absl::StatusOr<std::string> GetFruKeyByConfigKey(
-      absl::string_view config_name) const = 0;
+      absl::string_view config_key) const = 0;
   // Converts the store to a JSON object.
   virtual nlohmann::json ToJson() const = 0;
   // Returns the scheduler stats for the store.
diff --git a/tlbmc/store/store_impl.cc b/tlbmc/store/store_impl.cc
index 5331894..f0e326a 100644
--- a/tlbmc/store/store_impl.cc
+++ b/tlbmc/store/store_impl.cc
@@ -69,15 +69,15 @@
 }
 
 std::vector<std::string> StoreImpl::GetAllSensorKeysByConfigKey(
-    const std::string& board_config_name) const {
+    const std::string& board_config_key) const {
   return all_collectors_.sensor_collector->GetAllSensorKeysByConfigKey(
-      board_config_name);
+      board_config_key);
 }
 
 std::shared_ptr<const Sensor> StoreImpl::GetSensorByConfigKeyAndSensorKey(
-    const std::string& board_config_name, const std::string& sensor_key) const {
+    const std::string& board_config_key, const std::string& sensor_key) const {
   return all_collectors_.sensor_collector->GetSensorByConfigKeyAndSensorKey(
-      board_config_name, sensor_key);
+      board_config_key, sensor_key);
 }
 
 absl::StatusOr<const Fru*> StoreImpl::GetFru(absl::string_view key) const {
@@ -123,8 +123,8 @@
 Store::Metrics StoreImpl::GetMetrics() const { return metrics_; }
 
 absl::StatusOr<const TopologyConfigNode*> StoreImpl::GetFruTopology(
-    absl::string_view config_name) const {
-  return entity_config_->GetFruTopologyByConfig(config_name);
+    absl::string_view config_key) const {
+  return entity_config_->GetFruTopologyByConfig(config_key);
 }
 
 absl::StatusOr<const TopologyConfig*> StoreImpl::GetTopologyConfig() const {
@@ -141,8 +141,8 @@
 }
 
 absl::StatusOr<std::string> StoreImpl::GetFruKeyByConfigKey(
-    absl::string_view config_name) const {
-  return entity_config_->GetFruKeyByConfigKey(config_name);
+    absl::string_view config_key) const {
+  return entity_config_->GetFruKeyByConfigKey(config_key);
 }
 
 absl::StatusOr<std::unique_ptr<StoreImpl>> StoreImpl::Create(
diff --git a/tlbmc/store/store_impl.h b/tlbmc/store/store_impl.h
index 2e6ac27..d5849e6 100644
--- a/tlbmc/store/store_impl.h
+++ b/tlbmc/store/store_impl.h
@@ -100,7 +100,7 @@
 
   // Returns the list of sensor names contained by the given config key.
   std::vector<std::string> GetAllSensorKeysByConfigKey(
-      const std::string& board_config_name) const override;
+      const std::string& board_config_key) const override;
   // Returns all the sensors.
   std::vector<std::shared_ptr<const Sensor>> GetAllSensors() const override;
   // Returns the sensor for the given sensor key.
@@ -109,13 +109,13 @@
   // Returns the sensor for the given board config key and given sensor
   // key.
   std::shared_ptr<const Sensor> GetSensorByConfigKeyAndSensorKey(
-      const std::string& board_config_name,
+      const std::string& board_config_key,
       const std::string& sensor_key) const override;
 
   absl::StatusOr<const Fru*> GetFru(absl::string_view key) const override;
 
   absl::StatusOr<const TopologyConfigNode*> GetFruTopology(
-      absl::string_view config_name) const override;
+      absl::string_view config_key) const override;
 
   absl::StatusOr<const TopologyConfig*> GetTopologyConfig() const override;
 
@@ -125,7 +125,7 @@
       absl::string_view fru_key) const override;
 
   absl::StatusOr<std::string> GetFruKeyByConfigKey(
-      absl::string_view config_name) const override;
+      absl::string_view config_key) const override;
 
   absl::StatusOr<const FruTable*> GetAllFrus() const override;