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

(FM-7602) Implement Resource API transports for bolt and ACE #73

Merged
merged 13 commits into from
Mar 14, 2019

Conversation

DavidS
Copy link
Contributor

@DavidS DavidS commented Dec 10, 2018

No description provided.

@codecov
Copy link

codecov bot commented Dec 10, 2018

Codecov Report

Merging #73 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   98.98%   99.02%   +0.03%     
==========================================
  Files          36       39       +3     
  Lines         888      919      +31     
==========================================
+ Hits          879      910      +31     
  Misses          9        9
Impacted Files Coverage Δ
lib/puppet/util/task_helper.rb 100% <100%> (ø)
lib/puppet/provider/panos_path_monitor_base.rb 100% <100%> (ø) ⬆️
lib/puppet/provider/panos_static_route_base.rb 100% <100%> (ø) ⬆️
lib/puppet/provider/panos_commit/panos_commit.rb 100% <100%> (ø) ⬆️
lib/puppet/util/network_device/panos/device.rb 100% <100%> (ø) ⬆️
lib/puppet/transport/schema/panos.rb 100% <100%> (ø)
...nos_arbitrary_commands/panos_arbitrary_commands.rb 100% <100%> (ø) ⬆️
lib/puppet/provider/panos_provider.rb 100% <100%> (ø) ⬆️
lib/puppet/transport/panos.rb 100% <100%> (ø)
... and 2 more

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 837b319...d82ae93. Read the comment docs.

@DavidS
Copy link
Contributor Author

DavidS commented Feb 1, 2019

this is now starting to look like something. can still be cleaned up, but at least is passing tests.

@DavidS
Copy link
Contributor Author

DavidS commented Feb 13, 2019

Closing to clean up stuck PR test statusses from travis

@DavidS DavidS closed this Feb 13, 2019
@DavidS DavidS reopened this Feb 13, 2019
@DavidS DavidS force-pushed the transport branch 2 times, most recently from 28c80b1 to a18bb23 Compare February 13, 2019 10:33
Gemfile Outdated
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "webmock", require: false
gem "builder", '~> 3.2.2', require: false
gem "puppet-strings", require: false, git: 'https://github.com/puppetlabs/puppet-strings.git', ref: 'master'
gem "puppet-resource_api", require: false, git: 'https://github.com/puppetlabs/puppet-resource_api.git', ref: 'master'
gem "puppet-resource_api", require: false, git: 'https://github.com/puppetlabs/puppet-resource_api.git', ref: 'transport'
Copy link

Choose a reason for hiding this comment

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

This will need to be changed to master when RSAPI is released

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this has been release, we can switch back to the gem?

lib/puppet/transport/schema/panos.rb Show resolved Hide resolved
@willmeek
Copy link

willmeek commented Mar 4, 2019

Apologies for the force push.

As per discussion with @da-ar , changed the APIKey task JSON rather than working around the existing. Much cleaner.

@da-ar da-ar force-pushed the transport branch 2 times, most recently from 906f991 to 2ed1024 Compare March 8, 2019 18:33
@da-ar
Copy link

da-ar commented Mar 8, 2019

With the task_helper the PANOS module will complain about the following. We will need to make provisions within RSAPI to handle these values correctly during validation.

stderr: Warning: The connection info provided does not match the Transport Schema for panos[]
Unknown attribute:
* run-on
* remote-transport
* name
* uri
* protocol

Copy link

@adreyer adreyer left a comment

Choose a reason for hiding this comment

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

The main problem I see is that the task_helper still relies on pluginsync.

tasks/apikey.rb Outdated Show resolved Hide resolved
@da-ar da-ar force-pushed the transport branch 2 times, most recently from 930bad6 to 9d8d3b7 Compare March 12, 2019 11:21
DavidS and others added 3 commits March 12, 2019 13:55
Experimental implementation of a `panos` transport based on the new
in development transport support.

This still needs some cleanups before it can be merged. Follow the TODO
breadcrumbs.
@da-ar da-ar force-pushed the transport branch 3 times, most recently from 417d376 to b36aab0 Compare March 13, 2019 09:23
@da-ar
Copy link

da-ar commented Mar 13, 2019

@DavidS latest changes here will not pass CI until puppetlabs/puppet-resource_api#161 goes into master

@DavidS
Copy link
Contributor Author

DavidS commented Mar 13, 2019

merged puppetlabs/puppet-resource_api#161

@DavidS DavidS changed the title Transport Sketch (FM-7602) Implement Resource API transports for bolt and ACE Mar 13, 2019
@DavidS DavidS added the feature New feature or request label Mar 13, 2019
The files created by basic_spec.rb need to be cleaned up after each run,
so they do not get re-used on the next acceptance test run.
@da-ar
Copy link

da-ar commented Mar 14, 2019

@DavidS updates look good to me, but Rubocop is unhappy

@DavidS DavidS dismissed adreyer’s stale review March 14, 2019 15:31

Changed task_helper around to get shipped with the task files.

Copy link
Contributor Author

@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.

A manual run of the acceptance tests passed on my machine, and bolt was able to run a task from the CLI:

david@davids:~/git/puppetlabs-panos$ bundle exec bolt --inventoryfile ./inventory.yaml --transport remote -n x --modulepath ./spec/fixtures/modules/ task run panos::apikey
Started on jryp6xj57njqg6d.delivery.puppetlabs.net...
Finished on jryp6xj57njqg6d.delivery.puppetlabs.net:
  {
    "apikey": "LUFRPT14MW5xOEo1R09KVlBZNnpnemh0VHRBOWl6TGM9bXcwM3JHUGVhRlNiY0dCR0srNERUQT09"
  }
Successful on 1 node: jryp6xj57njqg6d.delivery.puppetlabs.net
Ran on 1 node in 2.82 seconds
david@davids:~/git/puppetlabs-panos$ 

:shipit:

@DavidS DavidS merged commit 7c5e590 into puppetlabs:master Mar 14, 2019
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.

4 participants