Exemplo n.º 1
0
def test_scFuction(controller_ip):
    sc_func = SvcChain(controller_ip)
    init_connection(sc_func)
    sc_func.set_vnf_type("s2",const.FIREWALL)
    sc_func.set_vnf_type("s3",const.NAT)
    sc_func.set_vnf_type("s4",const.LOADBALANCE)
    tplt = sc_func.define_sc_tplt(":".join([const.FIREWALL,const.NAT,const.LOADBALANCE]),"template_1")
    tpId = tplt.id
    print(tpId)
    inst = sc_func.define_sc_inst(tpId, "tcp", 80)
    print(inst.id)
    sc_func.define_sc_app("host:10.0.0.1", inst.id)
Exemplo n.º 2
0
def test_scFuction(controller_ip):
    sc_func = SvcChain(controller_ip)
    init_connection(sc_func)
    sc_func.set_vnf_type("s2", const.FIREWALL)
    sc_func.set_vnf_type("s3", const.NAT)
    sc_func.set_vnf_type("s4", const.LOADBALANCE)
    tplt = sc_func.define_sc_tplt(
        ":".join([const.FIREWALL, const.NAT, const.LOADBALANCE]), "template_1")
    tpId = tplt.id
    print(tpId)
    inst = sc_func.define_sc_inst(tpId, "tcp", 80)
    print(inst.id)
    sc_func.define_sc_app("host:10.0.0.1", inst.id)