@classmethod
def _from_object(cls, context, obj):
    """Construct a cluster policy binding from database object.

        :param context: the context used for DB operations;
        :param obj: a cluster-policy binding object that contains all fields;
        """
    kwargs = {'id': obj.id, 'enabled': obj.enabled, 'data': obj.data,
        'last_op': obj.last_op, 'priority': obj.priority, 'cluster_name':
        obj.cluster.name, 'policy_name': obj.policy.name, 'policy_type':
        obj.policy.type}
    return cls(obj.cluster_id, obj.policy_id, context=context, **kwargs)
