From d98e96ddd7bff6cebbc6d1eb4b66703d6b38605b Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 29 Apr 2019 13:32:42 +0200 Subject: [PATCH] :rotating_light: --- moto/iot/models.py | 17 ----------------- moto/iot/responses.py | 3 ++- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/moto/iot/models.py b/moto/iot/models.py index 9dcefbb83..f34164483 100644 --- a/moto/iot/models.py +++ b/moto/iot/models.py @@ -625,14 +625,6 @@ class IoTBackend(BaseBackend): pass raise ResourceNotFoundException() - def attach_policy(self, policy_name, target): - principal = self._get_principal(target) - policy = self.get_policy(policy_name) - k = (target, policy_name) - if k in self.principal_policies: - return - self.principal_policies[k] = (principal, policy) - def attach_principal_policy(self, policy_name, principal_arn): principal = self._get_principal(principal_arn) policy = self.get_policy(policy_name) @@ -641,15 +633,6 @@ class IoTBackend(BaseBackend): return self.principal_policies[k] = (principal, policy) - def detach_policy(self, policy_name, target): - # this may raises ResourceNotFoundException - self._get_principal(target) - self.get_policy(policy_name) - k = (target, policy_name) - if k not in self.principal_policies: - raise ResourceNotFoundException() - del self.principal_policies[k] - def detach_principal_policy(self, policy_name, principal_arn): # this may raises ResourceNotFoundException self._get_principal(principal_arn) diff --git a/moto/iot/responses.py b/moto/iot/responses.py index 0a941ccfc..5b805465b 100644 --- a/moto/iot/responses.py +++ b/moto/iot/responses.py @@ -121,7 +121,8 @@ class IoTResponse(BaseResponse): description=self._get_param("description"), document_source=self._get_param("documentSource"), document=self._get_param("document"), - presigned_url_config=self._get_param("presignedUrlConfig"), target_selection=self._get_param("targetSelection"), + presigned_url_config=self._get_param("presignedUrlConfig"), + target_selection=self._get_param("targetSelection"), job_executions_rollout_config=self._get_param("jobExecutionsRolloutConfig"), document_parameters=self._get_param("documentParameters") )