#NEWLINE# def update_target( self , target , name = None , address = None , extra = None ) : #NEWLINE# #INDENT# '\n        Update the properties of a backup target, only changing the serviceplan\n        is supported.\n\n        :param target: Backup target to update\n        :type  target: Instance of :class:`BackupTarget` or ``str``\n\n        :param name: Name of the target\n        :type name: ``str``\n\n        :param address: Hostname, FQDN, IP, file path etc.\n        :type address: ``str``\n\n        :param extra: (optional) Extra attributes (driver specific).\n        :type extra: ``dict``\n\n        :rtype: Instance of :class:`BackupTarget`\n        ' #NEWLINE# if ( extra is not None ) : #NEWLINE# #INDENT# service_plan = extra . get ( 'servicePlan' , DEFAULT_BACKUP_PLAN ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# service_plan = DEFAULT_BACKUP_PLAN #NEWLINE# #UNINDENT# request = ET . Element ( 'ModifyBackup' , { #NEWLINE# #INDENT# 'xmlns' : BACKUP_NS , #NEWLINE# #UNINDENT# } ) #NEWLINE# request . set ( 'servicePlan' , service_plan ) #NEWLINE# server_id = self . _target_to_target_address ( target ) #NEWLINE# self . connection . request_with_orgId_api_1 ( ( 'server/%s/backup/modify' % server_id ) , method = 'POST' , data = ET . tostring ( request ) ) . object #NEWLINE# if isinstance ( target , BackupTarget ) : #NEWLINE# #INDENT# target . extra = extra #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# target = self . ex_get_target_by_id ( server_id ) #NEWLINE# #UNINDENT# return service_plan