Sha256: 171f88bb5fae6afcb89b419b27a2b61135735cce4a3390b43de4d2f3057de8b1

Contents?: true

Size: 571 Bytes

Versions: 2

Compression:

Stored size: 571 Bytes

Contents

module Brightbox
  class FirewallPolicy < Api
    def self.require_account?; true; end

    def self.create(options)
      new(conn.firewall_policies.create(options))
    end

    def self.get(id)
      conn.firewall_policies.get(id)
    end

    def self.all
      conn.firewall_policies
    end

    def attributes
      fog_attributes.tap do |attrs|
        attrs[:name] = name
        attrs[:description] = description
        attrs[:server_group] = server_group_id
      end
    end

    def self.default_field_order
      %i[id server_group name]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0.rc2 lib/brightbox-cli/firewall_policy.rb
brightbox-cli-5.0.0.rc1 lib/brightbox-cli/firewall_policy.rb