Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. network_device = {
  2. "ip_address": "172.1.1",
  3. "Vendor": "juniper",
  4. "username": "myuser",
  5. "password": "cisco234"
  6. }
  7.  
  8. # print(network_device["ip_address"])
  9.  
  10.  
  11. for key ,value in network_device.items():
  12. if key.casefold() == "vendor":
  13. if value.casefold() == "cisco":
  14. network_device.update({"plataform": "ios"})
  15. if value.casefold() == "juniper":
  16. network_device.update({"plataform": "junos"})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement