Hi,

Here is the v2 of the previous patch. It looks definitely better :-)
Please review,

Thanks,
Brice

Original Commit Msg:
The various REST SSL terminii were never setup to use the
ca_server/ca_port if one is setup.

Signed-off-by: Brice Figureau <[email protected]>
---
 lib/puppet/indirector/certificate/rest.rb          |    3 +++
 lib/puppet/indirector/certificate_request/rest.rb  |    3 +++
 .../indirector/certificate_revocation_list/rest.rb |    3 +++
 spec/unit/indirector/certificate/rest.rb           |    8 ++++++++
 spec/unit/indirector/certificate_request/rest.rb   |    8 ++++++++
 .../indirector/certificate_revocation_list/rest.rb |    8 ++++++++
 6 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/lib/puppet/indirector/certificate/rest.rb 
b/lib/puppet/indirector/certificate/rest.rb
index f88d60d..5999830 100644
--- a/lib/puppet/indirector/certificate/rest.rb
+++ b/lib/puppet/indirector/certificate/rest.rb
@@ -3,4 +3,7 @@ require 'puppet/indirector/rest'
 
 class Puppet::SSL::Certificate::Rest < Puppet::Indirector::REST
     desc "Find and save certificates over HTTP via REST."
+
+    use_server_setting(:ca_server)
+    use_port_setting(:ca_port)
 end
diff --git a/lib/puppet/indirector/certificate_request/rest.rb 
b/lib/puppet/indirector/certificate_request/rest.rb
index 6df0145..eb9e8a9 100644
--- a/lib/puppet/indirector/certificate_request/rest.rb
+++ b/lib/puppet/indirector/certificate_request/rest.rb
@@ -3,4 +3,7 @@ require 'puppet/indirector/rest'
 
 class Puppet::SSL::CertificateRequest::Rest < Puppet::Indirector::REST
     desc "Find and save certificate requests over HTTP via REST."
+
+    use_server_setting(:ca_server)
+    use_port_setting(:ca_port)
 end
diff --git a/lib/puppet/indirector/certificate_revocation_list/rest.rb 
b/lib/puppet/indirector/certificate_revocation_list/rest.rb
index 13cc95c..6d97ce1 100644
--- a/lib/puppet/indirector/certificate_revocation_list/rest.rb
+++ b/lib/puppet/indirector/certificate_revocation_list/rest.rb
@@ -3,4 +3,7 @@ require 'puppet/indirector/rest'
 
 class Puppet::SSL::CertificateRevocationList::Rest < Puppet::Indirector::REST
     desc "Find and save certificate revocation lists over HTTP via REST."
+
+    use_server_setting(:ca_server)
+    use_port_setting(:ca_port)
 end
diff --git a/spec/unit/indirector/certificate/rest.rb 
b/spec/unit/indirector/certificate/rest.rb
index 62b1ef5..d5959c4 100755
--- a/spec/unit/indirector/certificate/rest.rb
+++ b/spec/unit/indirector/certificate/rest.rb
@@ -12,4 +12,12 @@ describe Puppet::SSL::Certificate::Rest do
     it "should be a sublcass of Puppet::Indirector::REST" do
         Puppet::SSL::Certificate::Rest.superclass.should 
equal(Puppet::Indirector::REST)
     end
+
+    it "should set server_setting to :ca_server" do
+        Puppet::SSL::Certificate::Rest.server_setting.should == :ca_server
+    end
+
+    it "should set port_setting to :ca_port" do
+        Puppet::SSL::Certificate::Rest.port_setting.should == :ca_port
+    end
 end
diff --git a/spec/unit/indirector/certificate_request/rest.rb 
b/spec/unit/indirector/certificate_request/rest.rb
index cbd525f..a1492ac 100755
--- a/spec/unit/indirector/certificate_request/rest.rb
+++ b/spec/unit/indirector/certificate_request/rest.rb
@@ -12,4 +12,12 @@ describe Puppet::SSL::CertificateRequest::Rest do
     it "should be a sublcass of Puppet::Indirector::REST" do
         Puppet::SSL::CertificateRequest::Rest.superclass.should 
equal(Puppet::Indirector::REST)
     end
+
+    it "should set server_setting to :ca_server" do
+        Puppet::SSL::CertificateRequest::Rest.server_setting.should == 
:ca_server
+    end
+
+    it "should set port_setting to :ca_port" do
+        Puppet::SSL::CertificateRequest::Rest.port_setting.should == :ca_port
+    end
 end
diff --git a/spec/unit/indirector/certificate_revocation_list/rest.rb 
b/spec/unit/indirector/certificate_revocation_list/rest.rb
index f6f493c..4c7cdc3 100755
--- a/spec/unit/indirector/certificate_revocation_list/rest.rb
+++ b/spec/unit/indirector/certificate_revocation_list/rest.rb
@@ -12,4 +12,12 @@ describe Puppet::SSL::CertificateRevocationList::Rest do
     it "should be a sublcass of Puppet::Indirector::REST" do
         Puppet::SSL::CertificateRevocationList::Rest.superclass.should 
equal(Puppet::Indirector::REST)
     end
+
+    it "should set server_setting to :ca_server" do
+        Puppet::SSL::CertificateRevocationList::Rest.server_setting.should == 
:ca_server
+    end
+
+    it "should set port_setting to :ca_port" do
+        Puppet::SSL::CertificateRevocationList::Rest.port_setting.should == 
:ca_port
+    end
 end
-- 
1.6.0.2


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to