diff options
author | Patrick Venture <venture@google.com> | 2019-08-19 12:25:54 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2019-09-19 10:20:47 -0700 |
commit | 1ad9da8a7882a643ca28fedbdc614f1855e3669a (patch) | |
tree | 2533fde8f95d730e2090fce01f32590dc3d611a5 /entity_map_json.cpp | |
parent | 87fd2cd13314a2b0b8cbc6441e724a4fea57e20c (diff) | |
download | phosphor-host-ipmid-1ad9da8a7882a643ca28fedbdc614f1855e3669a.tar.gz phosphor-host-ipmid-1ad9da8a7882a643ca28fedbdc614f1855e3669a.zip |
drop entity YAML in favor of json provided file
Step 5 of moving from entity map from YAML to JSON drops support for a
built-in YAML mapping of the entity containers.
Tested: Not tested. No platform upstream updates this YAML file in
their builds.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic2918f568f5a6f4a9f9135990889b3bb84a0c81d
Diffstat (limited to 'entity_map_json.cpp')
-rw-r--r-- | entity_map_json.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/entity_map_json.cpp b/entity_map_json.cpp index c0b836c..7b4e0bf 100644 --- a/entity_map_json.cpp +++ b/entity_map_json.cpp @@ -13,8 +13,6 @@ namespace ipmi namespace sensor { -extern const EntityInfoMap entities; - EntityInfoMapContainer* EntityInfoMapContainer::getContainer() { static std::unique_ptr<EntityInfoMapContainer> instance; @@ -25,16 +23,8 @@ EntityInfoMapContainer* EntityInfoMapContainer::getContainer() * the first thread to hit it would set it up. */ EntityInfoMap builtEntityMap = buildEntityMapFromFile(); - if (!builtEntityMap.empty()) - { - instance = std::unique_ptr<EntityInfoMapContainer>( - new EntityInfoMapContainer(builtEntityMap)); - } - else - { - instance = std::unique_ptr<EntityInfoMapContainer>( - new EntityInfoMapContainer(entities)); - } + instance = std::unique_ptr<EntityInfoMapContainer>( + new EntityInfoMapContainer(builtEntityMap)); } return instance.get(); |