Example #1
0
    class MyFrame(FrameBase):
        static_nodes = FrameNode(StaticNode, STATIC_NODE_NUM)
        dynamic_nodes = FrameNode(DynamicNode, DYNAMIC_NODE_NUM)

        def __init__(self):
            super().__init__(enable_snapshot=enable_snapshot,
                             total_snapshot=total_snapshot)
Example #2
0
class TestFrame(FrameBase):
    node1 = FrameNode(TestNode1, NODE1_NUMBER)
    node2 = FrameNode(TestNode2, NODE2_NUMBER)

    def __init__(self, backend_name):
        super().__init__(enable_snapshot=True,
                         total_snapshot=TAKE_SNAPSHOT_TIME, backend_name=backend_name)
Example #3
0
class RetailFrame(FrameBase):
    warehouses = FrameNode(Warehouse, TOTAL_WAREHOUSES)
    stores = FrameNode(Store, TOTAL_STORES)

    def __init__(self):
        # If your actual frame number was more than the total snapshot number, the old snapshots would be rolling replaced.
        super().__init__(enable_snapshot=True, total_snapshot=TOTAL_SNAPSHOT)
Example #4
0
    class CitibikeFrame(FrameBase):
        stations = FrameNode(Station, station_num)
        # for adj frame, we only need 1 node to hold the data
        matrices = FrameNode(matrices_cls, 1)

        def __init__(self):
            super().__init__(enable_snapshot=True,
                             total_snapshot=snapshots_num)
Example #5
0
    class EcrFrame(FrameBase):
        """Our ecr frame that contains vessels, ports, and a general matrix"""
        vessels = FrameNode(vessel_cls, vessel_num)
        ports = FrameNode(Port, port_num)
        matrix = FrameNode(matrix_cls, 1)

        def __init__(self):
            super().__init__(enable_snapshot=True, total_snapshot=snapshots_num)
Example #6
0
        class TestFrame(FrameBase):
            test_nodes = FrameNode(TestNode, 2)

            def __init__(self):
                super().__init__(enable_snapshot=True,
                                 total_snapshot=10,
                                 backend_name="dynamic")
Example #7
0
    class VmSchedulingFrame(FrameBase):
        regions = FrameNode(Region, region_amount)
        zones = FrameNode(Zone, zone_amount)
        data_centers = FrameNode(DataCenter, data_center_amount)
        clusters = FrameNode(Cluster, cluster_amount)
        racks = FrameNode(Rack, rack_amount)
        pms = FrameNode(PhysicalMachine, pm_amount)

        def __init__(self):
            super().__init__(enable_snapshot=True,
                             total_snapshot=snapshots_num)
Example #8
0
    class DummyFrame(FrameBase):
        dummies = FrameNode(DummyNode, 10)

        def __init__(self):
            super().__init__(enable_snapshot=True,
                             total_snapshot=total_snapshots)
Example #9
0
        class TestFrame(FrameBase):
            test_nodes = FrameNode(TestNode, 2)

            def __init__(self):
                super().__init__(backend_name="dynamic")
Example #10
0
    class VmSchedulingFrame(FrameBase):
        pms = FrameNode(PhysicalMachine, pm_amount)

        def __init__(self):
            super().__init__(enable_snapshot=True,
                             total_snapshot=snapshots_num)