code: def destroy_volume(agent, role):
      
      volumes = []
      agent_id = agent['id']
  
      reserved_resources_full = agent.get('reserved_resources_full', None)
      if not reserved_resources_full:
          # doesn't exist
          return True
  
      reserved_resources = reserved_resources_full.get(role, None)
      if not reserved_resources:
          # doesn't exist
          return True
  
      for reserved_resource in reserved_resources:
          name = reserved_resource.get('name', None)
          disk = reserved_resource.get('disk', None)
  
          if name == 'disk' and disk is not None and 'persistence' in disk:
              volumes.append(reserved_resource)
  
      req_url = urljoin(master_url(), 'destroy-volumes')
      data = {
          'slaveId': agent_id,
          'volumes': json.dumps(volumes)
      }
  
      success = False
      try:
          response = http.post(req_url, data=data)
          success = 200 <= response.status_code < 300
          if response.status_code == 409:
              # thoughts on what to do here? throw exception
              # i would rather not print
              print('''###\nIs a framework using these resources still installed?\n###''')
      except DCOSHTTPException as e:
          print("HTTP {}: Unabled to delete volume based on: {}".format(
              e.response.status_code,
              e.response.text))
  
      return success
docs: Deletes the volumes on the specific agent for the role