os_user: fix module undefined
module variable in the function is undefined. Pass it. fix "NameError: name 'module' is not defined"
This commit is contained in:
parent
a86878c425
commit
a5c70dc672
1 changed files with 2 additions and 2 deletions
|
@ -177,7 +177,7 @@ def _get_domain_id(cloud, domain):
|
|||
|
||||
return domain_id
|
||||
|
||||
def _get_default_project_id(cloud, default_project):
|
||||
def _get_default_project_id(cloud, default_project, module):
|
||||
project = cloud.get_project(default_project)
|
||||
if not project:
|
||||
module.fail_json(msg='Default project %s is not valid' % default_project)
|
||||
|
@ -232,7 +232,7 @@ def main():
|
|||
module.fail_json(msg=msg)
|
||||
default_project_id = None
|
||||
if default_project:
|
||||
default_project_id = _get_default_project_id(cloud, default_project)
|
||||
default_project_id = _get_default_project_id(cloud, default_project, module)
|
||||
|
||||
if user is None:
|
||||
user = cloud.create_user(
|
||||
|
|
Loading…
Reference in a new issue