Migrate Zuul jobs to openstack/openstack-chef
Change-Id: Ica4deecd2dfb9029d24c8ebb2f3f2720291914e7
This commit is contained in:
5
.gitreview
Normal file
5
.gitreview
Normal file
@@ -0,0 +1,5 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=openstack/cookbook-openstackclient.git
|
||||
defaultbranch=stable/ocata
|
||||
@@ -1,11 +1,16 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2016-08-29 21:29:34 +0200 using RuboCop version 0.39.0.
|
||||
# on 2018-09-01 16:19:31 -0700 using RuboCop version 0.47.1.
|
||||
# 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: 194
|
||||
|
||||
# Offense count: 7
|
||||
Style/Documentation:
|
||||
Exclude:
|
||||
|
||||
3
.zuul.yaml
Normal file
3
.zuul.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
- project:
|
||||
templates:
|
||||
- openstack-chef-jobs
|
||||
4
Rakefile
4
Rakefile
@@ -1,4 +1,4 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
#
|
||||
# Copyright 2016 cloudbau GmbH
|
||||
#
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
task default: ['test']
|
||||
|
||||
task test: [:lint, :style, :unit]
|
||||
task test: %i(lint style unit)
|
||||
|
||||
desc 'Run FoodCritic (lint) tests'
|
||||
task :lint do
|
||||
|
||||
@@ -80,16 +80,22 @@ module OpenstackclientCookbook
|
||||
user = connection.users.find { |u| u.name == user_name }
|
||||
domain = connection.domains.find { |p| p.name == domain_name }
|
||||
role = connection.roles.find { |r| r.name == role_name }
|
||||
connection.grant_domain_user_role(
|
||||
domain.id, user.id, role.id) if role && domain && user
|
||||
if role && domain && user
|
||||
connection.grant_domain_user_role(
|
||||
domain.id, user.id, role.id
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
action :revoke_domain do
|
||||
user = connection.users.find { |u| u.name == user_name }
|
||||
domain = connection.domains.find { |p| p.name == domain_name }
|
||||
role = connection.roles.find { |r| r.name == role_name }
|
||||
connection.revoke_domain_user_role(
|
||||
domain.id, user.id, role.id) if role && domain && user
|
||||
if role && domain && user
|
||||
connection.revoke_domain_user_role(
|
||||
domain.id, user.id, role.id
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
11
metadata.rb
11
metadata.rb
@@ -1,4 +1,4 @@
|
||||
# encoding: UTF-8
|
||||
|
||||
#
|
||||
# Copyright 2016 cloudbau GmbH
|
||||
#
|
||||
@@ -17,10 +17,15 @@
|
||||
name 'openstackclient'
|
||||
maintainer 'cloudbau GmbH'
|
||||
maintainer_email 'j.klare@cloudbau.de'
|
||||
license 'Apache v2.0'
|
||||
license 'Apache-2.0'
|
||||
description 'Installs the fog-openstack gem and offers LWRPs to use it'
|
||||
issues_url 'https://github.com/cloudbau/cookbook-openstackclient/issues'
|
||||
source_url 'https://github.com/cloudbau/cookbook-openstackclient'
|
||||
chef_version '>= 12.5' if respond_to?(:chef_version)
|
||||
version '15.0.1'
|
||||
|
||||
gem 'fog-openstack'
|
||||
%w(ubuntu redhat centos).each do |os|
|
||||
supports os
|
||||
end
|
||||
|
||||
gem 'fog-openstack', '<0.2.0'
|
||||
|
||||
@@ -23,4 +23,13 @@ RSpec.configure do |config|
|
||||
config.log_level = :error
|
||||
end
|
||||
|
||||
REDHAT_OPTS = {
|
||||
platform: 'redhat',
|
||||
version: '7.3'
|
||||
}.freeze
|
||||
UBUNTU_OPTS = {
|
||||
platform: 'ubuntu',
|
||||
version: '16.04'
|
||||
}.freeze
|
||||
|
||||
at_exit { ChefSpec::Coverage.report! }
|
||||
|
||||
Reference in New Issue
Block a user