#NEWLINE# def update_zone( self , zone , domain = None , type = None , ttl = None , extra = None ) : #NEWLINE# #INDENT# params = { #NEWLINE# #INDENT# 'id' : zone . id , #NEWLINE# #UNINDENT# } #NEWLINE# if domain : #NEWLINE# #INDENT# params [ 'name' ] = domain #NEWLINE# #UNINDENT# if type : #NEWLINE# #INDENT# params [ 'type' ] = type #NEWLINE# #UNINDENT# self . connection . set_context ( { #NEWLINE# #INDENT# 'resource' : 'zone' , #NEWLINE# 'id' : zone . id , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . connection . request ( ( API_ROOT + '/dns/zone/' ) , data = json . dumps ( params ) , method = 'PUT' ) . object #NEWLINE# updated_zone = get_new_obj ( obj = zone , klass = Zone , attributes = { #NEWLINE# #INDENT# 'domain' : domain , #NEWLINE# 'type' : type , #NEWLINE# 'ttl' : ttl , #NEWLINE# 'extra' : extra , #NEWLINE# #UNINDENT# } ) #NEWLINE# return updated_zone