Stein fixes

- Cookstyle fixes
- Refactor Berksfile to use groups so we can exclude integration testing
  cookbooks
- Update documentation
- Update delivery configuration to exclude integration cookbooks

Depends-On: https://review.opendev.org/701027
Change-Id: I0bda5cd86c7c3afc89f7a813b5bb2baa56eb3ed8
This commit is contained in:
Lance Albertson 2020-02-05 16:26:15 -08:00
parent cac2e5ba29
commit 27ae6d914f
29 changed files with 74 additions and 176 deletions

View File

@ -1 +1,9 @@
remote_file = "https://raw.githubusercontent.com/chef-cookbooks/community_cookbook_tools/master/delivery/project.toml"
[local_phases]
unit = 'rspec spec/'
lint = 'cookstyle --display-cop-names --extra-details'
syntax = "berks install -e integration"
provision = "echo skipping"
deploy = "echo skipping"
smoke = "echo skipping"
functional = "echo skipping"
cleanup = "echo skipping"

View File

@ -1 +0,0 @@
inherit_from: .rubocop_todo.yml

View File

@ -1,13 +0,0 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# 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: 28
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 100

View File

@ -29,9 +29,11 @@ solver :ruby, :required
-ops-messaging
).each do |cookbook|
if Dir.exist?("../cookbook-openstack#{cookbook}")
cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}"
cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}", group: 'integration'
else
cookbook "openstack#{cookbook}", git: "https://opendev.org/openstack/cookbook-openstack#{cookbook}"
cookbook "openstack#{cookbook}",
git: "https://opendev.org/openstack/cookbook-openstack#{cookbook}",
group: 'integration'
end
end

View File

@ -13,9 +13,9 @@ it.
Requirements
============
- Chef 14 or higher
- ChefDK 3.2.30 for testing (also includes Berkshelf for cookbook
dependency resolution)
- Chef 15 or higher
- Chef Workstation 0.15.6 for testing (also includes Berkshelf for
cookbook dependency resolution)
- gem 'fog-openstack'
Resources
@ -79,7 +79,7 @@ License and Author
+-----------------+---------------------------------------------------+
| **Copyright** | Copyright (c) 2016-2019, x-ion GmbH |
+-----------------+---------------------------------------------------+
| **Copyright** | Copyright (c) 2019, Oregon State University |
| **Copyright** | Copyright (c) 2019-2020, Oregon State University |
+-----------------+---------------------------------------------------+
Licensed under the Apache License, Version 2.0 (the "License"); you may

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,97 +0,0 @@
#
# Copyright 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
if defined?(ChefSpec)
def create_openstack_project(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_project, :create, resource_name)
end
def delete_openstack_project(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_project, :delete, resource_name)
end
def create_openstack_service(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_service, :create, resource_name)
end
def delete_openstack_service(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_service, :delete, resource_name)
end
def create_openstack_endpoint(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_endpoint, :create, resource_name)
end
def delete_openstack_endpoint(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_endpoint, :delete, resource_name)
end
def create_openstack_role(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_role, :create, resource_name)
end
def delete_openstack_role(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_role, :delete, resource_name)
end
def create_openstack_user(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_user, :create, resource_name)
end
def delete_openstack_user(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_user, :delete, resource_name)
end
def grant_role_openstack_user(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_user, :grant_role, resource_name)
end
def revoke_role_openstack_user(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_user, :revoke_role, resource_name)
end
def grant_domain_openstack_user(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_user, :grant_domain, resource_name)
end
def revoke_domain_openstack_user(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_user, :revoke_domain, resource_name)
end
def create_openstack_domain(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_domain, :create, resource_name)
end
def delete_openstack_domain(resource_name)
ChefSpec::Matchers::ResourceMatcher
.new(:openstack_domain, :delete, resource_name)
end
end

View File

@ -1,6 +1,7 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
# Copyright:: 2019 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.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,12 +1,12 @@
name 'openstackclient'
maintainer 'OpenStack'
maintainer_email 'openstack-discuss@lists.openstack.org'
license 'Apache-2.0'
description 'Installs the fog-openstack gem and offers LWRPs to use it'
issues_url 'https://launchpad.net/openstack-chef'
source_url 'https://opendev.org/openstack/cookbook-openstack-client'
chef_version '>= 14.0'
version '18.0.0'
name 'openstackclient'
maintainer 'OpenStack'
maintainer_email 'openstack-discuss@lists.openstack.org'
license 'Apache-2.0'
description 'Installs the fog-openstack gem and offers LWRPs to use it'
issues_url 'https://launchpad.net/openstack-chef'
source_url 'https://opendev.org/openstack/cookbook-openstack-client'
chef_version '>= 15.0'
version '19.0.0'
%w(ubuntu redhat centos).each do |os|
supports os

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,11 +15,11 @@
# limitations under the License.
connection_params = {
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default',
openstack_domain_id: 'default',
}
openstack_domain 'mydomain' do

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,11 +15,11 @@
# limitations under the License.
connection_params = {
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default',
openstack_domain_id: 'default',
}
%w(public internal admin).each do |interface|

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,11 +15,11 @@
# limitations under the License.
connection_params = {
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default',
openstack_domain_id: 'default',
}
openstack_project 'myproject' do

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,11 +15,11 @@
# limitations under the License.
connection_params = {
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default',
openstack_domain_id: 'default',
}
openstack_role 'myrole' do

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,11 +15,11 @@
# limitations under the License.
connection_params = {
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default',
openstack_domain_id: 'default',
}
openstack_service 'myservice' do

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -15,11 +15,11 @@
# limitations under the License.
connection_params = {
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_auth_url: 'http://devstack.test:5000/v3/auth/tokens',
openstack_username: 'admin',
openstack_api_key: 'password',
openstack_project_name: 'admin',
openstack_domain_id: 'default',
openstack_domain_id: 'default',
}
openstack_user 'myuser' do

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -25,7 +25,5 @@ end
UBUNTU_OPTS = {
platform: 'ubuntu',
version: '16.04',
version: '18.04',
}.freeze
at_exit { ChefSpec::Coverage.report! }

View File

@ -1,6 +1,6 @@
#
# Copyright 2016 cloudbau GmbH
# Copyright:: 2016 cloudbau GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.