Commit 44e1f34
authored
* With --whoami, show user quotas if set.
With --whoami, ada will check whether the user has any quota
(on their UID and on their main GID). If they have, the
disk & tape quotas are shown, including percentages.
If the API returns 404 for both UID and GID quota, it means
quotas have not been set, so Ada does not show anything.
If the API returns other error messages, Ada will show them.
I'm thinking of implementing a `ada --quota` command which
shows all quotas, not only the user's own. That would be a next commit.
* Use bash array to reduce code
Added a check if bash is new enough for arrays;
if not, a warning is printed
* Implemented --quota command
* Language: "and/or" instead of "or"
* With --quota, show message if there are no quota in scope
```
% ../SpiderScripts/ada/ada --quota own
You do not have any quota set on your user ID or primary group ID.
(git branch: 104-support-quota)
% ../SpiderScripts/ada/ada --quota all
Quota: custodial (tape) custodialLimit % replica (disk) replicaLimit %
USER:31029 5,124,339,119 1,000,000,000,000,000 0.0% 1,073,742,937 10,000,000,000 10.7%
GROUP:31040 5,124,338,950 null - 1,073,742,937 1,000,000,000,000 0.1%
GROUP:40304 0 null - 0 1,000,000,000,000,000 0%
```
1 parent d710e34 commit 44e1f34
1 file changed
Lines changed: 139 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
231 | 237 | | |
232 | 238 | | |
233 | 239 | | |
| |||
670 | 676 | | |
671 | 677 | | |
672 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
673 | 699 | | |
674 | 700 | | |
675 | 701 | | |
| |||
1836 | 1862 | | |
1837 | 1863 | | |
1838 | 1864 | | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
1839 | 1972 | | |
1840 | 1973 | | |
1841 | 1974 | | |
| |||
2109 | 2242 | | |
2110 | 2243 | | |
2111 | 2244 | | |
2112 | | - | |
| 2245 | + | |
| 2246 | + | |
2113 | 2247 | | |
2114 | 2248 | | |
2115 | 2249 | | |
| |||
2211 | 2345 | | |
2212 | 2346 | | |
2213 | 2347 | | |
| 2348 | + | |
2214 | 2349 | | |
2215 | 2350 | | |
2216 | 2351 | | |
| |||
2753 | 2888 | | |
2754 | 2889 | | |
2755 | 2890 | | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
2756 | 2894 | | |
2757 | 2895 | | |
2758 | 2896 | | |
| |||
0 commit comments