So, Deployment.find_key cannot be used if the passed deployment_id is a name (which is the default) because Deployment names are only unique within a given barclamp - they are not globally unique.  I just fixed this same issue in the NetworkUtils.find_network() method.  Take a look there to see how I'm handling the deployment_id.