|
19 | 19 | from collections.abc import Mapping |
20 | 20 |
|
21 | 21 | import jsonpatch |
22 | | -import jsonpath_rw |
| 22 | +import jsonpath_ng |
23 | 23 | import jsonpointer |
24 | 24 |
|
25 | 25 | from redfish.ris.rmc_helper import (UndefinedClientError, \ |
@@ -384,7 +384,7 @@ def get(self, selector=None): |
384 | 384 | currdict = jsonpatch.apply_patch(currdict, patch) |
385 | 385 |
|
386 | 386 | if selector: |
387 | | - jsonpath_expr = jsonpath_rw.parse('%s' % selector) |
| 387 | + jsonpath_expr = jsonpath_ng.parse('%s' % selector) |
388 | 388 | matches = jsonpath_expr.find(currdict) |
389 | 389 | temp_dict = OrderedDict() |
390 | 390 |
|
@@ -440,7 +440,7 @@ def get_save(self, selector=None, currentoverride=False, pluspath=False, |
440 | 440 | break |
441 | 441 |
|
442 | 442 | try: |
443 | | - jsonpath_expr = jsonpath_rw.parse('"%s"' % selector) |
| 443 | + jsonpath_expr = jsonpath_ng.parse('"%s"' % selector) |
444 | 444 | except Exception as excp: |
445 | 445 | raise InvalidCommandLineError(excp) |
446 | 446 |
|
@@ -516,7 +516,7 @@ def set(self, selector=None, val=None): |
516 | 516 | break |
517 | 517 |
|
518 | 518 | newdict = currdict.copy() |
519 | | - jsonpath_expr = jsonpath_rw.parse(u'%s' % selector) |
| 519 | + jsonpath_expr = jsonpath_ng.parse(u'%s' % selector) |
520 | 520 | matches = jsonpath_expr.find(currdict) |
521 | 521 |
|
522 | 522 | if not matches: |
@@ -730,7 +730,7 @@ def loadset(self, dicttolist=None, selector=None, val=None, newargs=None): |
730 | 730 | dicttolist = [] |
731 | 731 |
|
732 | 732 | for (itersel, iterval) in dicttolist: |
733 | | - jsonpath_expr = jsonpath_rw.parse('%s' % itersel) |
| 733 | + jsonpath_expr = jsonpath_ng.parse('%s' % itersel) |
734 | 734 | matches = jsonpath_expr.find(currdict) |
735 | 735 |
|
736 | 736 | if not matches: |
|
0 commit comments