|
|
@ -146,8 +146,7 @@ import time
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
import boto
|
|
|
|
import boto
|
|
|
|
from boto.elasticache.layer1 import ElastiCacheConnection
|
|
|
|
from boto.elasticache import connect_to_region
|
|
|
|
from boto.regioninfo import RegionInfo
|
|
|
|
|
|
|
|
HAS_BOTO = True
|
|
|
|
HAS_BOTO = True
|
|
|
|
except ImportError:
|
|
|
|
except ImportError:
|
|
|
|
HAS_BOTO = False
|
|
|
|
HAS_BOTO = False
|
|
|
@ -430,10 +429,8 @@ class ElastiCacheManager(object):
|
|
|
|
def _get_elasticache_connection(self):
|
|
|
|
def _get_elasticache_connection(self):
|
|
|
|
"""Get an elasticache connection"""
|
|
|
|
"""Get an elasticache connection"""
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
endpoint = "elasticache.%s.amazonaws.com" % self.region
|
|
|
|
return connect_to_region(
|
|
|
|
connect_region = RegionInfo(name=self.region, endpoint=endpoint)
|
|
|
|
region_name=self.region,
|
|
|
|
return ElastiCacheConnection(
|
|
|
|
|
|
|
|
region=connect_region,
|
|
|
|
|
|
|
|
**self.aws_connect_kwargs
|
|
|
|
**self.aws_connect_kwargs
|
|
|
|
)
|
|
|
|
)
|
|
|
|
except boto.exception.NoAuthHandlerFound as e:
|
|
|
|
except boto.exception.NoAuthHandlerFound as e:
|
|
|
|