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

Can specify repository policy #73

Merged
merged 1 commit into from
Mar 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion providers/hosted_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def load_current_resource

action :create do
unless repository_exists?(@current_resource.name)
Chef::Nexus.nexus(node).create_repository(new_resource.name, false, nil, nil, nil, nil)
Chef::Nexus.nexus(node).create_repository(new_resource.name, false, nil, nil, new_resource.policy, nil)
set_publisher if new_resource.publisher
new_resource.updated_by_last_action(true)
end
Expand Down
2 changes: 1 addition & 1 deletion providers/proxy_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def load_current_resource

action :create do
unless repository_exists?(@current_resource.name)
Chef::Nexus.nexus(node).create_repository(new_resource.name, true, new_resource.url, nil, nil, nil)
Chef::Nexus.nexus(node).create_repository(new_resource.name, true, new_resource.url, nil, new_resource.policy, nil)
set_publisher if new_resource.publisher
set_subscriber if new_resource.subscriber
new_resource.updated_by_last_action(true)
Expand Down
1 change: 1 addition & 0 deletions resources/hosted_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@

attribute :name, :kind_of => String, :name_attribute => true
attribute :publisher, :kind_of => [TrueClass, FalseClass], :default => nil
attribute :policy, :kind_of => String, :default => nil
1 change: 1 addition & 0 deletions resources/proxy_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

attribute :name, :kind_of => String, :name_attribute => true
attribute :url, :kind_of => String, :required => true
attribute :policy, :kind_of => String, :default => nil
attribute :publisher, :kind_of => [TrueClass, FalseClass], :default => nil
attribute :subscriber, :kind_of => [TrueClass, FalseClass], :default => nil
attribute :preemptive_fetch, :kind_of => [TrueClass, FalseClass], :default => false