'Re-size the volume.
Note: \'is_infinite\' needs to be set to True in order to rename an
Infinite Volume.'

def resize_volume(self):

    if self.is_infinite:
        volume_resize = netapp_utils.zapi.NaElement.create_node_with_children('volume-size-async', **{'volume-name': self.name, 'new-size': str(self.size)})
    else:
        volume_resize = netapp_utils.zapi.NaElement.create_node_with_children('volume-size', **{'volume': self.name, 'new-size': str(self.size)})
    try:
        self.server.invoke_successfully(volume_resize, enable_tunneling=True)
    except netapp_utils.zapi.NaApiError as e:
        self.module.fail_json(msg=('Error    re-sizing    volume    %s:    %s' % (self.name, to_native(e))), exception=traceback.format_exc())
