Chapter 09/circuit-oneops-1-master/components/cookbooks/f5-bigip/libraries/provider_ltm_virtual_server.rb
#
# Create a new virtual server given new_resource attributes
#
Create a new virtual server given new_resource attributes
Create a new virtual server given new_resource attributes
def create_virtual_server
        converge_by("Create #{new_resource}") do
          Chef::Log.info("Create #{new_resource}")
          load_balancer.client['LocalLB.VirtualServer']
                       .create new_virtual_server_defenition, [new_resource.destination_wildmask],
                               new_virtual_server_resource, [new_resource.profiles]
          update_current_resource(%w(destination_address destination_port protocol
                                     destination_wildmask type default_pool profiles connection_limit))
          current_resource.default_persistence_profile_cnt = 0
          current_resource.enabled(true)
          new_resource.updated_by_last_action(true)
        end
      end
def create_virtual_server converge_by ( "Create #{new_resource}" ) do Chef :: Log . info ( "Create #{new_resource}" ) load_balancer . client [ 'LocalLB.VirtualServer' ] . create new_virtual_server_defenition , [ new_resource . destination_wildmask ] , new_virtual_server_resource , [ new_resource . profiles ] update_current_resource ( %w( destination_address destination_port protocol destination_wildmask type default_pool profiles connection_limit ) ) current_resource . default_persistence_profile_cnt = 0 current_resource . enabled ( true ) new_resource . updated_by_last_action ( true ) end end
Create a new virtual server given new_resource attributes
Create a new virtual server given new_resource attributes