Back to Black
This commit is contained in:
parent
ea489bce6c
commit
5697ff87a8
112 changed files with 1803 additions and 977 deletions
|
|
@ -101,8 +101,10 @@ class InvalidDeliveryChannelNameException(JsonRESTError):
|
|||
code = 400
|
||||
|
||||
def __init__(self, name):
|
||||
message = "The delivery channel name '{name}' is not valid, blank string.".format(
|
||||
name=name
|
||||
message = (
|
||||
"The delivery channel name '{name}' is not valid, blank string.".format(
|
||||
name=name
|
||||
)
|
||||
)
|
||||
super(InvalidDeliveryChannelNameException, self).__init__(
|
||||
"InvalidDeliveryChannelNameException", message
|
||||
|
|
@ -287,8 +289,10 @@ class InvalidTagCharacters(JsonRESTError):
|
|||
code = 400
|
||||
|
||||
def __init__(self, tag, param="tags.X.member.key"):
|
||||
message = "1 validation error detected: Value '{}' at '{}' failed to satisfy ".format(
|
||||
tag, param
|
||||
message = (
|
||||
"1 validation error detected: Value '{}' at '{}' failed to satisfy ".format(
|
||||
tag, param
|
||||
)
|
||||
)
|
||||
message += "constraint: Member must satisfy regular expression pattern: [\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-@]+"
|
||||
|
||||
|
|
|
|||
|
|
@ -395,8 +395,10 @@ class OrganizationConformancePack(ConfigEmptyDictable):
|
|||
self.delivery_s3_key_prefix = delivery_s3_key_prefix
|
||||
self.excluded_accounts = excluded_accounts or []
|
||||
self.last_update_time = datetime2int(datetime.utcnow())
|
||||
self.organization_conformance_pack_arn = "arn:aws:config:{0}:{1}:organization-conformance-pack/{2}".format(
|
||||
region, DEFAULT_ACCOUNT_ID, self._unique_pack_name
|
||||
self.organization_conformance_pack_arn = (
|
||||
"arn:aws:config:{0}:{1}:organization-conformance-pack/{2}".format(
|
||||
region, DEFAULT_ACCOUNT_ID, self._unique_pack_name
|
||||
)
|
||||
)
|
||||
self.organization_conformance_pack_name = name
|
||||
|
||||
|
|
@ -1006,9 +1008,9 @@ class ConfigBackend(BaseBackend):
|
|||
def get_resource_config_history(self, resource_type, id, backend_region):
|
||||
"""Returns the configuration of an item in the AWS Config format of the resource for the current regional backend.
|
||||
|
||||
NOTE: This is --NOT-- returning history as it is not supported in moto at this time. (PR's welcome!)
|
||||
As such, the later_time, earlier_time, limit, and next_token are ignored as this will only
|
||||
return 1 item. (If no items, it raises an exception)
|
||||
NOTE: This is --NOT-- returning history as it is not supported in moto at this time. (PR's welcome!)
|
||||
As such, the later_time, earlier_time, limit, and next_token are ignored as this will only
|
||||
return 1 item. (If no items, it raises an exception)
|
||||
"""
|
||||
# If the type isn't implemented then we won't find the item:
|
||||
if resource_type not in RESOURCE_MAP:
|
||||
|
|
@ -1090,10 +1092,10 @@ class ConfigBackend(BaseBackend):
|
|||
):
|
||||
"""Returns the configuration of an item in the AWS Config format of the resource for the current regional backend.
|
||||
|
||||
As far a moto goes -- the only real difference between this function and the `batch_get_resource_config` function is that
|
||||
this will require a Config Aggregator be set up a priori and can search based on resource regions.
|
||||
As far a moto goes -- the only real difference between this function and the `batch_get_resource_config` function is that
|
||||
this will require a Config Aggregator be set up a priori and can search based on resource regions.
|
||||
|
||||
Note: moto will IGNORE the resource account ID in the search query.
|
||||
Note: moto will IGNORE the resource account ID in the search query.
|
||||
"""
|
||||
if not self.config_aggregators.get(aggregator_name):
|
||||
raise NoSuchConfigurationAggregatorException()
|
||||
|
|
|
|||
|
|
@ -190,8 +190,10 @@ class ConfigResponse(BaseResponse):
|
|||
|
||||
def get_organization_conformance_pack_detailed_status(self):
|
||||
# 'Filters' parameter is not implemented yet
|
||||
statuses = self.config_backend.get_organization_conformance_pack_detailed_status(
|
||||
self._get_param("OrganizationConformancePackName")
|
||||
statuses = (
|
||||
self.config_backend.get_organization_conformance_pack_detailed_status(
|
||||
self._get_param("OrganizationConformancePackName")
|
||||
)
|
||||
)
|
||||
|
||||
return json.dumps(statuses)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue