EthernetClient:
Windows:
ip: 192.168.1.152
mac_adr: ‘X4:81:C7:BD:46:04'
Windows_Extnd:
ip: 192.168.1.151
mac_adr: 'X4:81:C7:BD:47:04'
WifiClient:
Windows:
ip: 192.168.1.154
mac_adr: 'X4:81:C7:BD:47:05’
MAC:
ip: 192.168.1.3
mac_adr: 'X4:81:C7:BD:47:06’
IOS:
ip: 192.168.1.4
mac_adr: 'X4:81:C7:BD:47:07’
This was the Yml file. From which i need to get ip and mac_adr for all keys. I reached upto get the all data
import yaml
a_yaml_file = open("../Test/example.yml")
parsed_yaml_file = yaml.load(a_yaml_file, Loader=yaml.FullLoader)
print(parsed_yaml_file["EthernetClient"])
print(parsed_yaml_file.get("WifiClient"))