Ejemplo n.º 1
0
 def test_with_specific_target_and_vsys(self):
     import Panorama
     Panorama.VSYS = None  # this a Panorama instance
     assert list(Panorama.devices(targets=['target'], vsys_s=['vsys1', 'vsys2'])) == [('target', 'vsys1'),
                                                                                      ('target', 'vsys2')]
Ejemplo n.º 2
0
 def test_without_specify(self, requests_mock):
     import Panorama
     with open('test_data/devices_list.xml', 'r') as data_file:
         requests_mock.get(Panorama.URL, text=data_file.read())
     Panorama.VSYS = None  # this a Panorama instance
     assert list(Panorama.devices()) == [('target1', 'vsys1'), ('target1', 'vsys2'), ('target2', None)]
Ejemplo n.º 3
0
 def test_with_fw(self):
     import Panorama
     Panorama.VSYS = 'this is a FW instance'
     assert list(Panorama.devices()) == [(None, None)]