#NEWLINE# def create_zone( self , domain , type = 'master' , ttl = None , extra = None ) : #NEWLINE# #INDENT# '\n        Create a new zone.\n\n        :param zone_id: Zone domain name (e.g. example.com)\n        :type zone_id: ``str``\n\n        :rtype: :class:`Zone`\n        ' #NEWLINE# action = '/app/dns/addzone.jsp?' #NEWLINE# params = { #NEWLINE# #INDENT# 'name' : domain , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# self . connection . request ( action = action , params = params ) #NEWLINE# #UNINDENT# except ZonomiException : #NEWLINE# #INDENT# e = sys . exc_info ( ) [ 1 ] #NEWLINE# if ( e . message == 'ERROR: This zone is already in your zone list.' ) : #NEWLINE# #INDENT# raise ZoneAlreadyExistsError ( zone_id = domain , driver = self , value = e . message ) #NEWLINE# #UNINDENT# raise e #NEWLINE# #UNINDENT# zone = Zone ( id = domain , domain = domain , type = 'master' , ttl = ttl , driver = self , extra = extra ) #NEWLINE# return zone