def create_disk(self, description, lock=False, tags=None):
"""Create a new :class:`~qarnot.disk.Disk`.
:param str description: a short description of the disk
:param bool lock: prevents the disk to be removed accidentally
:param tags: custom tags
:type tags: list(`str`)
:rtype: :class:`qarnot.disk.Disk`
:returns: The created :class:`~qarnot.disk.Disk`.
:raises qarnot.exceptions.MaxDiskException: disk quota reached
:raises qarnot.exceptions.QarnotGenericException: API general error, see message for details
:raises qarnot.exceptions.UnauthorizedException: invalid credentials
"""
disk = Disk(self, description, lock=lock, tags=tags)
disk.create()
return disk
评论列表
文章目录