This patch restores the original firewall rule semantics:

DELETE /api/firewalls/:firewall/:rule_id

Currently this is achieved with:

DELETE /api/firewalls/:firewall/rule?rule_id=xyz
(because I wanted to leverage the Rabbit DSL - autodocs, param validation)

Another edit is the addition of an explicit URI for each firewall rule in 
returned XML:

<rules>
  <rule href="http://localhost:3001/api/firewalls/default/RULE_ID"; id="RULE_ID">
    <allow_protocol>tcp</allow_protocol>
    <port_from>22</port_from>
    <port_to>22</port_to>
    <direction>ingress</direction>
    <sources>
      <source name="test" owner="297467797945" type="group"/>
    </sources>
  </rule>
</rules>

Whilst you cannot 'retrieve' a single firewall rule (i.e. GET 
/api/firewalls/:firewall/:rule_id), you can use the firewall_rule URI to delete 
the given rule (i.e. DELETE /api/firewalls/:firewall/:rule_id),

thanks to Chris Lalancette for bringing this up, 

marios

Reply via email to