def switchport_pvlan_mapping_delta(primary_and_range)
      # Enable switchport mode and feature private-vlan
      pvlan_enable
      primary, should_range = primary_and_range

      # primary changes require removing the entire command first
      is_range = switchport_pvlan_mapping_remove?(primary)

      # convert ranges to individual elements
      is = Utils.dash_range_to_elements(is_range)
      should = Utils.dash_range_to_elements(should_range)

      # create the delta hash and apply the changes
      delta_hash = Utils.delta_add_remove(should, is)
      Cisco::Logger.debug('switchport_pvlan_mapping_delta: '\
                          "#{primary}: #{delta_hash}")
      [:add, :remove].each do |action|
        delta_hash[action].each do |vlan|
          state = (action == :add) ? '' : 'no'
          cli_error_check(
            config_set('interface', 'switchport_pvlan_mapping',
                       name: @name, state: state, primary: primary, vlan: vlan))
        end
      end
    end
def switchport_pvlan_mapping_delta(primary_and_range)
      # Enable switchport mode and feature private-vlan
      pvlan_enable
      primary, should_range = primary_and_range

      # primary changes require removing the entire command first
      is_range = switchport_pvlan_mapping_remove?(primary)

      # convert ranges to individual elements
      is = Utils.dash_range_to_elements(is_range)
      should = Utils.dash_range_to_elements(should_range)

      # create the delta hash and apply the changes
      delta_hash = Utils.delta_add_remove(should, is)
      Cisco::Logger.debug('switchport_pvlan_mapping_delta: '\
                          "#{primary}: #{delta_hash}")
      [:add, :remove].each do |action|
        delta_hash[action].each do |vlan|
          state = (action == :add) ? '' : 'no'
          cli_error_check(
            config_set('interface', 'switchport_pvlan_mapping',
                       name: @name, state: state, primary: primary, vlan: vlan))
        end
      end
    end
--------------------------
 Find the is/should delta and add/remove commands as needed.

 Inputs:
 primary_and_range: An array of primary vlan and range of vlans