Chapter 09/circuit-oneops-1-master/components/cookbooks/f5-bigip/libraries/provider_ltm_virtual_server.rb
#
# Update vlans assigned to virtual server
#
Update vlans assigned to virtual server
Update vlans assigned to virtual server
def update_vlans
        converge_by("Updating #{new_resource} vlans") do
          Chef::Log.info "Updating #{new_resource} vlans"
          load_balancer.client['LocalLB.VirtualServer']
                       .set_vlan([new_resource.vs_name],
                                 [{ 'state' => new_resource.vlan_state,
                                    'vlans' => new_resource.vlans }])
          current_resource.vlans(new_resource.vlans)
          current_resource.vlan_state(new_resource.vlan_state)
          new_resource.updated_by_last_action(true)
        end
      end
def update_vlans converge_by ( "Updating #{new_resource} vlans" ) do Chef :: Log . info "Updating #{new_resource} vlans" load_balancer . client [ 'LocalLB.VirtualServer' ] . set_vlan ( [ new_resource . vs_name ] , [ { 'state' => new_resource . vlan_state , 'vlans' => new_resource . vlans } ] ) current_resource . vlans ( new_resource . vlans ) current_resource . vlan_state ( new_resource . vlan_state ) new_resource . updated_by_last_action ( true ) end end
Update vlans assigned to virtual server
Update vlans assigned to virtual server