refine role modules (#55021)

This commit is contained in:
Yunge Zhu 2019-04-09 16:05:03 +08:00 committed by GitHub
parent 09f68fc659
commit cb2972d647
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 38 deletions

View file

@ -348,8 +348,7 @@ class AzureRMRoleDefinition(AzureRMModuleBase):
self.log("Deleting the role definition {0}".format(self.name))
scope = self.build_scope()
try:
response = self._client.role_definitions.delete(name=self.name,
scope=scope,
response = self._client.role_definitions.delete(scope=scope,
role_definition_id=role_definition_id)
if isinstance(response, LROPoller) or isinstance(response, AzureOperationPoller):
response = self.get_poller_result(response)