def groups_method_set(grps, m)
      grps = Array(grps) unless grps.is_a? Array
      fail TypeError unless grps.all? { |x| x.is_a? String }
      fail TypeError unless m.is_a? Symbol
      # only the following are supported (unselected = blank)
      fail ArgumentError unless [:local, :unselected].include? m

      # raise "type 'local' not allowed when groups are configured" if
      #  m == :local and not grps.empty?
      m_str = m == :unselected ? '' : m.to_s
      g_str = grps.join(' ')
      t_str = AaaAuthorizationService.auth_type_sym_to_str(@type)

      # config_set depends on whether we're setting groups or not
      if g_str.empty?
        config_set('aaa_authorization_service', 'method',
                   '', t_str, @name)
      else
        config_set('aaa_authorization_service', 'groups',
                   '', t_str, @name, g_str, m_str)
      end
    end
def groups_method_set(grps, m)
      grps = Array(grps) unless grps.is_a? Array
      fail TypeError unless grps.all? { |x| x.is_a? String }
      fail TypeError unless m.is_a? Symbol
      # only the following are supported (unselected = blank)
      fail ArgumentError unless [:local, :unselected].include? m

      # raise "type 'local' not allowed when groups are configured" if
      #  m == :local and not grps.empty?
      m_str = m == :unselected ? '' : m.to_s
      g_str = grps.join(' ')
      t_str = AaaAuthorizationService.auth_type_sym_to_str(@type)

      # config_set depends on whether we're setting groups or not
      if g_str.empty?
        config_set('aaa_authorization_service', 'method',
                   '', t_str, @name)
      else
        config_set('aaa_authorization_service', 'groups',
                   '', t_str, @name, g_str, m_str)
      end
    end
groups and method must be set in the same CLI string
 aaa authorization login <type> <name> /
   local | group <group1 [group2, ...]> [local]