Sha256: 7a02b7b7f350e5c703a867dcd492584076fc14cd8777d7426689d4ec8616f744

Contents?: true

Size: 954 Bytes

Versions: 42

Compression:

Stored size: 954 Bytes

Contents

Shindo.tests('Fog::Network[:openstack] | security_group_rules collection', ['openstack']) do

  @secgroup   = Fog::Network[:openstack].security_groups.create({:name => "my_secgroup"})
  attributes  = {:security_group_id => @secgroup.id, :direction => "ingress"}
  collection_tests(Fog::Network[:openstack].security_group_rules, attributes, true)

  tests('success') do
    attributes = {
      :security_group_id  => @secgroup.id,
      :direction          => "ingress",
      :protocol           => "tcp",
      :port_range_min     => 22,
      :port_range_max     => 22,
      :remote_ip_prefix   => "0.0.0.0/0"
    }
    @secgrouprule = Fog::Network[:openstack].security_group_rules.create(attributes)

    tests('#all(filter)').succeeds do
      secgrouprule = Fog::Network[:openstack].security_group_rules.all({:direction => "ingress"})
      secgrouprule.first.direction == "ingress"
    end
    @secgrouprule.destroy
  end
  @secgroup.destroy
end

Version data entries

42 entries across 42 versions & 6 rubygems

Version Path
fog-openstack-0.1.7 tests/openstack/models/network/security_group_rules_tests.rb
fog-openstack-0.1.6 tests/openstack/models/network/security_group_rules_tests.rb
fog-openstack-0.1.5 tests/openstack/models/network/security_group_rules_tests.rb
fog-openstack-0.1.4 tests/openstack/models/network/security_group_rules_tests.rb
fog-openstack-0.1.3 tests/openstack/models/network/security_group_rules_tests.rb
fog-openstack-0.1.2 tests/openstack/models/network/security_group_rules_tests.rb
fog-openstack-0.1.1 tests/openstack/models/network/security_group_rules_tests.rb
fog-openstack-0.1.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-1.37.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-1.36.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-1.35.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-2.0.0.pre.0 tests/openstack/models/network/security_group_rules_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/openstack/models/network/security_group_rules_tests.rb
fog-1.34.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-1.33.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-1.32.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-1.31.0 tests/openstack/models/network/security_group_rules_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/openstack/models/network/security_group_rules_tests.rb
fog-1.30.0 tests/openstack/models/network/security_group_rules_tests.rb
fog-1.29.0 tests/openstack/models/network/security_group_rules_tests.rb