Ejemplo n.º 1
0
def add_ps_nodes():
    #it would be better to use the TopologyProvider.getInstance but that isn't working. Hence this tempoary code
    estopo = ESnetTopology()

    if (estopo):
        links = estopo.getLinks()
        for link in links:
            if "pt" in link:

                desc=ESnetTopology.idToDescription(link)
                
                ps_node= PerfSONARTester()

                node_name = desc[3:]
                ps_node.setResourceName(node_name)
                ps_node.addLink(links.get(link))
                perf_testers[node_name+'.es.net'] = ps_node
Ejemplo n.º 2
0
def add_ps_nodes():
    #it would be better to use the TopologyProvider.getInstance but that isn't working. Hence this tempoary code
    estopo = ESnetTopology()

    if (estopo):
        links = estopo.getLinks()
        for link in links:
            if "pt" in link:

                desc = ESnetTopology.idToDescription(link)

                ps_node = PerfSONARTester()

                node_name = desc[3:]
                ps_node.setResourceName(node_name)
                ps_node.addLink(links.get(link))
                perf_testers[node_name + '.es.net'] = ps_node
Ejemplo n.º 3
0
        i.setSpeed(interface[1])
        i.setIfLinks(ArrayList())
        i.setVlans(ArrayList())
        for vlan in interface[2]:
            i.getVlans().add(vlan)
        link = DataTransferNodeLink()
        link.setHostPort(links[0])
        link.setCapacity(links[1])
        link.setRemoteId(links[2])
        i.getIfLinks().add(link)
        dtn.getInterfaces().add(i)
    dtn.save()


# Register ESnetTopology as the defaul local layer2 topology provider
ESnetTopology.registerToFactory()

createDTN(
    name="bnl-diskpt1",
    type="10000000000",
    interfaces=[["eth2", "10000000000", ["3609", "834", "3179", "343",
                                         "916"]]],
    links=["eth2", "10000000000", "urn:ogf:network:es.net:bnl-mr3:xe-7/3/0"],
)

createDTN(
    name="lbl-diskpt1",
    type="10000000000",
    interfaces=[["eth2", "10000000000", ["1300", "3609", "246", "202",
                                         "916"]]],
    links=["eth2", "10000000000", "urn:ogf:network:es.net:lbl-mr2:xe-9/3/0"],
Ejemplo n.º 4
0
        i.setSpeed(interface[1])
        i.setIfLinks(ArrayList())
        i.setVlans(ArrayList())
        for vlan in interface[2]:
            i.getVlans().add(vlan)
        link = DataTransferNodeLink()
        link.setHostPort(links[0])
        link.setCapacity(links[1])
        link.setRemoteId(links[2])
        i.getIfLinks().add(link)
        dtn.getInterfaces().add(i)
    dtn.save()


# Register ESnetTopology as the defaul local layer2 topology provider
ESnetTopology.registerToFactory()

# Register ESnet as the defaul local layer2 network provider
ESnet.registerToFactory()

createDTN(
    name="bnl-diskpt1",
    type="10000000000",
    interfaces=[["eth2", "10000000000", ["3609", "834", "3179", "343", "916"]]],
    links=["eth2", "10000000000", "urn:ogf:network:es.net:bnl-mr3:xe-7/3/0"],
)

createDTN(
    name="lbl-diskpt1",
    type="10000000000",
    interfaces=[["eth2", "10000000000", ["1300", "3609", "246", "202", "916"]]],
Ejemplo n.º 5
0
# software, please contact Berkeley Lab's Innovation & Partnerships
# Office at [email protected].
#
# NOTICE.  This Software was developed under funding from the
# U.S. Department of Energy and the U.S. Government consequently retains
# certain rights. As such, the U.S. Government has been granted for
# itself and others acting on its behalf a paid-up, nonexclusive,
# irrevocable, worldwide license in the Software to reproduce,
# distribute copies to the public, prepare derivative works, and perform
# publicly and display publicly, and to permit other to do so.
#
from net.es.enos.esnet import ESnetTopology,OSCARSReservations
from org.joda.time import DateTime

if not 'esnet' in globals():
    globals()['esnet'] = ESnetTopology()

def makeURN (node,domain="es.net",port="",link=""):
    """
    makeURN takes the name and domain of a node and builds a URN following the NMWG
    topology format that is used by IDCP that OSCARS implements. The format is as follow:
            urn:ogf:network:domain:node:port:link

    for instance: urn:ogf:network:domain=es.net:node=denv-cr5:port=9/1/4:link=*

    :param node: node name, i.e. star-cr5
    :param domain: domain name. Default is es.net
    :param port
    :param link
    :return: string
    """