#NEWLINE# def _hostname( self , fqdn ) : #NEWLINE# #INDENT# '\n        Asserts that the given FQDN belong to the configured zone and\n        returns the hostname.\n\n        # Params:\n\n        - `fqdn`: full qualified domain name to retrieve the hostname from.\n        ' #NEWLINE# zone = ( '.' + self . zone ) #NEWLINE# assert fqdn . endswith ( zone ) #NEWLINE# return fqdn [ : ( - len ( zone ) ) ]