Sha256: 4a7cae326e5d634e9661ae07efeb8c5d0dea829775e5b8e5db2383a4a2526698
Contents?: true
Size: 835 Bytes
Versions: 22
Compression:
Stored size: 835 Bytes
Contents
require 'fog/openstack/models/model' module Fog module OpenStack class Compute class SecurityGroupRule < Fog::OpenStack::Model identity :id attribute :from_port attribute :group attribute :ip_protocol attribute :to_port attribute :parent_group_id attribute :ip_range def save requires :ip_protocol, :from_port, :to_port, :parent_group_id cidr = ip_range && ip_range["cidr"] if rule = service.create_security_group_rule(parent_group_id, ip_protocol, from_port, to_port, cidr, group).data[:body] merge_attributes(rule["security_group_rule"]) end end def destroy requires :id service.delete_security_group_rule(id) true end end end end end
Version data entries
22 entries across 22 versions & 3 rubygems