def test_init_snapshot_no_crash(network):
    """Run some init snapshot commands. The goal is not to crash."""
    bf_set_network(network)
    uid = uuid.uuid4().hex
    try:
        bf_init_snapshot(join(_this_dir, 'snapshot'), uid)
        bf_generate_dataplane()
    finally:
        # cleanup
        bf_delete_snapshot(uid)
示例#2
0
    def init_batfish(self):

        bf_session.host = self.host
        bf_session.coordinatorHost = self.host

        bf_set_network(self.NETWORK_NAME)

        # Initialize Batfish Snapshot
        bf_init_snapshot(self.snapshot_folder,
                         name=self.NETWORK_NAME,
                         overwrite=True)
        # Generate Dataplane
        bf_generate_dataplane()
        # Load Batfish Questions
        load_questions()