code: static Resource getOrCreateSubDeployment(final String deploymentName, final DeploymentUnit parent) {
          final Resource root = parent.getAttachment(DEPLOYMENT_RESOURCE);
          return getOrCreate(root, PathElement.pathElement(SUBDEPLOYMENT, deploymentName));
      }
docs: Gets or creates the a resource for the sub-deployment on the parent deployments resource.
  
  @param deploymentName the name of the deployment
  @param parent         the parent deployment used to find the parent resource
  
  @return the already registered resource or a newly created resource