Closed ZhijiaCHEN closed 6 years ago
That's because the file has a global policy but NetKAT is passing it to the local compiler, which is barfing ungracefully.
https://github.com/frenetic-lang/frenetic/blob/master/src/lib/async/NetKAT_Controller.ml#L39
I can think of several ways to resolve it such as invoking the global compiler, or checking that the policy is local so at least we give a nice error message. @smolkaj what do you think we should do?
OK, then I think I should be able to load the policy by invoking global compiler manually.
Yes, the global and virtual compilers are not currently integrated with the shell. I like using the dump
command:
frenetic dump global <file> --update-controller
The --update-controler
flag allows you to push the resulting tables to the controller.
I see, thanks for the instruction!
I think it's better to give a new subject to this issue. I am changing it to "Unable to load global policies in frenetic shell". Please feel free to revise it if you have something to improve.
Thanks. By the way, I just added a --stdin
flag to the dump
command, see #602. Once this is merged in, you can write
frenetic dump global --update-controller --stdin "1@1=>2@2"
That's cool! Thanks for your help.
This has been addressed by #604.
I tried to use frenetic shell to load policies, but the shell crashed at \<location> => \<location>syntax. Please see the following simple routing policies for a linear topology with two switches.
Policy to load in frenetic shell:
Shell crash message: