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

Interact with API directly? #1

Open
dblessing opened this issue Jan 3, 2014 · 3 comments
Open

Interact with API directly? #1

dblessing opened this issue Jan 3, 2014 · 3 comments

Comments

@dblessing
Copy link

So far I'm loving this puppet module. Thanks. As I'm looking for automate more of our Pulp infrastructure I'm finding that the pulp CLI is very limited. For example, I can't use pulp-consumer to see whether a repo has already been bound for the consumer. Because of this I can't add an ensurable repo binding type/provider to this module.

Would you be open to moving certain functionality from using the CLI to using something like Runcible (https://rubygems.org/gems/runcible)? I'm not suggesting a rip and replace of all the commands you have in the providers, but start slowly and especially where the functionality doesn't exist in the CLI. I would be happy to provide a PR to accomplish this.

@hawknewton
Copy link
Owner

Wow, runcible looks amazing. I hate working with the CLI so hard, I had no idea anybody was writing a client library. Very cool stuff.

Yeah man, if you're feeling it knock yourself out. My one concern is the inclusion of runcible and its dependencies in the module, from the gemspec:

  gem.add_dependency('json')
  gem.add_dependency('rest-client', '>= 1.6.1')
  gem.add_dependency('oauth')
  gem.add_dependency('activesupport', '>= 3.0.10')
  gem.add_dependency('i18n', '>= 0.5.0')

I don't know if there are established best practices in the puppet world for managing dependencies, but I'm not sure we want to just copy activesupport et al under lib.

Thoughts?

@dblessing
Copy link
Author

I agree, having gem dependencies on a puppet module is not great. The best thing I've found in the past is what this article describes: http://alcy.github.io/2012/11/21/handling-gem-dependencies-in-custom-puppet-providers/ Installing the runcible gem would fall outside of the module and would be pretty simple. I like this approach as it fits well with the PuppetLabs recommended Roles/Profiles practice. If we do this and the runcible gem is not installed the puppet run will simply say there are no providers and will fail gracefully. I also don't think the absence of the runcible gem would cause a simple pulp server or consumer install to fail. Only something requiring a provider that uses the API would fail.

I'll give it a shot and see what happens.

@ericlake
Copy link

The tarball does not extract cleanly either manually or through puppet module install.

tar zxvf hawknewton-pulp-0.1.0.tar.gz
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/Gemfile
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/Gemfile.lock tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/Guardfile
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/lib/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/manifests/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/metadata.json tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/Modulefile
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/modules/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/Rakefile
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/README.md tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/templates/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/tmp/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/templates/admin.conf.erb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/templates/consumer.conf.erb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/templates/server.conf.erb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/defines/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/fixtures/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/spec_helper.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/spec_helper_system.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/system/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/unit/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/unit/puppet/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/unit/puppet-pulp/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/unit/puppet-pulp/puppet_admin_spec.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/unit/puppet/provider/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/unit/puppet/type/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/unit/puppet/type/puppet_repo_spec.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/unit/puppet/provider/puppet_repo/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/unit/puppet/provider/puppet_repo/pulp_admin_spec.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/system/integration_spec.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/system/pulp_admin_client_spec.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/system/pulp_consumer_spec.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/system/pulp_server_spec.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/system/pulp_spec.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/system/puppet_repo_spec.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/fixtures/manifests/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/fixtures/modules/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/fixtures/puppet_empty.txt tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/fixtures/puppet_repos.txt
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/fixtures/puppet_schedules.txt tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/fixtures/modules/test/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/fixtures/modules/test/templates/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/fixtures/modules/test/templates/admin.conf.erb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/fixtures/modules/test/templates/consumer.conf.erb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/fixtures/modules/test/templates/server.conf.erb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/admin_client_spec.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/consumer_spec.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/pulp_spec.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/repo_spec.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/server_spec.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/shared_admin_client_conf.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/shared_admin_client_packages.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/shared_consumer_conf.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/shared_consumer_packages.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/shared_consumer_services.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/shared_pulp_repo_class.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/shared_server_conf.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/shared_server_packages.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/shared_server_services.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/spec/classes/shared_server_setup_db.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/spec/classes/shared_yumrepo.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/manifests/admin_client.pp tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/manifests/consumer.pp
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/manifests/init.pp tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/manifests/repo.pp
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/manifests/server.pp tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/lib/puppet/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/lib/puppet-pulp/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/lib/puppet-pulp/pulp_admin.rb
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/lib/puppet/provider/ tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/lib/puppet/type/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/lib/puppet/type/puppet_repo.rb tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/lib/puppet/provider/puppet_repo/
tar: Ignoring unknown extended header keyword SCHILY.dev' tar: Ignoring unknown extended header keywordSCHILY.ino'
tar: Ignoring unknown extended header keyword SCHILY.nlink' hawknewton-pulp-0.1.0/lib/puppet/provider/puppet_repo/.pulp_admin.rb.swp tar: Ignoring unknown extended header keywordSCHILY.dev'
tar: Ignoring unknown extended header keyword SCHILY.ino' tar: Ignoring unknown extended header keywordSCHILY.nlink'
hawknewton-pulp-0.1.0/lib/puppet/provider/puppet_repo/pulp_admin.rb
tar: Error exit delayed from previous errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants