Chapter 09/circuit-oneops-1-master/components/cookbooks/f5-bigip/libraries/provider_ltm_sslprofiles.rb
#
# Create a new ssl profile given new_resource attributes
#
Create a new ssl profile given new_resource attributes
Create a new ssl profile given new_resource attributes
def create_sslprofile
        converge_by("Create #{new_resource} ssl profile") do
          Chef::Log.info "Create #{new_resource} ssl profile"
          load_balancer.client['LocalLB.ProfileClientSSL'].create_v2([new_resource.sslprofile_name], [{"value" => "/Common/#{new_resource.keyid}", "default_flag" => "false"}] , [{"value" => "/Common/#{new_resource.certid}", "default_flag" => "false"}])
          load_balancer.client['LocalLB.ProfileClientSSL'].set_passphrase(["/Common/#{new_resource.sslprofile_name}"], [{"value" => "#{new_resource.passphrase}", "default_flag" => "false" }]) if !new_resource.passphrase.nil?
          current_resource.keyid(new_resource.keyid)
          current_resource.certid(new_resource.certid)
          current_resource.cacertid(new_resource.cacertid)
          current_resource.passphrase(new_resource.passphrase)
          new_resource.updated_by_last_action(true)
        end
      end
def create_sslprofile converge_by ( "Create #{new_resource} ssl profile" ) do Chef :: Log . info "Create #{new_resource} ssl profile" load_balancer . client [ 'LocalLB.ProfileClientSSL' ] . create_v2 ( [ new_resource . sslprofile_name ] , [ { "value" => "/Common/#{new_resource.keyid}" , "default_flag" => "false" } ] , [ { "value" => "/Common/#{new_resource.certid}" , "default_flag" => "false" } ] ) load_balancer . client [ 'LocalLB.ProfileClientSSL' ] . set_passphrase ( [ "/Common/#{new_resource.sslprofile_name}" ] , [ { "value" => "#{new_resource.passphrase}" , "default_flag" => "false" } ] ) if ! new_resource . passphrase . nil? current_resource . keyid ( new_resource . keyid ) current_resource . certid ( new_resource . certid ) current_resource . cacertid ( new_resource . cacertid ) current_resource . passphrase ( new_resource . passphrase ) new_resource . updated_by_last_action ( true ) end end
Create a new ssl profile given new_resource attributes
Create a new ssl profile given new_resource attributes