@classmethod
def _from_object(cls, context, obj):
    """Construct a node from node object.

        @param context: the context used for DB operations;
        @param obj: a node object that contains all fields;
        """
    kwargs = {'id': obj.id, 'physical_id': obj.physical_id, 'user': obj.
        user, 'project': obj.project, 'domain': obj.domain, 'index': obj.
        index, 'role': obj.role, 'init_at': obj.init_at, 'created_at': obj.
        created_at, 'updated_at': obj.updated_at, 'status': obj.status,
        'status_reason': obj.status_reason, 'data': obj.data, 'metadata':
        obj.metadata, 'dependents': obj.dependents}
    return cls(obj.name, obj.profile_id, obj.cluster_id, context=context,
        **kwargs)
