This sets all the internal variables and service users that are set to
use project instead of tenant for clarity.
Change-Id: I4aa833bac2ee2281c5f2881f7ae1fd8e7c759f74
| ... | ... |
@@ -495,21 +495,21 @@ EOF |
| 495 | 495 |
iniset ${swift_node_config} DEFAULT bind_ip ${SWIFT_SERVICE_LISTEN_ADDRESS}
|
| 496 | 496 |
done |
| 497 | 497 |
|
| 498 |
- # Set new accounts in tempauth to match keystone tenant/user (to make testing easier) |
|
| 499 |
- iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth user_swifttenanttest1_swiftusertest1 "testing .admin"
|
|
| 500 |
- iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth user_swifttenanttest2_swiftusertest2 "testing2 .admin"
|
|
| 501 |
- iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth user_swifttenanttest1_swiftusertest3 "testing3 .admin"
|
|
| 498 |
+ # Set new accounts in tempauth to match keystone project/user (to make testing easier) |
|
| 499 |
+ iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth user_swiftprojecttest1_swiftusertest1 "testing .admin"
|
|
| 500 |
+ iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth user_swiftprojecttest2_swiftusertest2 "testing2 .admin"
|
|
| 501 |
+ iniset ${SWIFT_CONFIG_PROXY_SERVER} filter:tempauth user_swiftprojecttest1_swiftusertest3 "testing3 .admin"
|
|
| 502 | 502 |
|
| 503 | 503 |
testfile=${SWIFT_CONF_DIR}/test.conf
|
| 504 | 504 |
cp ${SWIFT_DIR}/test/sample.conf ${testfile}
|
| 505 | 505 |
|
| 506 | 506 |
# Set accounts for functional tests |
| 507 |
- iniset ${testfile} func_test account swifttenanttest1
|
|
| 507 |
+ iniset ${testfile} func_test account swiftprojecttest1
|
|
| 508 | 508 |
iniset ${testfile} func_test username swiftusertest1
|
| 509 | 509 |
iniset ${testfile} func_test username3 swiftusertest3
|
| 510 |
- iniset ${testfile} func_test account2 swifttenanttest2
|
|
| 510 |
+ iniset ${testfile} func_test account2 swiftprojecttest2
|
|
| 511 | 511 |
iniset ${testfile} func_test username2 swiftusertest2
|
| 512 |
- iniset ${testfile} func_test account4 swifttenanttest4
|
|
| 512 |
+ iniset ${testfile} func_test account4 swiftprojecttest4
|
|
| 513 | 513 |
iniset ${testfile} func_test username4 swiftusertest4
|
| 514 | 514 |
iniset ${testfile} func_test password4 testing4
|
| 515 | 515 |
iniset ${testfile} func_test domain4 swift_test
|
| ... | ... |
@@ -603,13 +603,13 @@ function create_swift_disk {
|
| 603 | 603 |
# since we want to make it compatible with tempauth which use |
| 604 | 604 |
# underscores for separators. |
| 605 | 605 |
|
| 606 |
-# Tenant User Roles Domain |
|
| 607 |
-# ------------------------------------------------------------------ |
|
| 608 |
-# service swift service default |
|
| 609 |
-# swifttenanttest1 swiftusertest1 admin default |
|
| 610 |
-# swifttenanttest1 swiftusertest3 anotherrole default |
|
| 611 |
-# swifttenanttest2 swiftusertest2 admin default |
|
| 612 |
-# swifttenanttest4 swiftusertest4 admin swift_test |
|
| 606 |
+# Project User Roles Domain |
|
| 607 |
+# ------------------------------------------------------------------- |
|
| 608 |
+# service swift service default |
|
| 609 |
+# swiftprojecttest1 swiftusertest1 admin default |
|
| 610 |
+# swiftprojecttest1 swiftusertest3 anotherrole default |
|
| 611 |
+# swiftprojecttest2 swiftusertest2 admin default |
|
| 612 |
+# swiftprojecttest4 swiftusertest4 admin swift_test |
|
| 613 | 613 |
|
| 614 | 614 |
function create_swift_accounts {
|
| 615 | 615 |
# Defines specific passwords used by ``tools/create_userrc.sh`` |
| ... | ... |
@@ -635,43 +635,43 @@ function create_swift_accounts {
|
| 635 | 635 |
"$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT" \ |
| 636 | 636 |
"$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/v1/AUTH_\$(project_id)s" |
| 637 | 637 |
|
| 638 |
- local swift_tenant_test1 |
|
| 639 |
- swift_tenant_test1=$(get_or_create_project swifttenanttest1 default) |
|
| 640 |
- die_if_not_set $LINENO swift_tenant_test1 "Failure creating swift_tenant_test1" |
|
| 638 |
+ local swift_project_test1 |
|
| 639 |
+ swift_project_test1=$(get_or_create_project swiftprojecttest1 default) |
|
| 640 |
+ die_if_not_set $LINENO swift_project_test1 "Failure creating swift_project_test1" |
|
| 641 | 641 |
SWIFT_USER_TEST1=$(get_or_create_user swiftusertest1 $swiftusertest1_password \ |
| 642 | 642 |
"default" "test@example.com") |
| 643 | 643 |
die_if_not_set $LINENO SWIFT_USER_TEST1 "Failure creating SWIFT_USER_TEST1" |
| 644 |
- get_or_add_user_project_role admin $SWIFT_USER_TEST1 $swift_tenant_test1 |
|
| 644 |
+ get_or_add_user_project_role admin $SWIFT_USER_TEST1 $swift_project_test1 |
|
| 645 | 645 |
|
| 646 | 646 |
local swift_user_test3 |
| 647 | 647 |
swift_user_test3=$(get_or_create_user swiftusertest3 $swiftusertest3_password \ |
| 648 | 648 |
"default" "test3@example.com") |
| 649 | 649 |
die_if_not_set $LINENO swift_user_test3 "Failure creating swift_user_test3" |
| 650 |
- get_or_add_user_project_role $another_role $swift_user_test3 $swift_tenant_test1 |
|
| 650 |
+ get_or_add_user_project_role $another_role $swift_user_test3 $swift_project_test1 |
|
| 651 | 651 |
|
| 652 |
- local swift_tenant_test2 |
|
| 653 |
- swift_tenant_test2=$(get_or_create_project swifttenanttest2 default) |
|
| 654 |
- die_if_not_set $LINENO swift_tenant_test2 "Failure creating swift_tenant_test2" |
|
| 652 |
+ local swift_project_test2 |
|
| 653 |
+ swift_project_test2=$(get_or_create_project swiftprojecttest2 default) |
|
| 654 |
+ die_if_not_set $LINENO swift_project_test2 "Failure creating swift_project_test2" |
|
| 655 | 655 |
|
| 656 | 656 |
local swift_user_test2 |
| 657 | 657 |
swift_user_test2=$(get_or_create_user swiftusertest2 $swiftusertest2_password \ |
| 658 | 658 |
"default" "test2@example.com") |
| 659 | 659 |
die_if_not_set $LINENO swift_user_test2 "Failure creating swift_user_test2" |
| 660 |
- get_or_add_user_project_role admin $swift_user_test2 $swift_tenant_test2 |
|
| 660 |
+ get_or_add_user_project_role admin $swift_user_test2 $swift_project_test2 |
|
| 661 | 661 |
|
| 662 | 662 |
local swift_domain |
| 663 | 663 |
swift_domain=$(get_or_create_domain swift_test 'Used for swift functional testing') |
| 664 | 664 |
die_if_not_set $LINENO swift_domain "Failure creating swift_test domain" |
| 665 | 665 |
|
| 666 |
- local swift_tenant_test4 |
|
| 667 |
- swift_tenant_test4=$(get_or_create_project swifttenanttest4 $swift_domain) |
|
| 668 |
- die_if_not_set $LINENO swift_tenant_test4 "Failure creating swift_tenant_test4" |
|
| 666 |
+ local swift_project_test4 |
|
| 667 |
+ swift_project_test4=$(get_or_create_project swiftprojecttest4 $swift_domain) |
|
| 668 |
+ die_if_not_set $LINENO swift_project_test4 "Failure creating swift_project_test4" |
|
| 669 | 669 |
|
| 670 | 670 |
local swift_user_test4 |
| 671 | 671 |
swift_user_test4=$(get_or_create_user swiftusertest4 $swiftusertest4_password \ |
| 672 | 672 |
$swift_domain "test4@example.com") |
| 673 | 673 |
die_if_not_set $LINENO swift_user_test4 "Failure creating swift_user_test4" |
| 674 |
- get_or_add_user_project_role admin $swift_user_test4 $swift_tenant_test4 |
|
| 674 |
+ get_or_add_user_project_role admin $swift_user_test4 $swift_project_test4 |
|
| 675 | 675 |
} |
| 676 | 676 |
|
| 677 | 677 |
# init_swift() - Initialize rings |