diff --git a/.rubocop.yml b/.rubocop.yml index cc32da4b..58c34972 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1 +1,6 @@ inherit_from: .rubocop_todo.yml + +Chef/Modernize/FoodcriticComments: + Enabled: true +Chef/Style/CopyrightCommentFormat: + Enabled: true diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 514a92fb..ca0d7ae9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2020-05-29 17:26:38 -0700 using RuboCop version 0.82.0. +# on 2021-10-14 06:25:41 UTC using RuboCop version 1.22.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 @@ -18,18 +18,3 @@ Chef/Modernize/DefinesChefSpecMatchers: Lint/NestedMethodDefinition: Exclude: - 'libraries/matchers.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods. -# SupportedStyles: predicate, comparison -Style/NumericPredicate: - Exclude: - - 'spec/**/*' - - 'libraries/provider_database_mysql_user.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -Style/ZeroLengthPredicate: - Exclude: - - 'libraries/provider_database_mysql_user.rb' diff --git a/README.rst b/README.rst index e93958a5..7d1af458 100644 --- a/README.rst +++ b/README.rst @@ -23,8 +23,8 @@ https://docs.openstack.org/latest/install/ Requirements ============ -- Chef 15 or higher -- Chef Workstation 21.2.303 for testing (also includes berkshelf for +- Chef 16 or higher +- Chef Workstation 21.10.640 for testing (also includes berkshelf for cookbook dependency resolution) Platform @@ -39,9 +39,9 @@ Cookbooks The following cookbooks are dependencies: -- 'etcd', '~> 5.6' -- 'mariadb', '~> 4.0' -- 'memcached', '~> 6.0' +- 'etcd', '~> 7.0' +- 'mariadb', '~> 5.0' +- 'memcached', '~> 7.0' - 'selinux' - 'yum-epel' @@ -317,7 +317,7 @@ License and Author +-----------------+--------------------------------------------------+ | **Copyright** | Copyright (c) 2016-2019, x-ion GmbH | +-----------------+--------------------------------------------------+ -| **Copyright** | Copyright (c) 2016-2020, Oregon State University | +| **Copyright** | Copyright (c) 2016-2021, Oregon State University | +-----------------+--------------------------------------------------+ Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/attributes/database.rb b/attributes/database.rb index 226c1fb5..0bd95c20 100644 --- a/attributes/database.rb +++ b/attributes/database.rb @@ -2,9 +2,9 @@ # Cookbook:: openstack-common # Attributes:: database # -# Copyright:: 2012-2013, AT&T Services, Inc. -# Copyright:: 2013-2014, SUSE Linux GmbH -# Copyright:: 2020, Oregon State University +# Copyright:: 2012-2021, AT&T Services, Inc. +# Copyright:: 2013-2021, SUSE Linux GmbH +# Copyright:: 2020-2021, Oregon State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/attributes/default.rb b/attributes/default.rb index cac1bb77..94e1f9b6 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -2,9 +2,9 @@ # Cookbook:: openstack-common # Attributes:: default # -# Copyright:: 2012-2013, AT&T Services, Inc. -# Copyright:: 2013-2014, SUSE Linux GmbH -# Copyright:: 2016-2020, Oregon State University +# Copyright:: 2012-2021, AT&T Services, Inc. +# Copyright:: 2013-2021, SUSE Linux GmbH +# Copyright:: 2016-2021, Oregon State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/attributes/messaging.rb b/attributes/messaging.rb index 7353b28b..160841b3 100644 --- a/attributes/messaging.rb +++ b/attributes/messaging.rb @@ -2,9 +2,9 @@ # Cookbook:: openstack-common # Attributes:: messaging # -# Copyright:: 2012-2013, AT&T Services, Inc. -# Copyright:: 2013-2014, SUSE Linux GmbH -# Copyright:: 2013-2014, Rackspace US, Inc. +# Copyright:: 2012-2021, AT&T Services, Inc. +# Copyright:: 2013-2021, SUSE Linux GmbH +# Copyright:: 2013-2021, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/cli.rb b/libraries/cli.rb index b7ccaa39..768da89c 100644 --- a/libraries/cli.rb +++ b/libraries/cli.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: cli # -# Copyright:: 2014, IBM Corp. +# Copyright:: 2014-2021, IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/config_helpers.rb b/libraries/config_helpers.rb index b3d933e6..503fd02d 100644 --- a/libraries/config_helpers.rb +++ b/libraries/config_helpers.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: config_helpers # -# Copyright:: 2016, cloudbau GmbH +# Copyright:: 2016-2021, cloudbau GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/endpoints.rb b/libraries/endpoints.rb index 6c1bdba9..73d9dae9 100644 --- a/libraries/endpoints.rb +++ b/libraries/endpoints.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: endpoints # -# Copyright:: 2012-2013, AT&T Services, Inc. +# Copyright:: 2012-2021, AT&T Services, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/network.rb b/libraries/network.rb index 425b5e6a..e5bcbf4f 100644 --- a/libraries/network.rb +++ b/libraries/network.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: network # -# Copyright:: 2012-2013, AT&T Services, Inc. +# Copyright:: 2012-2021, AT&T Services, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/parse.rb b/libraries/parse.rb index ad0565dd..b5c8b920 100644 --- a/libraries/parse.rb +++ b/libraries/parse.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: parse # -# Copyright:: 2013, Craig Tracey <craigtracey@gmail.com> +# Copyright:: 2013-2021, Craig Tracey <craigtracey@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/passwords.rb b/libraries/passwords.rb index f29feece..61919a81 100644 --- a/libraries/passwords.rb +++ b/libraries/passwords.rb @@ -2,8 +2,8 @@ # Cookbook:: openstack-common # library:: passwords # -# Copyright:: 2012-2013, AT&T Services, Inc. -# Copyright:: 2014, SUSE Linux, GmbH. +# Copyright:: 2012-2021, AT&T Services, Inc. +# Copyright:: 2014-2021, SUSE Linux, GmbH. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/search.rb b/libraries/search.rb index 140de4ce..27934599 100644 --- a/libraries/search.rb +++ b/libraries/search.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: search # -# Copyright:: 2013, AT&T Services, Inc. +# Copyright:: 2013-2021, AT&T Services, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/libraries/uri.rb b/libraries/uri.rb index d4138a45..bbcd2a2c 100644 --- a/libraries/uri.rb +++ b/libraries/uri.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: uri # -# Copyright:: 2012-2013, AT&T Services, Inc. +# Copyright:: 2012-2021, AT&T Services, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/metadata.rb b/metadata.rb index e8ddb8ba..adf96c59 100644 --- a/metadata.rb +++ b/metadata.rb @@ -9,12 +9,12 @@ version '20.0.0' supports os end -depends 'etcd', '~> 6.0' -depends 'mariadb', '~> 4.0' -depends 'memcached', '~> 6.0' +depends 'etcd', '~> 7.0' +depends 'mariadb', '~> 5.0' +depends 'memcached', '~> 7.0' depends 'selinux' depends 'yum-epel' issues_url 'https://launchpad.net/openstack-chef' source_url 'https://opendev.org/openstack/cookbook-openstack-common' -chef_version '>= 15.0' +chef_version '>= 16.0' diff --git a/recipes/client.rb b/recipes/client.rb index 07c5cade..cbbb9802 100644 --- a/recipes/client.rb +++ b/recipes/client.rb @@ -2,8 +2,8 @@ # Cookbook:: openstack-common # Recipe:: client # -# Copyright:: 2014, IBM Corp. -# Copyright:: 2017, cloudbau GmbH +# Copyright:: 2014-2021, IBM Corp. +# Copyright:: 2017-2021, cloudbau GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/completions.rb b/recipes/completions.rb index 8ec2cefa..66860fdf 100644 --- a/recipes/completions.rb +++ b/recipes/completions.rb @@ -2,8 +2,8 @@ # Cookbook:: openstack-common # Recipe:: completions # -# Copyright:: 2019, x-ion GmbH -# Copyright:: 2020, Oregon State University +# Copyright:: 2019-2021, x-ion GmbH +# Copyright:: 2020-2021, Oregon State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/default.rb b/recipes/default.rb index 795b2947..90504471 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: default # -# Copyright:: 2012-2013, AT&T Services, Inc. +# Copyright:: 2012-2021, AT&T Services, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/etcd.rb b/recipes/etcd.rb index 82a2e224..d89f38f3 100644 --- a/recipes/etcd.rb +++ b/recipes/etcd.rb @@ -2,8 +2,8 @@ # Cookbook:: openstack-common # library:: etcd # -# Copyright:: 2017, Workday Inc. -# Copyright:: 2020, Oregon State University +# Copyright:: 2017-2021, Workday Inc. +# Copyright:: 2020-2021, Oregon State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/logging.rb b/recipes/logging.rb index 4934e56e..deb5f95b 100644 --- a/recipes/logging.rb +++ b/recipes/logging.rb @@ -2,7 +2,7 @@ # Cookbook:: openstack-common # library:: logging # -# Copyright:: 2012-2013, AT&T Services, Inc. +# Copyright:: 2012-2021, AT&T Services, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/recipes/sysctl.rb b/recipes/sysctl.rb index 7712bc44..e5fa1436 100644 --- a/recipes/sysctl.rb +++ b/recipes/sysctl.rb @@ -2,8 +2,8 @@ # Cookbook:: openstack-common # recipe:: sysctl # -# Copyright:: 2013, Opscode, Inc. -# Copyright:: 2020, Oregon State University +# Copyright:: 2013-2021, Chef Software, Inc. +# Copyright:: 2020-2021, Oregon State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/resources/database.rb b/resources/database.rb index bdbd4492..412cf80e 100644 --- a/resources/database.rb +++ b/resources/database.rb @@ -3,7 +3,7 @@ # Cookbook:: openstack-common # Resource:: openstack_database # -# Copyright:: 2020, Oregon State University +# Copyright:: 2020-2021, Oregon State University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ resource_name :openstack_database provides :openstack_database +unified_mode true default_action :create property :service, String, name_property: true