Modified rule.py to be compatible with the new api

Issue: #25
Signed-off-by: Rossella Sblendido <rossella@midokura.com>
Merge pull request #29 from midokura/issue25

Modified rule.py to be compatible with the new api