Exemplo n.º 1
0
Arquivo: sip.py Projeto: okamumu/relpy
def ftree_BLADE(OS, base, disk, memory, processor):
    Base = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(base)))
    CPU = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(processor)))
    Mem = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(memory)))
    RAID = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(disk)))
    OS = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(OS)))
    top = relpy.FTOrGate([Base, CPU, Mem, RAID, OS])
    return top
Exemplo n.º 2
0
Arquivo: sip.py Projeto: okamumu/relpy
def ftree_CLUSTER(BLADE, CM, appserver, nic, proxy, switch):
    CM1 = relpy.FTEvent(env.bdd, CM)
    CM2 = relpy.FTEvent(env.bdd, CM)
    esw1 = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(switch)))
    esw2 = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(switch)))
    esw3 = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(switch)))
    esw4 = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(switch)))
    SW = relpy.FTBasicEvent(env.bdd,
                            (relpy.Const(1) - relpy.CTMCExrss(appserver)))
    SWP = relpy.FTBasicEvent(env.bdd,
                             (relpy.Const(1) - relpy.CTMCExrss(proxy)))
    Node_A = relpy.FTEvent(env.bdd, BLADE)
    nic1_A = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_A = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_A = relpy.FTOrGate([nic1_A, esw1])
    eth2_A = relpy.FTOrGate([nic2_A, esw2])
    eth_A = relpy.FTAndGate([eth1_A, eth2_A])
    BS_A = relpy.FTOrGate([Node_A, eth_A])
    Node_B = relpy.FTEvent(env.bdd, BLADE)
    nic1_B = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_B = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_B = relpy.FTOrGate([nic1_B, esw1])
    eth2_B = relpy.FTOrGate([nic2_B, esw2])
    eth_B = relpy.FTAndGate([eth1_B, eth2_B])
    BS_B = relpy.FTOrGate([Node_B, eth_B])
    Node_C = relpy.FTEvent(env.bdd, BLADE)
    nic1_C = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_C = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_C = relpy.FTOrGate([nic1_C, esw1])
    eth2_C = relpy.FTOrGate([nic2_C, esw2])
    eth_C = relpy.FTAndGate([eth1_C, eth2_C])
    BS_C = relpy.FTOrGate([Node_C, eth_C])
    Node_D = relpy.FTEvent(env.bdd, BLADE)
    nic1_D = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_D = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_D = relpy.FTOrGate([nic1_D, esw3])
    eth2_D = relpy.FTOrGate([nic2_D, esw4])
    eth_D = relpy.FTAndGate([eth1_D, eth2_D])
    BS_D = relpy.FTOrGate([Node_D, eth_D])
    Node_E = relpy.FTEvent(env.bdd, BLADE)
    nic1_E = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_E = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_E = relpy.FTOrGate([nic1_E, esw3])
    eth2_E = relpy.FTOrGate([nic2_E, esw4])
    eth_E = relpy.FTAndGate([eth1_E, eth2_E])
    BS_E = relpy.FTOrGate([Node_E, eth_E])
    Node_F = relpy.FTEvent(env.bdd, BLADE)
    nic1_F = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_F = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_F = relpy.FTOrGate([nic1_F, esw3])
    eth2_F = relpy.FTOrGate([nic2_F, esw4])
    eth_F = relpy.FTAndGate([eth1_F, eth2_F])
    BS_F = relpy.FTOrGate([Node_F, eth_F])
    Node_G = relpy.FTEvent(env.bdd, BLADE)
    nic1_G = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_G = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_G = relpy.FTOrGate([nic1_G, esw1])
    eth2_G = relpy.FTOrGate([nic2_G, esw2])
    eth_G = relpy.FTAndGate([eth1_G, eth2_G])
    BS_G = relpy.FTOrGate([Node_G, eth_G])
    Node_H = relpy.FTEvent(env.bdd, BLADE)
    nic1_H = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    nic2_H = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(nic)))
    eth1_H = relpy.FTOrGate([nic1_H, esw3])
    eth2_H = relpy.FTOrGate([nic2_H, esw4])
    eth_H = relpy.FTAndGate([eth1_H, eth2_H])
    BS_H = relpy.FTOrGate([Node_H, eth_H])
    AS1 = relpy.FTOrGate([SW, BS_A, CM1])
    AS2 = relpy.FTOrGate([SW, BS_A, CM1])
    AS3 = relpy.FTOrGate([SW, BS_B, CM1])
    AS4 = relpy.FTOrGate([SW, BS_B, CM1])
    AS5 = relpy.FTOrGate([SW, BS_C, CM1])
    AS6 = relpy.FTOrGate([SW, BS_C, CM1])
    AS7 = relpy.FTOrGate([SW, BS_D, CM2])
    AS8 = relpy.FTOrGate([SW, BS_D, CM2])
    AS9 = relpy.FTOrGate([SW, BS_E, CM2])
    AS10 = relpy.FTOrGate([SW, BS_E, CM2])
    AS11 = relpy.FTOrGate([SW, BS_F, CM2])
    AS12 = relpy.FTOrGate([SW, BS_F, CM2])
    apps = relpy.FTKofnGate(
        relpy.Const(6).eval(env),
        relpy.Const(12).eval(env),
        [AS1, AS2, AS3, AS4, AS5, AS6, AS7, AS8, AS9, AS10, AS11, AS12])
    PX1 = relpy.FTOrGate([SWP, BS_G, CM1])
    PX2 = relpy.FTOrGate([SWP, BS_H, CM2])
    pxys = relpy.FTAndGate([PX1, PX2])
    top = relpy.FTOrGate([apps, pxys])
    return top
Exemplo n.º 3
0
Arquivo: sip.py Projeto: okamumu/relpy
def bind_u_nic(f_nic, nic):
    return (f_nic / (relpy.Const(1) - relpy.CTMCExrss(nic)))
Exemplo n.º 4
0
Arquivo: sip.py Projeto: okamumu/relpy
def ftree_CM(cooling, midplane, power):
    MP = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(midplane)))
    Cool = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(cooling)))
    Pwr = relpy.FTEvent(env.bdd, (relpy.Const(1) - relpy.CTMCExrss(power)))
    top = relpy.FTOrGate([MP, Cool, Pwr])
    return top
Exemplo n.º 5
0
Arquivo: sip.py Projeto: okamumu/relpy
def bind_u_esw(f_esw, switch):
    return (f_esw / (relpy.Const(1) - relpy.CTMCExrss(switch)))