mixcoatl/platform/storage_object.py
def all(cls, region_id, endpoint=None, **kwargs):
        """Get a list of all known storage objects.

        >>> StorageObject.all(region_id=100)
        [{'storage_object_id':1,...},{'storage_object_id':2,...}]

        :returns: list -- a list of :class:`StorageObject`
        :raises: StorageObjectException
        """
        r = Resource(cls.PATH, endpoint=endpoint)
        params = {'regionId': region_id}

        if 'detail' in kwargs:
            r.request_details = kwargs['detail']
        else:
            r.request_details = 'basic'

        if 'keys_only' in kwargs:
            keys_only = kwargs['keys_only']
        else:
            keys_only = False

        x = r.get(params=params)
        if r.last_error is None:
            if keys_only is True:
                results = [i[camelize(cls.PRIMARY_KEY)] for i in x[cls.COLLECTION_NAME]]
            else:
                results = [type(cls.__name__, (object,), i) for i in uncamel_keys(x)[uncamel(cls.COLLECTION_NAME)]]
            return results
        else:
            raise StorageObjectException(r.last_error)
Get a list of all known storage objects.

        >>> StorageObject.all(region_id=100)
        [{'storage_object_id':1,...},{'storage_object_id':2,...}]

        :returns: list -- a list of :class:`StorageObject`
        :raises: StorageObjectException
        
Get a list of all known storage objects.
Get a list of all known storage objects .
def all(cls, region_id, endpoint=None, **kwargs):
        r = Resource(cls.PATH, endpoint=endpoint)
        params = {'regionId': region_id}
        if 'detail' in kwargs:
            r.request_details = kwargs['detail']
        else:
            r.request_details = 'basic'
        if 'keys_only' in kwargs:
            keys_only = kwargs['keys_only']
        else:
            keys_only = False
        x = r.get(params=params)
        if r.last_error is None:
            if keys_only is True:
                results = [i[camelize(cls.PRIMARY_KEY)] for i in x[cls.COLLECTION_NAME]]
            else:
                results = [type(cls.__name__, (object,), i) for i in uncamel_keys(x)[uncamel(cls.COLLECTION_NAME)]]
            return results
        else:
            raise StorageObjectException(r.last_error)
def all ( cls , region_id , endpoint = None , ** kwargs ) : r = Resource ( cls . PATH , endpoint = endpoint ) params = { 'regionId' : region_id } if 'detail' in kwargs : r . request_details = kwargs [ 'detail' ] else : r . request_details = 'basic' if 'keys_only' in kwargs : keys_only = kwargs [ 'keys_only' ] else : keys_only = False x = r . get ( params = params ) if r . last_error is None : if keys_only is True : results = [ i [ camelize ( cls . PRIMARY_KEY ) ] for i in x [ cls . COLLECTION_NAME ] ] else : results = [ type ( cls . __name__ , ( object , ) , i ) for i in uncamel_keys ( x ) [ uncamel ( cls . COLLECTION_NAME ) ] ] return results else : raise StorageObjectException ( r . last_error )
Get a list of all known storage objects.
Get a list of all known storage objects .
"""Get a list of all known storage objects.

        >>> StorageObject.all(region_id=100)
        [{'storage_object_id':1,...},{'storage_object_id':2,...}]

        :returns: list -- a list of :class:`StorageObject`
        :raises: StorageObjectException
        """
- a list of :class:`StorageObject`
- a list of : class : ` StorageObject `
None
cls
region_id
endpoint