Refaftor get_nailgun_node_by_devops_node method

Change-Id: I5c70e19dc3e984cc5486a7f82bb312100b410cfd