@@ -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 ]
0 commit comments