feature: helm charts repos with certs
[osm/osmclient.git] / osmclient / sol005 / vnfd.py
index 0a2b772..5c8b310 100644 (file)
@@ -66,9 +66,9 @@ class Vnfd(object):
                     return vnfd
         else:
             for vnfd in self.list():
-                if "product-name" in vnfd and name == vnfd["product-name"]:
+                if "id" in vnfd and name == vnfd["id"]:
                     return vnfd
-                elif "name" in vnfd and name == vnfd["name"]:
+                elif "product-name" in vnfd and name == vnfd["product-name"]:
                     return vnfd
         raise NotFound("vnfd {} not found".format(name))
 
@@ -329,11 +329,7 @@ class Vnfd(object):
                 special_override_string = special_override_string.rstrip(";")
 
             headers["Content-File-MD5"] = utils.md5(filename)
-            http_header = [
-                "{}: {}".format(key, val) for (key, val) in list(headers.items())
-            ]
-
-            self._http.set_http_header(http_header)
+            self._http.set_http_header(headers)
             if update_endpoint:
                 http_code, resp = self._http.put_cmd(
                     endpoint=update_endpoint, filename=filename