Chapter 09/circuit-oneops-1-master/components/cookbooks/f5-bigip/libraries/provider_ltm_virtual_server.rb
#
# Remove any extra profiles associated with current_resource that shouldn't be
#
Remove any extra profiles associated with current_resource that shouldn't be
Remove any extra profiles associated with current_resource that shouldn ' t be
def remove_profiles
        matching_profiles = new_resource.profiles & current_resource.profiles
        extra_profiles = current_resource.profiles - matching_profiles
        return if extra_profiles.empty?
        converge_by("Removing profiles from #{new_resource}") do
          Chef::Log.info("Removing profiles from #{new_resource}")
          load_balancer.client['LocalLB.VirtualServer'].remove_profile([new_resource.vs_name], [extra_profiles])
          current_resource.profiles(matching_profiles)
          new_resource.updated_by_last_action(true)
        end
      end
def remove_profiles matching_profiles = new_resource . profiles & current_resource . profiles extra_profiles = current_resource . profiles - matching_profiles return if extra_profiles . empty? converge_by ( "Removing profiles from #{new_resource}" ) do Chef :: Log . info ( "Removing profiles from #{new_resource}" ) load_balancer . client [ 'LocalLB.VirtualServer' ] . remove_profile ( [ new_resource . vs_name ] , [ extra_profiles ] ) current_resource . profiles ( matching_profiles ) new_resource . updated_by_last_action ( true ) end end
Remove any extra profiles associated with current_resource that shouldn't be
Remove any extra profiles associated with current_resource that shouldn ' t be