forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update keystone to edf8c3e1753b5ad0eaf982f5932ce61c55a987bd
edf8c3e1753b5ad0eaf982f5932ce61c55a987bd Merge "Only declare openstackclient class if updating version" 8a422583bf8167c18995d309b2f865b529a878cc Merge "Fix spec tests for RSpec 3.x and Puppet 4.x" e1bba1c44538ac5050f720d4791028fb1b4ec352 Only declare openstackclient class if updating version 72d78202ea433fe519776a4f99fa30a74e294ac5 Merge "Add native types for keystone paste configuration" 2d48f32bb1ce321d9e1ba34047e6229faf0d1255 Merge "Set WSGI process display-name" 918801754bfdc8539dd5c880d8131939b99a708b Merge "Beaker tests" 15deb08f5c2a4ff56dda977e2a1479fb2edc601d Merge "Support notification_format" 7e4085b70f8f79d1014cfe384a070c9d35c2ffe2 Beaker tests 3ab8faf6a1acfbf827296f41bd2e22b7f8071350 Fix spec tests for RSpec 3.x and Puppet 4.x d7aa157e5eebf75001f22bab29d24a480437e4fa Bump rspec-puppet to 2.1.0 098d349d0ac0e167b4c4beba05108c29c8dac3db Merge "MySQL: change default MySQL collate to utf8_general_ci" 1e4ede1730adb3df58de869afc180cb0eed88916 MySQL: change default MySQL collate to utf8_general_ci dec3a56696e284177b58a68f16125edbfc43951f Merge "LDAP: add support to configure credential driver" 9acb9468fc2d54e18d678fcd4cf84f35bd872a53 Support notification_format 120b20bf07722fc8218e646af19724716311e46c LDAP: add support to configure credential driver 7108a6e64f8e3c2c7586ce74b6af686dc16c6a28 Set WSGI process display-name 1699792a23b86d6b50ca21d7e57871d71b6a29c6 Add native types for keystone paste configuration Change-Id: I114b4a097b0180a6883a22bc50903748795066ab
- Loading branch information
Showing
21 changed files
with
382 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
keystone/lib/puppet/provider/keystone_paste_ini/ini_setting.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Puppet::Type.type(:keystone_paste_ini).provide( | ||
:ini_setting, | ||
:parent => Puppet::Type.type(:ini_setting).provider(:ruby) | ||
) do | ||
|
||
def section | ||
resource[:name].split('/', 2).first | ||
end | ||
|
||
def setting | ||
resource[:name].split('/', 2).last | ||
end | ||
|
||
def separator | ||
'=' | ||
end | ||
|
||
def self.file_path | ||
'/etc/keystone/keystone-paste.ini' | ||
end | ||
|
||
# this needs to be removed. This has been replaced with the class method | ||
def file_path | ||
self.class.file_path | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Puppet::Type.newtype(:keystone_paste_ini) do | ||
|
||
ensurable | ||
|
||
newparam(:name, :namevar => true) do | ||
desc 'Section/setting name to manage from keystone/keystone-paste.ini' | ||
newvalues(/\S+\/\S+/) | ||
end | ||
|
||
newproperty(:value) do | ||
desc 'The value of the setting to be defined.' | ||
munge do |value| | ||
value = value.to_s.strip | ||
value.capitalize! if value =~ /^(true|false)$/i | ||
value | ||
end | ||
|
||
def is_to_s( currentvalue ) | ||
if resource.secret? | ||
return '[old secret redacted]' | ||
else | ||
return currentvalue | ||
end | ||
end | ||
|
||
def should_to_s( newvalue ) | ||
if resource.secret? | ||
return '[new secret redacted]' | ||
else | ||
return newvalue | ||
end | ||
end | ||
end | ||
|
||
newparam(:secret, :boolean => true) do | ||
desc 'Whether to hide the value from Puppet logs. Defaults to `false`.' | ||
|
||
newvalues(:true, :false) | ||
|
||
defaultto false | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'basic keystone server with resources' do | ||
|
||
context 'default parameters' do | ||
|
||
it 'should work with no errors' do | ||
pp= <<-EOS | ||
Exec { logoutput => 'on_failure' } | ||
# Common resources | ||
include ::apt | ||
# some packages are not autoupgraded in trusty. | ||
# it will be fixed in liberty, but broken in kilo. | ||
$need_to_be_upgraded = ['python-tz', 'python-pbr'] | ||
apt::source { 'trusty-updates-kilo': | ||
location => 'http://ubuntu-cloud.archive.canonical.com/ubuntu/', | ||
release => 'trusty-updates', | ||
required_packages => 'ubuntu-cloud-keyring', | ||
repos => 'kilo/main', | ||
trusted_source => true, | ||
} -> | ||
package { $need_to_be_upgraded: | ||
ensure => latest, | ||
} | ||
class { '::mysql::server': } | ||
# Keystone resources | ||
class { '::keystone::client': } | ||
class { '::keystone::cron::token_flush': } | ||
class { '::keystone::db::mysql': | ||
password => 'keystone', | ||
} | ||
class { '::keystone': | ||
verbose => true, | ||
debug => true, | ||
database_connection => 'mysql://keystone:[email protected]/keystone', | ||
admin_token => 'admin_token', | ||
enabled => true, | ||
} | ||
class { '::keystone::roles::admin': | ||
email => '[email protected]', | ||
password => 'a_big_secret', | ||
} | ||
class { '::keystone::endpoint': | ||
public_url => "https://${::fqdn}:5000/", | ||
admin_url => "https://${::fqdn}:35357/", | ||
} | ||
::keystone::resource::service_identity { 'beaker-ci': | ||
service_type => 'beaker', | ||
service_description => 'beaker service', | ||
service_name => 'beaker', | ||
public_url => 'http://127.0.0.1:1234', | ||
admin_url => 'http://127.0.0.1:1234', | ||
internal_url => 'http://127.0.0.1:1234', | ||
} | ||
EOS | ||
|
||
|
||
# Run it twice and test for idempotency | ||
apply_manifest(pp, :catch_failures => true) | ||
apply_manifest(pp, :catch_changes => true) | ||
end | ||
|
||
describe port(5000) do | ||
it { is_expected.to be_listening.with('tcp') } | ||
end | ||
|
||
describe port(35357) do | ||
it { is_expected.to be_listening.with('tcp') } | ||
end | ||
|
||
describe cron do | ||
it { should have_entry('1 0 * * * keystone-manage token_flush >>/var/log/keystone/keystone-tokenflush.log 2>&1').with_user('keystone') } | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HOSTS: | ||
ubuntu-14.04-amd64: | ||
roles: | ||
- master | ||
platform: ubuntu-14.04-amd64 | ||
hypervisor : none | ||
ip: 127.0.0.1 | ||
CONFIG: | ||
type: foss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
HOSTS: | ||
ubuntu-14.04-amd64: | ||
roles: | ||
- master | ||
platform: ubuntu-14.04-amd64 | ||
hypervisor : none | ||
ip: 127.0.0.1 | ||
CONFIG: | ||
type: foss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.