Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def firewall_device_list_xml():
- firewall_device_list_response = s.post(_csm_server+'configservice/getDeviceListByType', data=firewall_device_list_body)
- firewall_device_list_response_text = firewall_device_list_response.text
- tree = ET.fromstring(firewall_device_list_response_text)
- fwdata = "null"
- for firewall_elemments in tree.findall('.//'):
- for elements in firewall_elemments:
- tag = elements.tag
- text = elements.text
- if tag == "deviceName" and "W2-DEV" in text:
- fwdata = text
- if tag == "gid" and "W2-DEV" in fwdata:
- fwdata = fwdata + " : " + text
- print fwdata
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement