Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** WIP *** Testing fix suggested in #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion development/shared/neutron-ext-net-ksv3
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,21 @@ if __name__ == '__main__':
keystone = v3.Client(session=sess)
quantum = client.Client(session=sess)

# Resolve domain id
domain_id = None
for dom in [t._info for t in keystone.domains.list()]:
if (dom['name'] == (os.environ['OS_PROJECT_DOMAIN_NAME'])):
domain_id = dom['id']
break # Domain ID found - stop looking
if not domain_id:
logging.error("Unable to locate domain for %s.", os.environ['OS_PROJECT_DOMAIN_NAME']);

# Resolve tenant id
project_id = auth.get_project_id(sess)
project_id = None
for proj in [t._info for t in keystone.projects.list()]:
if (proj['domain_id'] == domain_id and proj['name'] == (opts.project or os.environ['OS_PROJECT_NAME'])):
project_id = proj['id']
break # Tenant ID found - stop looking
if not project_id:
logging.error("Unable to locate project id for %s.", opts.tenant)
sys.exit(1)
Expand Down
15 changes: 14 additions & 1 deletion development/shared/neutron-tenant-net-ksv3
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,21 @@ if __name__ == '__main__':
keystone = v3.Client(session=sess)
quantum = client.Client(session=sess)

# Resolve domain id
domain_id = None
for dom in [t._info for t in keystone.domains.list()]:
if (dom['name'] == (os.environ['OS_PROJECT_DOMAIN_NAME'])):
domain_id = dom['id']
break # Domain ID found - stop looking
if not domain_id:
logging.error("Unable to locate domain for %s.", os.environ['OS_PROJECT_DOMAIN_NAME']);

# Resolve tenant id
project_id = auth.get_project_id(sess)
project_id = None
for proj in [t._info for t in keystone.projects.list()]:
if (proj['domain_id'] == domain_id and proj['name'] == (opts.project or os.environ['OS_PROJECT_NAME'])):
project_id = proj['id']
break # Tenant ID found - stop looking
if not project_id:
logging.error("Unable to locate project id for %s.", opts.tenant)
sys.exit(1)
Expand Down