'Resize a drive.
:param drive: Drive to resize.
:param size: New drive size in bytes.
:type size: ``int``
:return: Drive object which is being resized.
:rtype: :class:`.CloudSigmaDrive`'

def ex_resize_drive(self, drive, size):

    path = ('/drives/%s/action/' % drive.id)
    data = {'name': drive.name, 'size': size, 'media': 'disk'}
    response = self._perform_action(path=path, action='resize', method='POST', data=data)
    drive = self._to_drive(data=response.object['objects'][0])
    return drive
