Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PDK-1143) changes to work with composite namevars from simple provider #65

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

Thomas-Franklin
Copy link
Contributor

@Thomas-Franklin Thomas-Franklin commented Sep 25, 2018

PDK-1143 allows the resource_api to work nicely with composite providers, this PR is a refactor of the path_monitor and static_routes which work with composite namevars.

@codecov
Copy link

codecov bot commented Sep 25, 2018

Codecov Report

Merging #65 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #65   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          36     36           
  Lines         848    831   -17     
=====================================
- Hits          848    831   -17
Impacted Files Coverage Δ
lib/puppet/provider/panos_path_monitor_base.rb 100% <100%> (ø) ⬆️
lib/puppet/provider/panos_static_route_base.rb 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcc97b8...a17cabc. Read the comment docs.

name: 'foo',
name: {
route: 'foo/bar',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the real should would not have the name: hash like this. Is this an artifact of above test data changes with the name hash inline?

Also, I do not understand why there is only one attribute in the name hash here...

@@ -222,11 +232,19 @@
base_xpath: '/some_xpath',
}
end
let(:name) do
{
name: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary nesting here?

@@ -49,6 +49,9 @@
interval: '5',
count: '4',
enable: true,
name: {
path: 'path monitor',
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this be easier if name: were a key one level up? Then the shared examples could deal with passing through this, or the plain name? See also below for follow-up problems this causes

@DavidS
Copy link
Contributor

DavidS commented Sep 25, 2018

This is not a full review, and I get the feeling that overall this is working. The additional testing complexity is making it hard for me to review.

PDK-1143 allows the resource_api to work nicely with composite providers, this PR is a refactor of the `path_monitor` and `static_routes` which work with composite namevars.
Copy link
Contributor

@DavidS DavidS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this after puppet-agent 6.0.1 has released with the new Resource API drop.

@DavidS DavidS changed the title (PDK-1143) changes to work with composite namevars from simple provider {do not merge yet} (PDK-1143) changes to work with composite namevars from simple provider Sep 26, 2018
@DavidS DavidS changed the title {do not merge yet} (PDK-1143) changes to work with composite namevars from simple provider (PDK-1143) changes to work with composite namevars from simple provider Oct 3, 2018
@DavidS DavidS merged commit 73296bb into puppetlabs:master Oct 3, 2018
@DavidS
Copy link
Contributor

DavidS commented Oct 3, 2018

puppet 6.0.1 has been released with the necessary changes

@Thomas-Franklin Thomas-Franklin added the feature New feature or request label Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants