The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perfSONAR_PS::Topology::Common - A module that provides various utility functions for Topology structures.

DESCRIPTION

This module contains a set of utility functions that are used to interact with Topology structures.

SYNOPSIS

DETAILS

API

mergeNodes_general($old_node, $new_node, $attrs)

    Takes two LibXML nodes containing structures and merges them together.
    The $attrs variable is a pointer to a hash describing which attributes
    on a node should be compared to define equality.

    To have links compared based on their 'id' attribute, you would specify $attrs as such:

    my %attrs = (
            link => ( id => '' );
            );

domainReplaceChild($domain, $new_node, $id)

    Take a domain, a node and its fqid and replaces any children that are
    "IdRef'd" to the node with the actual node.

nodeReplaceChild($node, $new_port, $id)

    Take a node, a port and its fqid and replaces any children that are
    "IdRef'd" to the port with the actual port.

portReplaceChild($port, $new_link, $id)

    Take a port, a link and its fqid and replaces any children that are
    "IdRef'd" to the link with the actual link.

topologyNormalize($topology)

    Takes a topology structure and normalizes it into
    "domain/node/port/link" format. If a stray node/port/link is found, it
    is moved up to the top-level if it's not already there.

getTopologyNamespaces()

    Returns the set of prefix/uri mappings for Topology in a hash table.

validateDomain($domain, $domain_ids)

    Does some basic validation of the specified domain.$domain_ids is a
    pointer to a hash containing the set of domain ids. The function will
    add an entry for this domain to the hash. 

validateNode($node, $node_ids, $parent)

    Does some basic validation of the specified node. $node_ids is a
    pointer to a hash containing the set of node ids. The function will add
    an entry for this node to the hash. $parent is the FQ ID of the parent
    of this element. If the element has no parent, it is simply "".

validatePort($port, $port_ids, $parent)

    Does some basic validation of the specified port. $port_ids is a
    pointer to a hash containing the set of port ids. The function will add
    an entry for this port to the hash. $parent is the FQ ID of the parent
    of this element. If the element has no parent, it is simply "".
    Does some basic validation of the specified link. $link_ids is a
    pointer to a hash containing the set of link ids. The function will add
    an entry for this link to the hash. $parent is the FQ ID of the parent of this
    element. If the element has no parent, it is simply "".

    =head1 SEE ALSO

    To join the 'perfSONAR-PS' mailing list, please visit:

    https://mail.internet2.edu/wws/info/i2-perfsonar

    The perfSONAR-PS subversion repository is located at:

    https://svn.internet2.edu/svn/perfSONAR-PS

    Questions and comments can be directed to the author, or the mailing list.

    =head1 VERSION

    $Id$

    =head1 AUTHOR

    Aaron Brown, E<lt>aaron@internet2.eduE<gt>

    =head1 LICENSE

    You should have received a copy of the Internet2 Intellectual Property Framework along
    with this software.  If not, see <http://www.internet2.edu/membership/ip.html>

    =head1 COPYRIGHT

    Copyright (c) 2004-2007, Internet2 and the University of Delaware

    All rights reserved.

    =cut
# vim: expandtab shiftwidth=4 tabstop=4