Revision ebf2bbc6 ncclient/operations/retrieve.py

b/ncclient/operations/retrieve.py
12 12
# See the License for the specific language governing permissions and
13 13
# limitations under the License.
14 14

  
15
from ncclient.rpc import RPC, RPCReply
15
from rpc import RPC, RPCReply
16 16

  
17 17
from ncclient import content
18 18

  
19 19
import util
20 20

  
21
# NOTES
22
# - consider class for helping define <filter> for Get/GetConfig??
23

  
24 21
class GetReply(RPCReply):
25 22
    
26 23
    'Adds data attribute'
......
60 57
    def request(self, filter=None):
61 58
        spec = Get.SPEC.copy()
62 59
        if filter is not None:
63
            spec['subtree'].append(content.rootchecked(filter. 'filter', 'type'))
60
            spec['subtree'].append(util.build_filter(filter)))
64 61
        return self._request(spec)
65 62

  
66 63
class GetConfig(RPC):
......
87 84
            'subtree': util.store_or_url(source, source_url)
88 85
            })
89 86
        if filter is not None:
90
            spec['subtree'].append(content.rootchecked(filter, 'filter', 'type'))
87
            spec['subtree'].append(util.build_filter(filter))
91 88
        return self._request(spec)
92 89

  

Also available in: Unified diff