Changes usage of vnfd['name'] property because it is called 'product-name' in SOL006 38/9938/1
authorgarciaale <agarcia@whitestack.com>
Tue, 3 Nov 2020 20:15:47 +0000 (17:15 -0300)
committergarciaale <agarcia@whitestack.com>
Tue, 3 Nov 2020 20:15:47 +0000 (17:15 -0300)
Change-Id: Idb142e78a47999e1c2aaab54673dc6225c4e2124
Signed-off-by: garciaale <agarcia@whitestack.com>
osmclient/scripts/osm.py

index 3083087..dc93b7a 100755 (executable)
@@ -519,7 +519,7 @@ def vnfd_list(ctx, nf_type, filter, long):
         else:
             table = PrettyTable(['nfpkg name', 'id'])
         for vnfd in resp:
-            name = vnfd['name'] if 'name' in vnfd else '-'
+            name = vnfd['product-name'] if 'product-name' in vnfd else '-'
             if long:
                 onb_state = vnfd['_admin'].get('onboardingState','-')
                 op_state = vnfd['_admin'].get('operationalState','-')
@@ -534,7 +534,7 @@ def vnfd_list(ctx, nf_type, filter, long):
     else:
         table = PrettyTable(['nfpkg name', 'id'])
         for vnfd in resp:
-            table.add_row([vnfd['name'], vnfd['id']])
+            table.add_row([vnfd['product-name'], vnfd['id']])
     table.align = 'l'
     print(table)