What do you mean by logs into juniper? A Juniper router/swith?
'ip': hostname, must be pointing to a Juniper device ... 'device_type': 'cisco_nxos', ,, does not mean to find and login to only cisco_nxos .. its for handling commands and output from the device. 'ip': hostname, the hostname must be the device you want to login.