Sha256: bfd948b163ddf37cd593a1f0cee3e478e1c7ceab007d8f641ba5211e4fc06040

Contents?: true

Size: 764 Bytes

Versions: 22

Compression:

Stored size: 764 Bytes

Contents

# frozen_string_literal: true

require 'fog/core/collection'
require 'fog/aliyun/models/compute/security_group_rule'

module Fog
  module Compute
    class Aliyun
      class SecurityGroupRules < Fog::Collection
        model Fog::Compute::Aliyun::SecurityGroupRule
        attribute :security_group_id

        def get(security_group_id, options = {})
          data = Fog::JSON.decode(service.list_security_group_rules(security_group_id, options).body)
          self.security_group_id = data['SecurityGroupId']
          permissions = data['Permissions']['Permission']
          permissions.each do |permission|
            permission['SecurityGroupId'] = self.security_group_id
          end
          load(permissions)
        end
      end
    end
  end
end

Version data entries

22 entries across 20 versions & 2 rubygems

Version Path
fog-aliyun-0.4.0 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.19 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.18 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.17 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.16 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.15 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.13 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.12 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.11 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.10 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.9 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.8 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.7 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.6 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.5 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.4 lib/fog/aliyun/models/compute/security_group_rules.rb
fog-aliyun-0.3.3 lib/fog/aliyun/models/compute/security_group_rules.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/security_group_rules.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/security_group_rules.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-aliyun-0.3.2/lib/fog/aliyun/models/compute/security_group_rules.rb