| OLD | NEW |
| 1 # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ | 1 # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ |
| 2 # | 2 # |
| 3 # Permission is hereby granted, free of charge, to any person obtaining a | 3 # Permission is hereby granted, free of charge, to any person obtaining a |
| 4 # copy of this software and associated documentation files (the | 4 # copy of this software and associated documentation files (the |
| 5 # "Software"), to deal in the Software without restriction, including | 5 # "Software"), to deal in the Software without restriction, including |
| 6 # without limitation the rights to use, copy, modify, merge, publish, dis- | 6 # without limitation the rights to use, copy, modify, merge, publish, dis- |
| 7 # tribute, sublicense, and/or sell copies of the Software, and to permit | 7 # tribute, sublicense, and/or sell copies of the Software, and to permit |
| 8 # persons to whom the Software is furnished to do so, subject to the fol- | 8 # persons to whom the Software is furnished to do so, subject to the fol- |
| 9 # lowing conditions: | 9 # lowing conditions: |
| 10 # | 10 # |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 :rtype: list | 29 :rtype: list |
| 30 :return: A list of :class:`boto.ec2.regioninfo.RegionInfo` | 30 :return: A list of :class:`boto.ec2.regioninfo.RegionInfo` |
| 31 """ | 31 """ |
| 32 return [SQSRegionInfo(name='us-east-1', | 32 return [SQSRegionInfo(name='us-east-1', |
| 33 endpoint='queue.amazonaws.com'), | 33 endpoint='queue.amazonaws.com'), |
| 34 SQSRegionInfo(name='eu-west-1', | 34 SQSRegionInfo(name='eu-west-1', |
| 35 endpoint='eu-west-1.queue.amazonaws.com'), | 35 endpoint='eu-west-1.queue.amazonaws.com'), |
| 36 SQSRegionInfo(name='us-west-1', | 36 SQSRegionInfo(name='us-west-1', |
| 37 endpoint='us-west-1.queue.amazonaws.com'), | 37 endpoint='us-west-1.queue.amazonaws.com'), |
| 38 SQSRegionInfo(name='ap-northeast-1', |
| 39 endpoint='ap-northeast-1.queue.amazonaws.com'), |
| 38 SQSRegionInfo(name='ap-southeast-1', | 40 SQSRegionInfo(name='ap-southeast-1', |
| 39 endpoint='ap-southeast-1.queue.amazonaws.com') | 41 endpoint='ap-southeast-1.queue.amazonaws.com') |
| 40 ] | 42 ] |
| 41 | 43 |
| 42 def connect_to_region(region_name): | 44 def connect_to_region(region_name, **kw_params): |
| 43 for region in regions(): | 45 for region in regions(): |
| 44 if region.name == region_name: | 46 if region.name == region_name: |
| 45 return region.connect() | 47 return region.connect(**kw_params) |
| 46 return None | 48 return None |
| OLD | NEW |