Skip to content

Commit

Permalink
Merge branch 'fix-list-of-volume-objects' into 'develop'
Browse files Browse the repository at this point in the history
Fix list of volume objects

See merge request core/sevenbridges-python!99
  • Loading branch information
Ivan Djordjevic committed Jun 29, 2022
2 parents b3e1401 + 388b804 commit e028642
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ test:3.9:

sonar:
stage: sonar
image: emeraldsquad/sonar-scanner:1.0.0
image: emeraldsquad/sonar-scanner:2.2.0
script: infinity sonar scanner
allow_failure: true
dependencies:
Expand Down
11 changes: 8 additions & 3 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2025,9 +2025,10 @@ Managing DRS bulk imports
-------------------------

The following operations are supported for drs bulk imports:
- ``result_files`` - Retrieve files that were successfully imported
- ``bulk_get()`` - Retrieve DRS bulk import details
- ``bulk_submit()`` - Submit DRS bulk import

- ``bulk_get()`` - Retrieve DRS bulk import details.
- ``bulk_submit()`` - Submit DRS bulk import.


Properties
~~~~~~~~~~
Expand All @@ -2046,10 +2047,14 @@ Each drs bulk import has the following properties:

``finished_on`` - Contains the date and time when the import job finished.

``result_files`` - List of files that were successfully imported.


Examples
~~~~~~~~

.. code:: python
project = api.project.get('user/project')
import_data = [
{
Expand Down
6 changes: 4 additions & 2 deletions sevenbridges/models/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,17 @@ def save(self, inplace=True):
else:
raise ResourceNotModified()

def list(self, prefix=None, limit=None):
def list(self, prefix=None, limit=None, fields='_all'):
params = {}
if prefix:
params['prefix'] = prefix
if limit:
params['limit'] = limit
params['fields'] = fields

data = self._api.get(
url=self._URL['list'].format(id=self.id), params=params).json()
url=self._URL['list'].format(id=self.id), params=params
).json()

href = data['href']
links = [VolumeLink(**link) for link in data['links']]
Expand Down

0 comments on commit e028642

Please sign in to comment.