def self.parse_security_group_options(group_name, options)
if group_name.is_a?(Hash)
options = group_name
elsif group_name
if options.key?('GroupName')
raise Fog::Compute::AWS::Error, 'Arguments specified both group_name and GroupName in options'
end
options = options.clone
options['GroupName'] = group_name
end
if !options.key?('GroupName') && !options.key?('GroupId')
raise Fog::Compute::AWS::Error, 'Neither GroupName nor GroupId specified'
end
if options.key?('GroupName') && options.key?('GroupId')
raise Fog::Compute::AWS::Error, 'Both GroupName and GroupId specified'
end
options
end