maestro-server/discovery-api

View on GitHub
app/repository/providers/openstack/openstack_mapper/openstack_flavors.py

Summary

Maintainability
A
0 mins
Test Coverage
F
50%
def rules(conn):
    return {
        'name': {'call': 'switch', 'source': 'name'},
        'api_name': {'call': 'switch', 'source': 'name'},
        'unique_id': {'call': 'switch', 'source': 'id'},
        'memory': {'call': 'switchRam', 'source': 'ram'},
        'disk': {'call': 'switch', 'source': 'disk'},
        'vcpus': {'call': 'switch', 'source': 'vcpus'},
        'is_public': {'call': 'switch', 'source': 'is_public'},
        'service': {'call': 'switch', 'source': 'service'},
        'ephemeral': {'call': 'switch', 'source': 'ephemeral'},
        'provider': {'call': 'setV', 'source': 'OpenStack'},
        'datacenters': {'call': 'fctDcApp',
                        'source': {**conn}},
        'roles': {'call': 'fctRoles',
                  'source': {**conn}},
        'accountant': {'call': 'fctAccountant', 'source': {**conn}},
        'active': {'call': 'setV', 'source': True},
        'checksum': {'call': 'checksum',
                     'source': None}
    }