mixcoatl/infrastructure/volume.py
def snapshot(self, **kwargs):
        """Make a snapshot from a volume

        *This is not a part of the DCM API for Volume resources.
        It is a convenience wrapper around the Snapshot API from the
        perspective of an individual* :class:`Volume`

            .. warning::

                Snapshot creation is an asynchronous task.
                Specifying a callback will cause a blocking operation while the snapshot completes
                When using the callback, execution could block for a **VERY** long time.


        :param name: The name to assign the Snapshot. Default: `snap-<volume_id>-timestamp`
        :type name: str.
        :param description: Description of the snapshot. Default: `mixcoatl snapshot`
        :type description: str.
        :param budget: Budget to assign the snapshot. Default: :attr:`budget` of the current :class:`Volume`
        :type budget: int.
        :param callback: Optional callback to return the results.
        :type callback: func.
        :returns: :class:`Snapshot`
        :raises: :class:`VolumeSnapshotException`
        """
        tstamp = str(int(time.time()))
        if 'name' in kwargs:
            name = kwargs['name']
        else:
            name = 'snap-%s-%s' % (self.volume_id, tstamp)
        if 'description' in kwargs:
            description = kwargs['description']
        else:
            description = 'mixcoat snapshot'
        if 'budget' in kwargs:
            budget = kwargs['budget']
        else:
            budget = self.budget
        if 'callback' in kwargs:
            callback = kwargs['callback']
        else:
            callback = None
        try:
            return Snapshot.add_snapshot(self.volume_id,
                                         name,
                                         description,
                                         budget,
                                         callback=callback, endpoint=self.endpoint)
        except SnapshotException, e:
            raise VolumeSnapshotException(str(e))
Make a snapshot from a volume

        *This is not a part of the DCM API for Volume resources.
        It is a convenience wrapper around the Snapshot API from the
        perspective of an individual* :class:`Volume`

            .. warning::

                Snapshot creation is an asynchronous task.
                Specifying a callback will cause a blocking operation while the snapshot completes
                When using the callback, execution could block for a **VERY** long time.


        :param name: The name to assign the Snapshot. Default: `snap-<volume_id>-timestamp`
        :type name: str.
        :param description: Description of the snapshot. Default: `mixcoatl snapshot`
        :type description: str.
        :param budget: Budget to assign the snapshot. Default: :attr:`budget` of the current :class:`Volume`
        :type budget: int.
        :param callback: Optional callback to return the results.
        :type callback: func.
        :returns: :class:`Snapshot`
        :raises: :class:`VolumeSnapshotException`
        
Make a snapshot from a volume
This is not a part of the DCM API for Volume resources.
It is a convenience wrapper around the Snapshot API from the
perspective of an individual* :class:`Volume`



Snapshot creation is an asynchronous task.
Specifying a callback will cause a blocking operation while the snapshot completes
When using the callback, execution could block for a **VERY** long time.
Make a snapshot from a volume This is not a part of the DCM API for Volume resources . It is a convenience wrapper around the Snapshot API from the perspective of an individual * : class : ` Volume ` Snapshot creation is an asynchronous task . Specifying a callback will cause a blocking operation while the snapshot completes When using the callback execution could block for a ** VERY ** long time .
def snapshot(self, **kwargs):
        tstamp = str(int(time.time()))
        if 'name' in kwargs:
            name = kwargs['name']
        else:
            name = 'snap-%s-%s' % (self.volume_id, tstamp)
        if 'description' in kwargs:
            description = kwargs['description']
        else:
            description = 'mixcoat snapshot'
        if 'budget' in kwargs:
            budget = kwargs['budget']
        else:
            budget = self.budget
        if 'callback' in kwargs:
            callback = kwargs['callback']
        else:
            callback = None
        try:
            return Snapshot.add_snapshot(self.volume_id,
                                         name,
                                         description,
                                         budget,
                                         callback=callback, endpoint=self.endpoint)
        except SnapshotException, e:
            raise VolumeSnapshotException(str(e))
def snapshot ( self , ** kwargs ) : tstamp = str ( int ( time . time ( ) ) ) if 'name' in kwargs : name = kwargs [ 'name' ] else : name = 'snap-%s-%s' % ( self . volume_id , tstamp ) if 'description' in kwargs : description = kwargs [ 'description' ] else : description = 'mixcoat snapshot' if 'budget' in kwargs : budget = kwargs [ 'budget' ] else : budget = self . budget if 'callback' in kwargs : callback = kwargs [ 'callback' ] else : callback = None try : return Snapshot . add_snapshot ( self . volume_id , name , description , budget , callback = callback , endpoint = self . endpoint ) except SnapshotException , e : raise VolumeSnapshotException ( str ( e ) )
Make a snapshot from a volume
This is not a part of the DCM API for Volume resources.
Make a snapshot from a volume This is not a part of the DCM API for Volume resources .
"""Make a snapshot from a volume

        *This is not a part of the DCM API for Volume resources.
        It is a convenience wrapper around the Snapshot API from the
        perspective of an individual* :class:`Volume`

            .. warning::

                Snapshot creation is an asynchronous task.
                Specifying a callback will cause a blocking operation while the snapshot completes
                When using the callback, execution could block for a **VERY** long time.


        :param name: The name to assign the Snapshot. Default: `snap-<volume_id>-timestamp`
        :type name: str.
        :param description: Description of the snapshot. Default: `mixcoatl snapshot`
        :type description: str.
        :param budget: Budget to assign the snapshot. Default: :attr:`budget` of the current :class:`Volume`
        :type budget: int.
        :param callback: Optional callback to return the results.
        :type callback: func.
        :returns: :class:`Snapshot`
        :raises: :class:`VolumeSnapshotException`
        """
None
None
self
name
The name to assign the Snapshot. Default: `snap--timestamp`
The name to assign the Snapshot . Default : ` snap -- timestamp `
description
Description of the snapshot. Default: `mixcoatl snapshot`
Description of the snapshot . Default : ` mixcoatl snapshot `
budget
Budget to assign the snapshot. Default: :attr:`budget` of the current :class:`Volume`
Budget to assign the snapshot . Default : : attr : ` budget ` of the current : class : ` Volume `
callback
Optional callback to return the results.
Optional callback to return the results .