# File lib/rhc/context_helper.rb, line 85
    def find_membership_container(opts={})
      domain, app = discover_domain_and_app
      if options.team_id.present?
        rest_client.find_team_by_id(options.team_id)
      elsif options.team_name.present?
        rest_client.find_team(options.team_name)
      elsif app && domain
        rest_client.find_application(domain, app)
      elsif domain
        rest_client.find_domain(domain)
      elsif opts && opts[:writable]
        raise ArgumentError, "You must specify a domain with -n, or a team with -t."
      else
        raise ArgumentError, "You must specify a domain with -n, an application with -a, or a team with -t."
      end
    end