File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1010
1111from napalm .junos import junos
1212
13+ from ncclient .devices .junos import JunosDeviceHandler
14+
1315
1416@pytest .fixture (scope = "class" )
1517def set_device_parameters (request ):
@@ -82,6 +84,15 @@ def __init__(self):
8284 # disable it to use the DOM parser which was used prior.
8385 self ._use_filter = False
8486
87+ @property
88+ def transform (self ):
89+ # Junos device transform, inherited from the ncclient class
90+ return self ._conn ._device_handler .transform_reply
91+
92+ @transform .setter
93+ def transform (self , func ):
94+ self ._conn ._device_handler .transform_reply = func
95+
8596 @property
8697 def facts (self ):
8798 # we want to reinitialize it every time to avoid side effects
@@ -183,6 +194,7 @@ class FakeConnection:
183194 def __init__ (self , rpc ):
184195 self .rpc = FakeConnectionRPCObject (rpc )
185196 self ._session = FakeSession ()
197+ self ._device_handler = JunosDeviceHandler ({})
186198
187199
188200class FakeSession :
You can’t perform that action at this time.
0 commit comments