Skip to content

Commit 059cd11

Browse files
authored
Merge pull request #24 from WhatsARanjit/release_polish
Release polish
2 parents afeb230 + 42f65f8 commit 059cd11

File tree

10 files changed

+51
-299
lines changed

10 files changed

+51
-299
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## 2017-05-12 - Release 0.4.2
2+
3+
### Summary
4+
5+
- Added a `node_manager` face for classifier API
6+
- Added ability to manage node_groups using SSL or token authentication
7+
- Added ability to manage node_groups from a remote client
8+
- Set `https` provider as default
9+
10+
#### Bugfixes
11+
12+
- `classes` attribute Hash is now deep-sorted to maintain idempotency
13+
114
## 2017-03-31 - Release 0.4.1
215

316
### Summary

HTTPS.md

Lines changed: 0 additions & 136 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ Create and manage PE node groups as resources.
2121

2222
* \*nix operating system
2323
* Puppet >= 3.7.1
24-
* [puppetclassify](https://github.com/puppetlabs/puppet-classify) gem
25-
* [puppetlabs/pe_gem module](https://forge.puppetlabs.com/puppetlabs/pe_gem)
26-
* NOTE: new `https` provider which doesn't need gem dependency at [HTTPS.md](HTTPS.md)
24+
* New `https` provider which doesn't need `puppetclassify` gem
2725

2826
## Classes
2927

@@ -119,34 +117,14 @@ node_group { 'PE MCollective':
119117

120118
The UID for the data group. Can be specified by group name or UID.
121119

122-
Default: `default`
120+
Default: `All Nodes`
123121

124122
* `rules`
125123

126124
An array of classification rules.
127125

128126
Default (empty array): `[]`
129127

130-
### Puppet_environment
131-
132-
Enumerate all puppet environments:
133-
134-
* `puppet resource puppet_environment`
135-
136-
Example output for `puppet resource puppet_environment production`
137-
138-
```puppet
139-
puppet_environment { 'production':
140-
ensure => 'present',
141-
}
142-
```
143-
144-
#### Puppet_environment parameters
145-
146-
* `name`
147-
148-
(namevar) Name of the Puppet environment on disk, i.e. the directory name in `$environmentpath`.
149-
150128
## Functions
151129

152130
### node_groups()
@@ -157,10 +135,10 @@ Retrieve all or one node_group and its data.
157135

158136
```puppet
159137
{
160-
"default"=>{
138+
"All Nodes"=>{
161139
"environment_trumps"=>false,
162140
"parent"=>"00000000-0000-4000-8000-000000000000",
163-
"name"=>"default",
141+
"name"=>"All Nodes",
164142
"rule"=>["and", ["~", "name", ".*"]],
165143
"variables"=>{}, "id"=>"00000000-0000-4000-8000-000000000000",
166144
"environment"=>"production",
@@ -180,14 +158,14 @@ Retrieve all or one node_group and its data.
180158
}
181159
```
182160

183-
`node_groups('default')` will return:
161+
`node_groups('All Nodes')` will return:
184162

185163
```puppet
186164
{
187-
"default"=>{
165+
"All Nodes"=>{
188166
"environment_trumps"=>false,
189167
"parent"=>"00000000-0000-4000-8000-000000000000",
190-
"name"=>"default",
168+
"name"=>"All Nodes",
191169
"rule"=>["and", ["~", "name", ".*"]],
192170
"variables"=>{}, "id"=>"00000000-0000-4000-8000-000000000000",
193171
"environment"=>"production",
@@ -228,8 +206,7 @@ See 'puppet man node_manager' or 'man puppet-node_manager' for full help.
228206

229207
## Things to do
230208

231-
* Remove `puppetclassify` dependency
232-
* Get feedback on `https` provider, new [HTTPS.md](HTTPS.md)
209+
* Remove `puppetclassify` classes
233210

234211
## Maintainers
235212

docs/face.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

lib/puppet/provider/node_group/https.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
require 'puppet_x/node_manager/common'
33

44
Puppet::Type.type(:node_group).provide(:https) do
5+
defaultfor :feature => :posix
56

67
def initialize(value={})
78
super(value)

lib/puppet/util/nc_https.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ def get_classified(name, expl = false, facts = {}, trusted = {})
125125
url_array << 'explanation' if expl
126126
data = facts.merge(trusted)
127127
res = do_https(url_array.join('/'), 'POST', data)
128-
require 'pry'; binding.pry
129128
if res.code.to_i != 200
130129
Puppet.debug("Response code: #{res.code}")
131130
Puppet.debug("Response message: #{res.body}")

manifests/init.pp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
class node_manager{
1+
class node_manager (
2+
$warn = true,
3+
) {
24

35
require node_manager::puppetclassify::install
6+
7+
if $warn {
8+
notify { 'This class is deprecated':
9+
message => 'HTTPS provider no longer needs puppetclassify gem.',
10+
loglevel => 'warning',
11+
}
12+
}
413
}

metadata.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
{
22
"name": "WhatsARanjit-node_manager",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"author": "WhatsARanjit",
55
"summary": "Create and manage PE Console node groups as resources.",
66
"license": "Apache-2.0",
77
"source": "https://github.com/WhatsARanjit/prosvcs-node_manager",
88
"project_page": "https://github.com/WhatsARanjit/prosvcs-node_manager",
99
"issues_url": "https://github.com/WhatsARanjit/prosvcs-node_manager/issues",
10-
"dependencies": [
11-
{"name":"puppetlabs/pe_gem","version_requirement":"0.1.2"}
10+
"tags": [
11+
"PE",
12+
"puppet enterprise",
13+
"node group",
14+
"node_group",
15+
"classification"
1216
],
17+
"dependencies": [],
1318
"operatingsystem_support": [
1419
{
1520
"operatingsystem": "RedHat",
@@ -35,9 +40,18 @@
3540
{
3641
"operatingsystem": "Ubuntu",
3742
"operatingsystemrelease": [
43+
"10.04",
3844
"12.04",
39-
"14.04"
45+
"14.04",
46+
"16.06"
4047
]
4148
}
42-
]
49+
],
50+
"requirements": [
51+
{
52+
"name": "puppet",
53+
"version_requirement": ">= 3.7.1 < 5.0.0"
54+
}
55+
],
56+
"description": "Node_manager module"
4357
}

spec/integration/puppet/provider/puppet_environment/puppet_environment_spec.rb

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)