Esempio n. 1
0
    def data(self):
        # Populate Clusto
        ServerClass("Class 5")
        HostState("up")
        h1 = Class5Server("hostname1.lindenlab.com")
        h1.serial_number = "SM55880"
        h1.set_port_attr("nic-eth", 1, "mac", "aa:bb:cc:11:22:33")
        h1.set_port_attr("nic-eth", 2, "mac", "aa:bb:cc:11:22:34")

        dfw = LindenDatacenter("DFW", "1234 Anywhere", "123 Anywhere street", "*****@*****.**")
        phx = LindenDatacenter("PHX", "1234 Anywhere", "123 Anywhere street", "*****@*****.**")

        rack1 = LindenRack("c1.01.1000")
        rack2 = LindenRack("c3.03.2000")

        dfw.insert(rack1)
        phx.insert(rack2)

        ServerClass("Class 7")
        chassis = Class7Chassis()
        rack1.insert(chassis, [1, 2])
        class7 = Class7Server("hostname2.lindenlab.com")
        class7.serial_number = "SM55880"
        class7.set_port_attr("nic-eth", 1, "mac", "aa:bb:cc:11:22:96")
        class7.set_port_attr("nic-eth", 2, "mac", "aa:bb:cc:11:22:97")

        chassis.insert(class7)
        
        rack2.insert(h1, 1)
Esempio n. 2
0
 def data(self):
     # Populate Clusto
     HostState("up")
     rack = LindenRack("c2-02-00")
     ServerClass("Class 5")
     h1 = Class5Server("hostname1.lindenlab.com")
     h2 = Class5Server("hostname2.lindenlab.com")
     rack.insert(h1, 1)
     rack.insert(h2, 2)
Esempio n. 3
0
    def data(self):
        # Populate Clusto                                                                                                       
        ServerClass("Class 5")
        HostState("up")
        h1 = Class5Server("hostname1.lindenlab.com")
        h1.serial_number = "SM55880"
        h1.set_port_attr("nic-eth", 1, "mac", "aa:bb:cc:11:22:33")
        h1.set_port_attr("nic-eth", 2, "mac", "aa:bb:cc:11:22:34")

        dfw = LindenDatacenter("DFW", "1234 Anywhere", "123 Anywhere street", "*****@*****.**")

        rack1 = LindenRack("c1.01.1000")
        dfw.insert(rack1)

        pdu = LindenPDU()
        pdu.set_port_attr("nic-eth", 1, "mac", "aa:bb:cc:11:22:12")
        pdu.hostname = "pdu1.lindenlab.com"
        pdu.connect_ports("pwr-nema-5",1,h1,1)

        rack1.attach_pdu(pdu)
        rack1.insert(h1, 1)
Esempio n. 4
0
    def data(self):
        # Populate Clusto
        ServerClass("Class 5")
        HostState("up")
        h1 = Class5Server("hostname1.lindenlab.com")
        h2 = Class5Server("hostname2.lindenlab.com")

        rack1 = LindenRack("c3-03-100")
        rack2 = LindenRack("c3-03-200")

        ServerClass("Class 7")

        chassis1 = Class7Chassis()
        chassis2 = Class7Chassis()

        class7_1 = Class7Server("hostname3.lindenlab.com")
        class7_2 = Class7Server("hostname4.lindenlab.com")
        
        chassis1.insert(class7_1)
        chassis2.insert(class7_2)

        rack2.insert(h1, 1)

        rack1.insert(chassis1, [1, 2])
        rack1.insert(chassis2, [3, 4])
        rack1.insert(h2, 5)