Sha256: 080c9f733e285e672d032458f82d5b2b84336df26d4ecf5a3cbab8ed0824650c
Contents?: true
Size: 838 Bytes
Versions: 22
Compression:
Stored size: 838 Bytes
Contents
# frozen_string_literal: true require 'fog/core/collection' require 'fog/aliyun/models/compute/security_group' module Fog module Compute class Aliyun class SecurityGroups < Fog::Collection model Fog::Compute::Aliyun::SecurityGroup def all(options = {}) data = Fog::JSON.decode(service.list_security_groups(options).body)['SecurityGroups']['SecurityGroup'] load(data) # ['Images']['Image'] end def get(security_group_id) if security_group_id data = self.class.new(service: service).all result = nil data.each do |i| if i.id == security_group_id result = i break end end result end end end end end end
Version data entries
22 entries across 20 versions & 2 rubygems