def get_descriptor_defaults(self, api_info, hostname=None):
if self.__request:<EOL><INDENT>hostname = self.__request.reconstruct_hostname()<EOL>protocol = self.__request.url_scheme<EOL><DEDENT>else:<EOL><INDENT>hostname = (hostname or util.get_app_hostname() or<EOL>api_info.hostname)<EOL>protocol = '<STR_LIT:http>' if ((hostname and hostname.startswith('<STR_LIT:localhost>')) or<EOL>util.is_running_on_devserver()) else '<STR_LIT>'<EOL><DEDENT>full_base_path = '<STR_LIT>'.format(api_info.base_path,<EOL>api_info.name,<EOL>api_info.path_version)<EOL>base_url = '<STR_LIT>'.format(protocol, hostname, full_base_path)<EOL>root_url = '<STR_LIT>'.format(protocol, hostname, api_info.base_path)<EOL>defaults = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT:id>': '<STR_LIT>'.format(api_info.name, api_info.path_version),<EOL>'<STR_LIT:name>': api_info.name,<EOL>'<STR_LIT:version>': api_info.api_version,<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>},<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'.format(api_info.name, api_info.path_version),<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': full_base_path,<EOL>'<STR_LIT>': root_url,<EOL>'<STR_LIT>': base_url,<EOL>'<STR_LIT:description>': '<STR_LIT>',<EOL>}<EOL>if api_info.description:<EOL><INDENT>defaults['<STR_LIT:description>'] = api_info.description<EOL><DEDENT>if api_info.title:<EOL><INDENT>defaults['<STR_LIT:title>'] = api_info.title<EOL><DEDENT>if api_info.documentation:<EOL><INDENT>defaults['<STR_LIT>'] = api_info.documentation<EOL><DEDENT>if api_info.canonical_name:<EOL><INDENT>defaults['<STR_LIT>'] = api_info.canonical_name<EOL><DEDENT>return defaults<EOL>
Gets a default configuration for a service.

        Args:
          api_info: _ApiInfo object for this service.
          hostname: string, Hostname of the API, to override the value set on the
            current service. Defaults to None.

        Returns:
          A dictionary with the default configuration.