Skip to content

Commit dbdee69

Browse files
author
Jamie Lennox
committed
Use standard get_or_create_role to find role
The openstack role list command doesn't include any identity API version information and so will fail when running purely with v3. We could add this information to the command however we already have a function that does what swift requires so we should use it. Change-Id: I5d5417eaed432760bfb97cf35bd76a0919c6004d
1 parent 75c1dfe commit dbdee69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ function create_swift_accounts {
610610

611611
KEYSTONE_CATALOG_BACKEND=${KEYSTONE_CATALOG_BACKEND:-sql}
612612

613-
local another_role=$(openstack role list | awk "/ anotherrole / { print \$2 }")
613+
local another_role=$(get_or_create_role "anotherrole")
614614

615615
# NOTE(jroll): Swift doesn't need the admin role here, however Ironic uses
616616
# temp urls, which break when uploaded by a non-admin role

0 commit comments

Comments
 (0)