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


perfSONAR_PS-Topology-Common documentation  | view source Contained in the perfSONAR_PS-Topology-Common distribution.

Index


DESCRIPTION

Top

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

SYNOPSIS

Top

DETAILS

Top

API

Top

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.

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 "".


perfSONAR_PS-Topology-Common documentation  | view source Contained in the perfSONAR_PS-Topology-Common distribution.