Sha256: 3919bf39f817b582d5c02fb08649d9024acb5e35c6c09b1cba1a5ea31abc263a

Contents?: true

Size: 1.52 KB

Versions: 11

Compression:

Stored size: 1.52 KB

Contents

!!! XML
%firewalls
  - @firewalls.each do |firewall|
    %firewall{:href => firewall_url(firewall.id), :id => firewall.id}
      %actions
        %link{ :rel => :destroy, :href => destroy_firewall_url(firewall.id), :method => :delete, :id => firewall.id}
        %link{ :rel => :add_rule, :href => "#{firewall_url(firewall.name)}/rules", :method => :post, :id => firewall.id}
      - firewall.attributes.select{ |attr| attr != :id && attr!= :rules}.each do |attribute|
        - haml_tag("#{attribute}".tr('-', '_'), :<) do
          - if [:name, :description].include?(attribute)
            =cdata do
              - haml_concat firewall.send(attribute)
          - else
            - haml_concat firewall.send(attribute)
      %rules
        - firewall.rules.each do |rule|
          %rule{:id => rule.id}
          %actions
            %link{ :rel => :rule, :href => "#{firewall_url(firewall.name)}/#{rule.id}", :method => :delete, :id =>rule.id, :rel => :destroy }
            - rule.attributes.select{|attr| attr != :sources && attr != :id}.each do |rule_attrib|
              - haml_tag("#{rule_attrib}".tr('-', '_'), :<) do
                - haml_concat rule.send(rule_attrib)
            %sources
              - rule.sources.each do |source|
                - if source[:type] == "group"
                  %source{:name => source[:name], :type=> source[:type], :owner=> source[:owner]}
                - else
                  %source{:prefix => source[:prefix], :address=> source[:address], :family=>source[:family], :type => source[:type]}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
deltacloud-core-1.1.1 views/firewalls/index.xml.haml
deltacloud-core-1.1.0 views/firewalls/index.xml.haml
deltacloud-core-1.0.5 views/firewalls/index.xml.haml
deltacloud-core-1.0.4 views/firewalls/index.xml.haml
deltacloud-core-1.0.3 views/firewalls/index.xml.haml
deltacloud-core-1.0.2 views/firewalls/index.xml.haml
deltacloud-core-1.0.1 views/firewalls/index.xml.haml
deltacloud-core-1.0.0 views/firewalls/index.xml.haml
deltacloud-core-0.5.0 views/firewalls/index.xml.haml
deltacloud-core-0.4.1 views/firewalls/index.xml.haml
deltacloud-core-0.4.0 views/firewalls/index.xml.haml