From baca5dd34b0302a1af56a18134844b31da773227 Mon Sep 17 00:00:00 2001 From: Alfonso Juan Dillera Date: Fri, 31 Aug 2012 18:52:52 +0800 Subject: [PATCH] [openstack|compute] Fixed security groups typos Conflicts: lib/fog/openstack/requests/compute/list_security_groups.rb --- lib/fog/openstack/models/compute/security_group.rb | 2 +- lib/fog/openstack/requests/compute/list_security_groups.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/fog/openstack/models/compute/security_group.rb b/lib/fog/openstack/models/compute/security_group.rb index 7b629e35c..3359f97f3 100644 --- a/lib/fog/openstack/models/compute/security_group.rb +++ b/lib/fog/openstack/models/compute/security_group.rb @@ -17,7 +17,7 @@ module Fog def save requires :name, :description data = connection.create_security_group(name, description) - merge_attributes(data.body['security_group']) + merge_attributes(data.body['security_groups']) true end diff --git a/lib/fog/openstack/requests/compute/list_security_groups.rb b/lib/fog/openstack/requests/compute/list_security_groups.rb index 812ddee55..5c8f4c5b0 100644 --- a/lib/fog/openstack/requests/compute/list_security_groups.rb +++ b/lib/fog/openstack/requests/compute/list_security_groups.rb @@ -19,7 +19,7 @@ module Fog class Mock def list_security_groups - self.data[:security_groups] = [ + self.data[:security_groups] ||= [ { "rules" => [ { "from_port" => 44, "group" => {}, @@ -57,7 +57,7 @@ module Fog "name" => "test", "description" => "this is a test" } - ] unless self.data.empty? + ] Excon::Response.new( :body => { 'security_groups' => self.data[:security_groups] }, :headers => {