maestro-server/discovery-api

View on GitHub
app/repository/providers/aws/aws_mapper/aws_list_layers.py

Summary

Maintainability
A
0 mins
Test Coverage
F
50%
def rules(conn):
    return {
        'name': {'call': 'switch', 'source': 'LayerVersionArn'},
        'unique_id': {'call': 'switch', 'source': 'LayerVersionArn'},
        'created_at': {'call': 'switch', 'source': 'CreationDate'},
        'updated_at': {'call': 'switch', 'source': 'CreationDate'},
        'provider': {'call': 'setV', 'source': 'Lambda Layer (AWS)'},

        'family': {'call': 'setV', 'source': 'ServerlessLayer'},
        'Description': {'call': 'setV', 'source': 'Description'},
        'runtimes': {'call': 'setV', 'source': 'CompatibleRuntimes'},
        'license_info': {'call': 'setV', 'source': 'LicenseInfo'},
        'version': {'call': 'setV', 'source': 'Version'},

        'active': {'call': 'setV', 'source': True},
        'datacenters': {'call': 'fctDcApp',
                        'source': {**conn}},
        'own': {'call': 'setV', 'source': 1},
        'owner': {'call': 'fctOwner',
                  'source': {**conn}},
        'accountant': {'call': 'fctAccountant', 'source': {**conn}},
        'roles': {'call': 'fctRoles',
                  'source': {**conn}},
        'checksum': {'call': 'checksum',
                     'source': None}
    }