Replace jsonpath_ng by jsonpath_ng.ext to parse complex expressions based on filtered... 05/14905/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 3 Feb 2025 15:30:02 +0000 (16:30 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 3 Feb 2025 15:31:46 +0000 (16:31 +0100)
This enhances the jsonpath output format in osmclient commands, allowing
the use of extended expressions based on selectors such as
'{.status.conditions[?(@.type=="Synced")].status}'.

Change-Id: Ic40f93e3e8e9a75b7685a81f4975a4cbe43e154b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osmclient/common/print_output.py

index 145c63e..9096e94 100644 (file)
@@ -20,7 +20,7 @@ import json
 import yaml
 from prettytable import PrettyTable
 
-from jsonpath_ng import parse
+from jsonpath_ng.ext import parse
 
 
 logger = logging.getLogger("osmclient")