Skip to content

Commit 67ded29

Browse files
Changing to scanning accounts endpoint (#120)
* Changing to scanning fronted accounts endpoint * Adding additional metadata for import * Bumping version
1 parent 1f33462 commit 67ded29

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sdcclient/_scanning.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def get_latest_pdf_report_by_digest(self, image_digest, full_tag=None):
329329

330330
return [True, res.content]
331331

332-
def import_image(self, infile, sync=False):
332+
def import_image(self, infile, image_id, digest_id, image_name, sync=False):
333333
'''**Description**
334334
Import an image archive
335335
@@ -350,7 +350,8 @@ def import_image(self, infile, sync=False):
350350
else:
351351
url = self.url + "/api/scanning/v1/import/images"
352352

353-
headers = {'Authorization': 'Bearer ' + self.token, 'Content-Type': m.content_type}
353+
headers = {'Authorization': 'Bearer ' + self.token, 'Content-Type': m.content_type,
354+
'imageId': image_id, 'digestId': digest_id, 'imageName': image_name}
354355
res = requests.post(url, data=m, headers=headers, verify=self.ssl_verify)
355356
if not self._checkResponse(res):
356357
return [False, self.lasterr]
@@ -370,7 +371,7 @@ def get_anchore_users_account(self):
370371
**Success Return Value**
371372
A JSON object containing user account information.
372373
'''
373-
url = self.url + "/api/scanning/v1/anchore/account"
374+
url = self.url + "/api/scanning/v1/account"
374375
res = requests.get(url, headers=self.hdrs, verify=self.ssl_verify)
375376
if not self._checkResponse(res):
376377
return [False, self.lasterr]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from setuptools import setup
22

33
setup(name='sdcclient',
4-
version='0.10.0',
4+
version='0.11.0',
55
description='Python client for Sysdig Cloud',
66
url='http://github.com/draios/python-sdc-client',
77
author='sysdig Inc.',

0 commit comments

Comments
 (0)