From dbdee698700d9c7cf86ad3cde74e8b4347ef757a Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Fri, 14 Aug 2015 12:22:18 +1000 Subject: [PATCH] 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 --- lib/swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/swift b/lib/swift index 96d730ef2c..7bc811e1e6 100644 --- a/lib/swift +++ b/lib/swift @@ -610,7 +610,7 @@ function create_swift_accounts { KEYSTONE_CATALOG_BACKEND=${KEYSTONE_CATALOG_BACKEND:-sql} - local another_role=$(openstack role list | awk "/ anotherrole / { print \$2 }") + local another_role=$(get_or_create_role "anotherrole") # NOTE(jroll): Swift doesn't need the admin role here, however Ironic uses # temp urls, which break when uploaded by a non-admin role