From 36d5f9b92263a781e4374ac75a5190cf26504f01 Mon Sep 17 00:00:00 2001 From: Samuel Cassiba Date: Fri, 16 Feb 2018 11:09:28 -0800 Subject: [PATCH] update recipes for Chef 13 --- recipes/common.rb | 4 ++-- recipes/identity_registration.rb | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/recipes/common.rb b/recipes/common.rb index ada5853..ead8a33 100644 --- a/recipes/common.rb +++ b/recipes/common.rb @@ -18,7 +18,7 @@ # limitations under the License. # -class ::Chef::Recipe # rubocop:disable Documentation +class ::Chef::Recipe include ::Openstack end @@ -67,7 +67,7 @@ end db_user = node['openstack']['db']['dns']['username'] db_pass = get_password 'db', 'designate' -public_identity_endpoint = identity_uri_transform(public_endpoint 'identity') +public_identity_endpoint = identity_uri_transform(public_endpoint('identity')) identity_endpoint = internal_endpoint 'identity' bind_services = node['openstack']['bind_service']['all'] diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb index d307b1d..71c45ea 100644 --- a/recipes/identity_registration.rb +++ b/recipes/identity_registration.rb @@ -20,7 +20,7 @@ require 'uri' -class ::Chef::Recipe # rubocop:disable Documentation +class ::Chef::Recipe include ::Openstack end @@ -49,7 +49,7 @@ connection_params = { openstack_username: admin_user, openstack_api_key: admin_pass, openstack_project_name: admin_project, - openstack_domain_name: admin_domain + openstack_domain_name: admin_domain, } # Register DNS Service @@ -83,16 +83,10 @@ end # Register Service User openstack_user service_user do + role_name service_role project_name service_project_name domain_name service_domain_name password service_pass connection_params connection_params -end - -## Grant Service role to Service User for Service Project ## -openstack_user service_user do - role_name service_role - project_name service_project_name - connection_params connection_params - action :grant_role + action [:create, :grant_role] end