def create_relation_relationship(manager, relation_handle_id, other_handle_id, rel_type):
    """
    Makes relationship between the two nodes and returns the relationship.
    If a relationship is not possible NoRelationshipPossible exception is
    raised.
    """
    other_meta_type = get_node_meta_type(manager, other_handle_id)
    if other_meta_type == 'Logical':
        if rel_type in ['Uses', 'Provides']:
            return _create_relationship(manager, relation_handle_id, other_handle_id, rel_type)
    elif other_meta_type == 'Location' and rel_type == 'Responsible_for':
        return _create_relationship(manager, relation_handle_id, other_handle_id, rel_type)
    elif other_meta_type == 'Physical':
        if rel_type in ['Owns', 'Provides']:
            return _create_relationship(manager, relation_handle_id, other_handle_id, rel_type)
    raise exceptions.NoRelationshipPossible(relation_handle_id, 'Relation', other_handle_id, other_meta_type, rel_type)
def create_relation_relationship ( manager , relation_handle_id , other_handle_id , rel_type ) : other_meta_type = get_node_meta_type ( manager , other_handle_id ) if other_meta_type == 'Logical' : if rel_type in [ 'Uses' , 'Provides' ] : return _create_relationship ( manager , relation_handle_id , other_handle_id , rel_type ) elif other_meta_type == 'Location' and rel_type == 'Responsible_for' : return _create_relationship ( manager , relation_handle_id , other_handle_id , rel_type ) elif other_meta_type == 'Physical' : if rel_type in [ 'Owns' , 'Provides' ] : return _create_relationship ( manager , relation_handle_id , other_handle_id , rel_type ) raise exceptions . NoRelationshipPossible ( relation_handle_id , 'Relation' , other_handle_id , other_meta_type , rel_type )
Makes relationship between the two nodes and returns the relationship.
    If a relationship is not possible NoRelationshipPossible exception is
    raised.