sregistry/main/aws/api.py
def get_manifest(self, repo_name, tag):
    '''return the image manifest via the aws client, saved in self.manifest
    '''

    image = None
    repo = self.aws.describe_images(repositoryName=repo_name)
    if 'imageDetails' in repo:
        for contender in repo.get('imageDetails'):
            if tag in contender['imageTags']:
                image = contender
                break

    # if the image isn't found, we need to exit
    if image is None:
        bot.exit('Cannot find %s:%s, is the uri correct?' %(repo_name, digest))

    digest = image['imageDigest']
    digests = self.aws.batch_get_image(repositoryName=repo_name, 
                                       imageIds=[{"imageDigest": digest,
                                                  "imageTag": tag}])

    self.manifest = json.loads(digests['images'][0]['imageManifest'])
    return self.manifest
def get_manifest(self, repo_name, tag):
    '''return the image manifest via the aws client, saved in self.manifest
    '''

    image = None
    repo = self.aws.describe_images(repositoryName=repo_name)
    if 'imageDetails' in repo:
        for contender in repo.get('imageDetails'):
            if tag in contender['imageTags']:
                image = contender
                break

    # if the image isn't found, we need to exit
    if image is None:
        bot.exit('Cannot find %s:%s, is the uri correct?' %(repo_name, digest))

    digest = image['imageDigest']
    digests = self.aws.batch_get_image(repositoryName=repo_name, 
                                       imageIds=[{"imageDigest": digest,
                                                  "imageTag": tag}])

    self.manifest = json.loads(digests['images'][0]['imageManifest'])
    return self.manifest
def get_manifest ( self , repo_name , tag ) : image = None repo = self . aws . describe_images ( repositoryName = repo_name ) if 'imageDetails' in repo : for contender in repo . get ( 'imageDetails' ) : if tag in contender [ 'imageTags' ] : image = contender break # if the image isn't found, we need to exit if image is None : bot . exit ( 'Cannot find %s:%s, is the uri correct?' % ( repo_name , digest ) ) digest = image [ 'imageDigest' ] digests = self . aws . batch_get_image ( repositoryName = repo_name , imageIds = [ { "imageDigest" : digest , "imageTag" : tag } ] ) self . manifest = json . loads ( digests [ 'images' ] [ 0 ] [ 'imageManifest' ] ) return self . manifest
return the image manifest via the aws client, saved in self.manifest
return the image manifest via the aws client saved in self . manifest