lib/fog/rackspace/networking_v2.rb in fog-1.28.0 vs lib/fog/rackspace/networking_v2.rb in fog-1.29.0

- old
+ new

@@ -29,13 +29,13 @@ "Server should have transitioned to '#{desired_state}' not '#{current_state}'" end end class InvalidImageStateException < InvalidStateException - def to_s - "Image should have transitioned to '#{desired_state}' not '#{current_state}'" - end + def to_s + "Image should have transitioned to '#{desired_state}' not '#{current_state}'" + end end requires :rackspace_username, :rackspace_api_key recognizes :rackspace_endpoint recognizes :rackspace_auth_url @@ -52,10 +52,16 @@ collection :subnets model :port collection :ports + model :security_group + collection :security_groups + + model :security_group_rule + collection :security_group_rules + request_path 'fog/rackspace/requests/networking_v2' request :list_networks request :create_network request :show_network request :update_network @@ -71,10 +77,21 @@ request :create_port request :show_port request :update_port request :delete_port + request :list_security_groups + request :create_security_group + request :show_security_group + request :update_security_group + request :delete_security_group + + request :list_security_group_rules + request :create_security_group_rule + request :show_security_group_rule + request :delete_security_group_rule + class Mock < Fog::Rackspace::Service include Fog::Rackspace::MockData def initialize(options) @rackspace_api_key = options[:rackspace_api_key] @@ -126,13 +143,13 @@ raise ServiceError.slurp(error, self) end def authenticate(options={}) super({ - :rackspace_api_key => @rackspace_api_key, - :rackspace_username => @rackspace_username, - :rackspace_auth_url => @rackspace_auth_url, - :connection_options => @connection_options + :rackspace_api_key => @rackspace_api_key, + :rackspace_username => @rackspace_username, + :rackspace_auth_url => @rackspace_auth_url, + :connection_options => @connection_options }) end def service_name :cloudNetworks