@@ -329,7 +329,7 @@ def get_latest_pdf_report_by_digest(self, image_digest, full_tag=None):
329
329
330
330
return [True , res .content ]
331
331
332
- def import_image (self , infile , sync = False ):
332
+ def import_image (self , infile , image_id , digest_id , image_name , sync = False ):
333
333
'''**Description**
334
334
Import an image archive
335
335
@@ -350,7 +350,8 @@ def import_image(self, infile, sync=False):
350
350
else :
351
351
url = self .url + "/api/scanning/v1/import/images"
352
352
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 }
354
355
res = requests .post (url , data = m , headers = headers , verify = self .ssl_verify )
355
356
if not self ._checkResponse (res ):
356
357
return [False , self .lasterr ]
@@ -370,7 +371,7 @@ def get_anchore_users_account(self):
370
371
**Success Return Value**
371
372
A JSON object containing user account information.
372
373
'''
373
- url = self .url + "/api/scanning/v1/anchore/ account"
374
+ url = self .url + "/api/scanning/v1/account"
374
375
res = requests .get (url , headers = self .hdrs , verify = self .ssl_verify )
375
376
if not self ._checkResponse (res ):
376
377
return [False , self .lasterr ]
0 commit comments