Exemplo n.º 1
0
            autonetkit.render.render(nidb)
            #print time.clock() - start
            #import autonetkit.render2
            #start = time.clock()
            #autonetkit.render2.render(nidb)
            #print time.clock() - start

    if not (build or compile):

        # Load from last run

        import autonetkit.anm
        anm = autonetkit.anm.NetworkModel()
        anm.restore_latest()
        nidb = DeviceModel()
        nidb.restore_latest()
        #autonetkit.update_vis(anm, nidb)

    if diff:
        import autonetkit.diff
        nidb_diff = autonetkit.diff.nidb_diff()
        import json
        data = json.dumps(nidb_diff, cls=ank_json.AnkEncoder, indent=4)
        log.info('Wrote diff to diff.json')

        # TODO: make file specified in config

        with open('diff.json', 'w') as fh:
            fh.write(data)

    if deploy:
Exemplo n.º 2
0
            autonetkit.render.render(nidb)
            # print time.clock() - start
            #import autonetkit.render2
            #start = time.clock()
            # autonetkit.render2.render(nidb)
            # print time.clock() - start

    if not (build or compile):

        # Load from last run

        import autonetkit.anm
        anm = autonetkit.anm.NetworkModel()
        anm.restore_latest()
        nidb = DeviceModel()
        nidb.restore_latest()
        #autonetkit.update_vis(anm, nidb)

    if diff:
        import autonetkit.diff
        nidb_diff = autonetkit.diff.nidb_diff()
        import json
        data = json.dumps(nidb_diff, cls=ank_json.AnkEncoder, indent=4)
        # log.info('Wrote diff to diff.json')

        # TODO: make file specified in config

        with open('diff.json', 'w') as fh:
            fh.write(data)

    if deploy: