Bug 1862: Fixed required field in SOL006 IM to generate OSM repo index 91/12191/2
authorgomezchavez <guillermo.gomez.external@atos.net>
Thu, 9 Jun 2022 09:40:19 +0000 (11:40 +0200)
committerbeierlm <mark.beierl@canonical.com>
Wed, 22 Jun 2022 12:42:01 +0000 (14:42 +0200)
Change-Id: I3b0e80611d5cd800fe2ffc78e1c71765d19bcf23
Signed-off-by: gomezchavez <guillermo.gomez.external@atos.net>
osmclient/sol005/osmrepo.py

index beaea34..85529de 100644 (file)
@@ -308,8 +308,8 @@ class OSMRepo(Repo):
             msg = f"Unexpected descriptor format {descriptor_dict}"
             self._logger.error(msg)
             raise ValueError(msg)
-
-        fields["name"] = aux_dict.get("name")
+        # Repo search is based on 'name' entry in index.yaml. It is mandatory then
+        fields["name"] = aux_dict.get("name", aux_dict["product-name"])
         fields["id"] = aux_dict.get("id")
         fields["description"] = aux_dict.get("description")
         fields["vendor"] = aux_dict.get("vendor")