Sha256: 567f63612534a09339165001a9a2a609749e42f59542a70640afab2d1b931a29

Contents?: true

Size: 1.52 KB

Versions: 1

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

1 entries across 1 versions & 1 rubygems

Version Path
deltacloud-core-1.1.2 views/firewalls/index.xml.haml