Example #1
0
 def set_aws_cf_client(self, aws_cf_client):
     if self.is_aws_cf_client_set():
         raise OperationFailed('AWS CloudFront Client already set')
     self._aws_cf_client = aws_cf_client
Example #2
0
 def get_aws_cf_client(self):
     if not self.is_aws_cf_client_set():
         raise OperationFailed('AWS CloudFront Client not set')
     return self._aws_cf_client
Example #3
0
 def get_aws_s3_client(self):
     if not self.is_aws_s3_client_set():
         raise OperationFailed('AWS S3 Client not set')
     return self._aws_s3_client
Example #4
0
 def set_aws_s3_client(self, aws_s3_client):
     if self.is_aws_s3_client_set():
         raise OperationFailed('AWS S3 Client already set')
     self._aws_s3_client = aws_s3_client
Example #5
0
 def get_mongo_client(self):
     """Gets the mongo client. Raises error if no mongo client set."""
     if not self.is_mongo_client_set():
         raise OperationFailed('MongoClient not set')
     return self._mongo_client
Example #6
0
 def set_mongo_client(self, mongo_client):
     """Set the mongo client. Raises error if already set."""
     if self.is_mongo_client_set():
         raise OperationFailed('MongoClient already set')
     self._mongo_client = mongo_client
Example #7
0
 def get_json_client(self):
     """Gets the JSON client. Raises error if no JSON client set."""
     if not self.is_json_client_set():
         raise OperationFailed('JSONClient not set')
     return self._json_client