def register_deployable_on_tier(ts, deployable, attributes):
    """
    Deployable registration callback.
    'deployable' is from table 'deployables'.
    """
    pk = {'tier_name': deployable['tier_name'], 'deployable_name':
        deployable['deployable_name']}
    row = ts.get_table('routing').get(pk)
    if row is None:
        row = ts.get_table('routing').add(pk)
    row.update(attributes)
