Skip to content

Commit

Permalink
Update trove to 1244fcaf35a8857437418e1065c8bed0fb4beb03
Browse files Browse the repository at this point in the history
1244fcaf35a8857437418e1065c8bed0fb4beb03 Merge "Reflect provider change in puppet-openstacklib"
c8527beace1b2138b6953a518a2f1bb1e328b70c Reflect provider change in puppet-openstacklib
f5288e5d0ad8486b2f3ec19ec987041e178666b6 Fix default value of guestagent_config_file option

Change-Id: I60ed5edda5baa94dc6d390d12ca02674d3082af5
  • Loading branch information
xbezdick committed Aug 24, 2015
1 parent 82a8954 commit 440fa3a
Show file tree
Hide file tree
Showing 14 changed files with 186 additions and 93 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ mod 'tripleo',
:git => 'https://github.com/openstack/puppet-tripleo.git'

mod 'trove',
:commit => '27313c16bc6fd953b382c31d0b583c09a202d406',
:commit => '1244fcaf35a8857437418e1065c8bed0fb4beb03',
:git => 'https://github.com/openstack/puppet-trove'

mod 'tuskar',
Expand Down
114 changes: 114 additions & 0 deletions trove/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,120 @@ Implementation

trove is a combination of Puppet manifest and ruby code to delivery configuration and extra functionality through types and providers.

### Types

#### trove_config

The `trove_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/trove/trove.conf` file.

```puppet
trove_config { 'DEFAULT/verbose' :
value => true,
}
```

This will write `verbose=true` in the `[DEFAULT]` section.

##### name

Section/setting name to manage from `trove.conf`

##### value

The value of the setting to be defined.

##### secret

Whether to hide the value from Puppet logs. Defaults to `false`.

##### ensure_absent_val

If value is equal to ensure_absent_val then the resource will behave as if `ensure => absent` was specified. Defaults to `<SERVICE DEFAULT>`

#### trove_conductor_config

The `trove_conductor_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/trove/trove-conductor.conf` file.

```puppet
trove_conductor_config { 'DEFAULT/verbose' :
value => true,
}
```

This will write `verbose=true` in the `[DEFAULT]` section.

##### name

Section/setting name to manage from `trove.conf`

##### value

The value of the setting to be defined.

##### secret

Whether to hide the value from Puppet logs. Defaults to `false`.

##### ensure_absent_val

If value is equal to ensure_absent_val then the resource will behave as if `ensure => absent` was specified. Defaults to `<SERVICE DEFAULT>`

#### trove_guestagent_config

The `trove_guestagent_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/trove/trove-guestagent.conf` file.

```puppet
trove_guestagent_config { 'DEFAULT/verbose' :
value => true,
}
```

This will write `verbose=true` in the `[DEFAULT]` section.

##### name

Section/setting name to manage from `trove.conf`

##### value

The value of the setting to be defined.

##### secret

Whether to hide the value from Puppet logs. Defaults to `false`.

##### ensure_absent_val

If value is equal to ensure_absent_val then the resource will behave as if `ensure => absent` was specified. Defaults to `<SERVICE DEFAULT>`

#### trove_taskmanager_config

The `trove_taskmanager_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/trove/trove-taskmanager.conf` file.

```puppet
trove_taskmanager_config { 'DEFAULT/verbose' :
value => true,
}
```

This will write `verbose=true` in the `[DEFAULT]` section.

##### name

Section/setting name to manage from `trove.conf`

##### value

The value of the setting to be defined.

##### secret

Whether to hide the value from Puppet logs. Defaults to `false`.

##### ensure_absent_val

If value is equal to ensure_absent_val then the resource will behave as if `ensure => absent` was specified. Defaults to `<SERVICE DEFAULT>`

Limitations
-----------

Expand Down
19 changes: 1 addition & 18 deletions trove/lib/puppet/provider/trove_api_paste_ini/ini_setting.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
Puppet::Type.type(:trove_api_paste_ini).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) 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/trove/api-paste.ini'
end

# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end

end
19 changes: 1 addition & 18 deletions trove/lib/puppet/provider/trove_conductor_config/ini_setting.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
Puppet::Type.type(:trove_conductor_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) 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/trove/trove-conductor.conf'
end

# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end

end
19 changes: 1 addition & 18 deletions trove/lib/puppet/provider/trove_config/ini_setting.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
Puppet::Type.type(:trove_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) 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/trove/trove.conf'
end

# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end

end
19 changes: 1 addition & 18 deletions trove/lib/puppet/provider/trove_guestagent_config/ini_setting.rb
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
Puppet::Type.type(:trove_guestagent_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) 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/trove/trove-guestagent.conf'
end

# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end

end
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
Puppet::Type.type(:trove_taskmanager_config).provide(
:ini_setting,
:parent => Puppet::Type.type(:ini_setting).provider(:ruby)
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
) 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/trove/trove-taskmanager.conf'
end

# added for backwards compatibility with older versions of inifile
def file_path
self.class.file_path
end

end
6 changes: 6 additions & 0 deletions trove/lib/puppet/type/trove_api_paste_ini.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ def should_to_s( newvalue )

defaultto false
end

newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end

end
7 changes: 7 additions & 0 deletions trove/lib/puppet/type/trove_conductor_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
value.capitalize! if value =~ /^(true|false)$/i
value
end
newvalues(/^[\S ]*$/)

def is_to_s( currentvalue )
if resource.secret?
Expand All @@ -39,4 +40,10 @@ def should_to_s( newvalue )

defaultto false
end

newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end

end
7 changes: 7 additions & 0 deletions trove/lib/puppet/type/trove_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
value.capitalize! if value =~ /^(true|false)$/i
value
end
newvalues(/^[\S ]*$/)

def is_to_s( currentvalue )
if resource.secret?
Expand All @@ -39,4 +40,10 @@ def should_to_s( newvalue )

defaultto false
end

newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end

end
7 changes: 7 additions & 0 deletions trove/lib/puppet/type/trove_guestagent_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
value.capitalize! if value =~ /^(true|false)$/i
value
end
newvalues(/^[\S ]*$/)

def is_to_s( currentvalue )
if resource.secret?
Expand All @@ -39,4 +40,10 @@ def should_to_s( newvalue )

defaultto false
end

newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end

end
7 changes: 7 additions & 0 deletions trove/lib/puppet/type/trove_taskmanager_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
value.capitalize! if value =~ /^(true|false)$/i
value
end
newvalues(/^[\S ]*$/)

def is_to_s( currentvalue )
if resource.secret?
Expand All @@ -39,4 +40,10 @@ def should_to_s( newvalue )

defaultto false
end

newparam(:ensure_absent_val) do
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
defaultto('<SERVICE DEFAULT>')
end

end
4 changes: 2 additions & 2 deletions trove/manifests/taskmanager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#
# [*guestagent_config_file*]
# (optional) Trove guest agent configuration file.
# Defaults to '/etc/trove/trove-guestmanager.conf'.
# Defaults to '/etc/trove/trove-guestagent.conf'.
#
# [*default_neutron_networks*]
# (optional) The network that trove will attach by default.
Expand All @@ -91,7 +91,7 @@
$auth_url = 'http://localhost:5000/v2.0',
$heat_url = false,
$ensure_package = 'present',
$guestagent_config_file = '/etc/trove/trove-guestmanager.conf',
$guestagent_config_file = '/etc/trove/trove-guestagent.conf',
$default_neutron_networks = undef,
$taskmanager_queue = 'taskmanager',
) inherits trove {
Expand Down
Loading

0 comments on commit 440fa3a

Please sign in to comment.