cloudfoundry/cloud_controller_ng — pull request #316 by youngm (2014-11-26 19:22:20+00:00)
Title: More flexible nested domain creation rules.

This is the PR for Issue https://github.com/cloudfoundry/cloud_controller_ng/issues/311.

This PR changes domain and route creation in the following ways:

* You can now create private and shared sub domains of a shared domain
* You can now create shared parent domains of private and shared domains
* You can now create private sub and parent domains of private domains if all are in the same org
* When a domain is created a check for matching routes is done
* When a route is created a check for matching domains is done
* You cannot create a shared domain with a parent private domain

This has some tricky logic but I believe I got all of the use cases covered in tests.