Application_API: MAX-LEVEL
Chapman Flack <[email protected]> Mon, 11 Sep 2017 11:37:25 -0400
| Newsgroups | gmane.comp.archivers.amanda.devel |
|---|---|
| Message-ID | <[email protected]> |
What should an application report for the 'support' MAX-LEVEL item?
Should it be some fixed, theoretical value ("I always support 99
levels in theory")?
Or should it be the current, accurate value ("My local state has
prior levels 0 to 3, so my MAX-LEVEL at the moment is 4")?
Abstract.pm is designed so reporting the current value is possible,
but I notice my applications are currently reporting a fixed value
(I think in the first instance because I was in a hurry and not sure
which was correct, and the later ones because I copied that code).
Also, what should an application do when 'estimate' is asked for
a higher level than currently possible? I believe all my apps
currently return -1 -1 for the level and also print_to_server
with Amanda::App_Script::ERROR. They are working that way: the
planner picks one of the levels that did not report -1 -1, and it
does not choke on the error.
Does that mean reporting -1 -1 should be sufficient, and I do not
need to log the error?
Or, does it mean MAX-LEVEL should report the current allowed maximum,
and then higher levels will not be requested, and I should leave the
error in place because it Should Never Happen?
-Chap