Merge "Add recipe to create bash completions for OSC"
This commit is contained in:
commit
bf04e80682
|
@ -301,6 +301,9 @@ when 'debian'
|
|||
}
|
||||
end
|
||||
|
||||
# The location of the OSC bash completion file
|
||||
default['openstack']['common']['bash_complete'] = '/etc/bash_completion.d/osc.bash_completion'
|
||||
|
||||
# The name of the Chef role that installs the Keystone Service API
|
||||
default['openstack']['identity_service_chef_role'] = 'os-identity'
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-common
|
||||
# Recipe:: completions
|
||||
#
|
||||
# Copyright 2019, x-ion 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.
|
||||
#
|
||||
|
||||
bash_complete = node['openstack']['common']['bash_complete']
|
||||
execute 'create OSC bash completions' do
|
||||
command "openstack complete > #{bash_complete}"
|
||||
creates bash_complete
|
||||
end
|
|
@ -0,0 +1,12 @@
|
|||
# encoding: UTF-8
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-common::completions' do
|
||||
describe 'ubuntu' do
|
||||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue