Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Creating new rule
> curl  -X POST -F "name=Example5" -F "comments=Description" -F "status=INACTIVE" -F "source=0.0.0.0/0" -F "sourceport=30" -F "destination=10.0.0.56" F destinationport="1020,80-90,101" -F "then=https://fod.example.com/api/thenactions/3/" -H "Authorization: Token $TOKEN" "http://$SERVER_ADDR/api/routes/"
The normal attribute specification for "name", "source", "destination", and "then" are required; Currently the combination of source and destinantion of a new rule to be created has to different to any combination of source and destination of any existsing rule; after it has been created, each rule can be changed without this restriction; status can be "INACTIVE" or "ACTIVE"


Changing existing rule
curl  -X PUT -F "name=Example5" -F "comments=Description" -F "status=INACTIVE" -F "source=0.0.0.0/0" -F "sourceport=30" -F "destination=10.0.0.56" F destinationport="1020,80-90,101" -F "then=https://fod.example.com/api/thenactions/3/" -H "Authorization: Token $TOKEN" "http://$SERVER_ADDR/api/routes/$id/"
Attribute value for name has to be specified again, but can be different than before; Also, similarly as on creation source and destination are required, but can now have arbitrary values independet of other existsing rules;

...