diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index edcf1ed..393e89e 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,55 +1,13 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2018-05-28 09:02:57 -0700 using RuboCop version 0.49.1. +# on 2018-08-03 05:25:45 -0700 using RuboCop version 0.55.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 20 -# Configuration parameters: CountComments, ExcludedMethods. -Metrics/BlockLength: - Max: 196 - # Offense count: 28 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. # URISchemes: http, https Metrics/LineLength: Max: 100 - -# Offense count: 7 -Style/Documentation: - Exclude: - - 'spec/**/*' - - 'test/**/*' - - 'libraries/openstack_base.rb' - - 'libraries/openstack_domain.rb' - - 'libraries/openstack_endpoint.rb' - - 'libraries/openstack_project.rb' - - 'libraries/openstack_role.rb' - - 'libraries/openstack_service.rb' - - 'libraries/openstack_user.rb' - -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: PreferredDelimiters. -Style/PercentLiteralDelimiters: - Exclude: - - 'Rakefile' - - 'metadata.rb' - - 'spec/cookbooks/openstackclient_test/recipes/endpoint.rb' - - 'spec/endpoint_spec.rb' - -# Offense count: 7 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma -Style/TrailingCommaInLiteral: - Exclude: - - 'spec/cookbooks/openstackclient_test/recipes/domain.rb' - - 'spec/cookbooks/openstackclient_test/recipes/endpoint.rb' - - 'spec/cookbooks/openstackclient_test/recipes/project.rb' - - 'spec/cookbooks/openstackclient_test/recipes/role.rb' - - 'spec/cookbooks/openstackclient_test/recipes/service.rb' - - 'spec/cookbooks/openstackclient_test/recipes/user.rb' - - 'spec/spec_helper.rb' diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..199cb43 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,3 @@ +- project: + templates: + - openstack-chef-repo-jobs diff --git a/libraries/openstack_base.rb b/libraries/openstack_base.rb index edfcdac..2e25962 100644 --- a/libraries/openstack_base.rb +++ b/libraries/openstack_base.rb @@ -15,7 +15,7 @@ # limitations under the License. module OpenstackclientCookbook - class OpenstackBase < Chef::Resource + class OpenstackBase < Chef::Resource::LWRPBase require 'fog/openstack' def connection @connection_cache ||= Fog::Identity::OpenStack.new(connection_params) diff --git a/libraries/openstack_endpoint.rb b/libraries/openstack_endpoint.rb index f77247e..de061ef 100644 --- a/libraries/openstack_endpoint.rb +++ b/libraries/openstack_endpoint.rb @@ -55,7 +55,7 @@ module OpenstackclientCookbook if endpoint new_resource.connection.endpoints.destroy(endpoint.id) else - log "#{interface}_endpoint for \"#{service_name}\" doesn't exist" + log "#{new_resource.interface}_endpoint for \"#{new_resource.service_name}\" doesn't exist" end end end diff --git a/libraries/openstack_project.rb b/libraries/openstack_project.rb index 438da8d..70d6e0c 100644 --- a/libraries/openstack_project.rb +++ b/libraries/openstack_project.rb @@ -38,7 +38,7 @@ module OpenstackclientCookbook if project project.destroy else - log "Project with name: \"#{project_name}\" doesn't exist" + log "Project with name: \"#{new_resource.project_name}\" doesn't exist" end end end diff --git a/metadata.rb b/metadata.rb index 6ce3083..0733f7a 100644 --- a/metadata.rb +++ b/metadata.rb @@ -6,7 +6,7 @@ description 'Installs the fog-openstack gem and offers LWRPs to use it' issues_url 'https://launchpad.net/openstack-chef' source_url 'https://git.openstack.org/openstack/cookbook-openstack-client' chef_version '>= 12.5' if respond_to?(:chef_version) -version '17.0.0' +version '18.0.0' %w(ubuntu redhat centos).each do |os| supports os