diff --git a/lib/fog/aws.rb b/lib/fog/aws.rb index ae53e4350..95f641263 100644 --- a/lib/fog/aws.rb +++ b/lib/fog/aws.rb @@ -22,7 +22,6 @@ module Fog service(:sqs, 'aws/sqs', 'SQS') service(:sts, 'aws/sts', 'STS') service(:storage, 'aws/storage', 'Storage') - service(:vpc, 'aws/vpc', 'VPC') def self.indexed_param(key, values) params = {} diff --git a/lib/fog/aws/models/compute/security_group.rb b/lib/fog/aws/models/compute/security_group.rb index f7fbc31b3..5793226f8 100644 --- a/lib/fog/aws/models/compute/security_group.rb +++ b/lib/fog/aws/models/compute/security_group.rb @@ -194,11 +194,7 @@ module Fog def save requires :description, :name - if (vpc_id.length) - data = connection.create_security_group(name, description, vpc_id).body - else - data = connection.create_security_group(name, description).body - end + data = connection.create_security_group(name, description, vpc_id).body true end diff --git a/tests/aws/requests/compute/security_group_tests.rb b/tests/aws/requests/compute/security_group_tests.rb index a2ef1ca31..454576d76 100644 --- a/tests/aws/requests/compute/security_group_tests.rb +++ b/tests/aws/requests/compute/security_group_tests.rb @@ -7,14 +7,15 @@ Shindo.tests('Fog::Compute[:aws] | security group requests', ['aws']) do 'groupId' => Fog::Nullable::String, 'groupName' => String, 'ipPermissions' => [{ - 'fromPort' => Integer, - 'groups' => [{ 'groupName' => String, 'userId' => String }], + 'fromPort' => Fog::Nullable::Integer, + 'groups' => [{ 'groupName' => Fog::Nullable::String, 'userId' => String }], 'ipProtocol' => String, 'ipRanges' => [], - 'toPort' => Integer, + 'toPort' => Fog::Nullable::Integer, }], 'ipPermissionsEgress' => [], - 'ownerId' => String + 'ownerId' => String, + 'vpcId' => Fog::Nullable::String }] }