Use devstack helper functions in the plugin

Using get_or_.*_role functions is useful when deploying 2 devstack
instances in 2 different regions with a unique keystone instance, the
functions ensure that the changes haven't already been applied

Change-Id: I95d75b1bc3a62bb2758a4c5985dcfb9e6cc12449
This commit is contained in:
Gregory Thiemonge 2024-02-01 15:08:36 +01:00
parent bbb4713464
commit 380540a779

View File

@ -748,12 +748,12 @@ function octavia_cleanup {
}
function add_load-balancer_roles {
openstack role create load-balancer_observer
openstack role create load-balancer_global_observer
openstack role create load-balancer_member
openstack role create load-balancer_admin
openstack role create load-balancer_quota_admin
openstack role add --user demo --project demo load-balancer_member
get_or_create_role load-balancer_observer
get_or_create_role load-balancer_global_observer
get_or_create_role load-balancer_member
get_or_create_role load-balancer_admin
get_or_create_role load-balancer_quota_admin
get_or_add_user_project_role load-balancer_member demo demo
}
function octavia_init {