Skip to content

Commit e58516b

Browse files
committed
General cleanup of top-level files
Add TODOs to AdminTools.rst and Utilities.rst
1 parent a5a0eda commit e58516b

13 files changed

+150
-486
lines changed

AdminTools.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Admin Tools
55
The scripts described here are intended to be run on the server by "privileged" users. These are all
66
located in the ``util\admin`` directory.
77

8+
TODO: HSDS Admin scripts
89
makepwd_file.py
910
---------------
1011

Authorization.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ Authorization and Authentication
44

55
Request Authentication
66
-----------------------
7-
h5serv supports HTTP Basic authentication to authenticate users by comparing an encrypted
8-
username and password against a value stored within a password file.
9-
(See :doc:`AdminTools` to create a password file and add user accounts.)
7+
HDF Kita supports HTTP Basic authentication to authenticate users by comparing an encrypted
8+
username and password against a value stored within a password file.
109

1110
If neither the requested object (Group, Dataset, or Committed Datatype) nor the object's root group
1211
has an Access Control List (ACL), authorization is not required and no authentication string
1312
needs to be supplied. See :doc:`../AclOps/index`) for information on how to use ACL's.
1413

15-
If the requested object (or object's root group), does have an ACL, authorization may be required
14+
If the requested object (or object's root group) does have an ACL, authorization may be required
1615
(if the object is not publically readable),
1716
and if so the requestor will need to provide an Authorization header in the request. If
1817
authoriazation is required, but not provided, the server will return an HTTP Status of 401 -
@@ -37,12 +36,11 @@ If the authorization string is validated, the server will verify the request is
3736
per the object's ACL list. If not authorized a http status 403 - Forbidden will be returned.
3837

3938

40-
User ids and passwords
39+
User IDs and passwords
4140
----------------------
4241

43-
User ids and passwords are maintained in an HDF5 file referenced in the server config:
44-
'password_file'. The admin tool (See :doc:`AdminTools`) script: update_pwd.py can be used
45-
to create new users and update passwords.
42+
User IDs and passwords are maintained in a plaintext file:
43+
``admin/config/passwd.txt``.
44+
4645

4746

48-

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
Copyright Notice and License Terms for
3-
h5serv Software Service, Libraries and Utilities
3+
HDF Kita Software Service, Libraries and Utilities
44
-----------------------------------------------------------------------------
55

66
HDF Cloud Service, Libraries and Utilities

CommonErrorResponses.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
Common Error Responses
33
***************************
44

5-
For each request, h5serv returns a standard HTTP status code as described below.
6-
In general 2xx codes indicate success, 3xx codes some form of redirection, 4xx codes
7-
client error, and 5xx codes for server errors. In addition to the numeric code, h5serv
8-
will return an informational message as part of the response providing further
9-
information on the nature of the error.
5+
For each request, HDF Kita returns a standard HTTP status code as described below.
6+
In general 2xx codes indicate success, 3xx codes are returned for some form of redirection,
7+
4xx codes are returned for a client error, and 5xx codes are returned for server errors.
8+
In addition to the numeric code, HDF Kita will return an informational message as part of
9+
the response providing further information on the nature of the error.
1010

1111
* ``200 OK`` - The request was completed successfully
12-
* ``201 Created`` - The request was fulfilled and a new resource (e.g. group, dataset, attribute was created)
12+
* ``201 Created`` - The request was fulfilled and a new resource (e.g. group, dataset, attribute was created)
1313
* ``400 Bad Request`` - The request was not structured correctly (e.g. a required key was missing).
14-
* ``401 Unauthorization`` - Use authentitcation is required, supply an Authentication header with valid user and password
14+
* ``401 Unauthorization`` - User authentication is required, supply an Authentication header with a valid username and password
1515
* ``403 Forbidden`` - The requesting user does not have access to the requested resource
1616
* ``404 Not Found`` - The requested resource was not found (e.g. ``GET /groups/<id>`` where <id> was not a valid identifier for a group in the domain).
17+
* ``405 Method Not Allowed`` - The HTTP request type was not valid for the given resource (e.g. ``PUT /datasets/<id>/type``)
1718
* ``409 Conflict`` - This error is used with PUT requests where the resources cannot be created because there is an existing resource with the same name (e.g. PUT / where the requested domain is already present).
1819
* ``410 Gone`` - The resource requested has been recently deleted.
20+
* ``413 Selection Too Large`` - This error is used when the selection within a dataset encompasses too large of an area of data for the server to accept/return.
1921
* ``500 Internal Error`` - An unexpected error that indicates some problem occurred on the server.
2022
* ``501 Not Implemented`` - The request depends on a feature that is not yet implemented.

CommonRequestHeaders.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Common Request Headers
33
***********************
44

5-
The following describe common HTTP request headers as used in h5serv:
5+
The following describe common HTTP request headers as used in HDF Kita:
66

7-
* Request line: The first line of the request, the format is of the form HTTP verb (GET, PUT, DELETE, or POST) followed by the path to the resource (e.g. /group/<uuid>. Some operations take one or more query parameters (see relevant documentation)
8-
* Accept: Specified the media type that is acceptable for the response. Valid values are "application/json", and "*/*. In addiiton, GET Value (see :doc:`DatasetOps/GET_Value`) supports the value "application/octet-stream"
7+
* Request line: The first line of the request, the format is of the form HTTP verb (GET, PUT, DELETE, or POST) followed by the path to the resource (e.g. /group/<uuid>. Some operations take one or more query parameters (see relevant documentation)
8+
* Accept: Specifies the media type that is acceptable for the response. Valid values are "application/json", and "*/*. In addition, GET/PUT/POST Value (see :doc:`DatasetOps/GET_Value`, :doc:`DatasetOps/PUT_Value`, :doc:`DatasetOps/POST_Value`) support the value "application/octet-stream"
99
* Authorization: A string that provides the requester's credentials for the request. See :doc:`Authorization`
1010
* Host: the domain (i.e. related collection of groups, datasets, and attributes) that the request should apply to
11-
12-
Note: the host header can also be provided as a query paramter. Example: https://data.hdfgroup.org:7258/?host=tall.test.data.hdfgroup.org
11+
12+
Note: the host header can also be provided as a query parameter. Example: https://data.hdfgroup.org:7258/?host=tall.test.data.hdfgroup.org

CommonResponseHeaders.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
Common Response Headers
33
***************************
44

5-
The following describes some of the common response lines returned by h5serv.
5+
The following describes some of the common response lines returned by HDF Kita.
66

7-
* Status Line: the first line of the ressponse will always by: "``HTTP/1.1``" followed by
7+
* Status Line: the first line of the response will always be: "``HTTP/1.1``" followed by
88
a status code (e.g. 200) followed by a reason message (e.g. "``OK``"). For errors,
99
an additional error message may be included on this line.
10-
10+
1111
* Content-Length: the response size in bytes.
12-
12+
1313
* Etag: a hash code that indicates the state of the requested resource. If the client
1414
sees the same Etag value for the same request, it can assume the resource has not
15-
changes since the last request.
16-
17-
* Content-Type: the mime type of the response. Currently always "``application/json``".
18-
15+
changed since the last request.
16+
17+
* Content-Type: the mime type of the response.
18+

Hypermedia.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
Hypermedia
33
*************************
44

5-
h5serv supports the REST convention of **HATEOAS** or *Hypermedia as the Engine of
6-
Application State*. The idea is (see http://en.wikipedia.org/wiki/HATEOS for a full
7-
explanation) is that each response include links to related resources related to
5+
HDF Kita supports the REST convention of **HATEOAS** or *Hypermedia as the Engine of
6+
Application State*. The idea (see http://en.wikipedia.org/wiki/HATEOS for a full
7+
explanation) is that each response includes links to resources related to
88
the requested resource.
99

1010
For example, consider the request for a dataset: ``GET /datasets/<id>``. The response
11-
will be a JSON representation of the dataset describing it's type, shape, and other
11+
will be a JSON representation of the dataset describing its type, shape, and other
1212
aspects. Related resources to the dataset would include:
1313

1414
* the dataset's attributes
@@ -17,7 +17,7 @@ aspects. Related resources to the dataset would include:
1717
* the root group of the domain the dataset is in
1818
* the domain resource
1919

20-
So the ``GET /datasets/<id>`` response includes a key ``hrefs`` that contains an
20+
So the ``GET /datasets/<id>`` response includes a key ``hrefs`` that contains
2121
a JSON array. Each array element has a key: ``href`` - the related resource, and a key:
2222
``rel`` that denotes the type of relation. Example:
2323

@@ -33,12 +33,12 @@ a JSON array. Each array element has a key: ``href`` - the related resource, an
3333
]
3434
}
3535
36-
This enables clients to "explore" the api without detailed knowledge of the API.
36+
This enables clients to "explore" the API without detailed knowledge of it.
3737

38-
This is the list of relations used in h5serv:
38+
This is the list of relations used in HDF Kita:
3939

4040
* attributes - the attributes of the resource
41-
* data - the resources data (used for datasets)
41+
* data - the resource's data (used for datasets)
4242
* database - the collection of all datasets in the domain
4343
* groupbase - the collection of all groups in the domain
4444
* home - the domain the resource is a member of

Makefile

Lines changed: 10 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,177 +1,25 @@
1-
# Makefile for Sphinx documentation
1+
# Minimal makefile for Sphinx documentation
22
#
33

44
# You can set these variables from the command line.
55
SPHINXOPTS =
66
SPHINXBUILD = sphinx-build
7-
PAPER =
7+
SPHINXPROJ = HDFKita
8+
SOURCEDIR = .
89
BUILDDIR = _build
910

1011
# User-friendly check for sphinx-build
1112
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
1213
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
1314
endif
1415

15-
# Internal variables.
16-
PAPEROPT_a4 = -D latex_paper_size=a4
17-
PAPEROPT_letter = -D latex_paper_size=letter
18-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19-
# the i18n builder cannot share the environment and doctrees with the others
20-
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21-
22-
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
23-
16+
# Put it first so that "make" without argument is like "make help".
2417
help:
25-
@echo "Please use \`make <target>' where <target> is one of"
26-
@echo " html to make standalone HTML files"
27-
@echo " dirhtml to make HTML files named index.html in directories"
28-
@echo " singlehtml to make a single large HTML file"
29-
@echo " pickle to make pickle files"
30-
@echo " json to make JSON files"
31-
@echo " htmlhelp to make HTML files and a HTML help project"
32-
@echo " qthelp to make HTML files and a qthelp project"
33-
@echo " devhelp to make HTML files and a Devhelp project"
34-
@echo " epub to make an epub"
35-
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
36-
@echo " latexpdf to make LaTeX files and run them through pdflatex"
37-
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
38-
@echo " text to make text files"
39-
@echo " man to make manual pages"
40-
@echo " texinfo to make Texinfo files"
41-
@echo " info to make Texinfo files and run them through makeinfo"
42-
@echo " gettext to make PO message catalogs"
43-
@echo " changes to make an overview of all changed/added/deprecated items"
44-
@echo " xml to make Docutils-native XML files"
45-
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
46-
@echo " linkcheck to check all external links for integrity"
47-
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
48-
49-
clean:
50-
rm -rf $(BUILDDIR)/*
51-
52-
html:
53-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
54-
@echo
55-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
56-
57-
dirhtml:
58-
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
59-
@echo
60-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
61-
62-
singlehtml:
63-
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
64-
@echo
65-
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
66-
67-
pickle:
68-
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
69-
@echo
70-
@echo "Build finished; now you can process the pickle files."
71-
72-
json:
73-
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
74-
@echo
75-
@echo "Build finished; now you can process the JSON files."
76-
77-
htmlhelp:
78-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
79-
@echo
80-
@echo "Build finished; now you can run HTML Help Workshop with the" \
81-
".hhp project file in $(BUILDDIR)/htmlhelp."
82-
83-
qthelp:
84-
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
85-
@echo
86-
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
87-
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/h5serv.qhcp"
89-
@echo "To view the help file:"
90-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/h5serv.qhc"
91-
92-
devhelp:
93-
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
94-
@echo
95-
@echo "Build finished."
96-
@echo "To view the help file:"
97-
@echo "# mkdir -p $$HOME/.local/share/devhelp/h5serv"
98-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/h5serv"
99-
@echo "# devhelp"
100-
101-
epub:
102-
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
103-
@echo
104-
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
105-
106-
latex:
107-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
108-
@echo
109-
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
110-
@echo "Run \`make' in that directory to run these through (pdf)latex" \
111-
"(use \`make latexpdf' here to do that automatically)."
112-
113-
latexpdf:
114-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
115-
@echo "Running LaTeX files through pdflatex..."
116-
$(MAKE) -C $(BUILDDIR)/latex all-pdf
117-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
118-
119-
latexpdfja:
120-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
121-
@echo "Running LaTeX files through platex and dvipdfmx..."
122-
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
123-
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
124-
125-
text:
126-
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
127-
@echo
128-
@echo "Build finished. The text files are in $(BUILDDIR)/text."
129-
130-
man:
131-
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
132-
@echo
133-
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
134-
135-
texinfo:
136-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
137-
@echo
138-
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
139-
@echo "Run \`make' in that directory to run these through makeinfo" \
140-
"(use \`make info' here to do that automatically)."
141-
142-
info:
143-
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
144-
@echo "Running Texinfo files through makeinfo..."
145-
make -C $(BUILDDIR)/texinfo info
146-
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
147-
148-
gettext:
149-
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
150-
@echo
151-
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
152-
153-
changes:
154-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
155-
@echo
156-
@echo "The overview file is in $(BUILDDIR)/changes."
157-
158-
linkcheck:
159-
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
160-
@echo
161-
@echo "Link check complete; look for any errors in the above output " \
162-
"or in $(BUILDDIR)/linkcheck/output.txt."
163-
164-
doctest:
165-
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
166-
@echo "Testing of doctests in the sources finished, look at the " \
167-
"results in $(BUILDDIR)/doctest/output.txt."
18+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
16819

169-
xml:
170-
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
171-
@echo
172-
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
20+
.PHONY: help Makefile
17321

174-
pseudoxml:
175-
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
176-
@echo
177-
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
22+
# Catch-all target: route all unknown targets to Sphinx using the new
23+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
24+
%: Makefile
25+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

UsingIteration.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
Using Iteration
33
***************
44

5-
There are some operations that may return an arbitrary large list of results. For
5+
There are some operations that may return an arbitrarily large list of results. For
66
example: ``GET /groups/<id>/attributes`` returns all the attributes of the
77
group object with the given id. It's possible (if not common in practice) that the
88
group may contain hundreds or more attributes.
99

1010
If you desire to retrieve the list of attributes in batches (say you are developing a
1111
user interface that has a "get next page" style button), you can use iteration.
1212

13-
This is accomplished by adding query parameters to the request the limit the number of
13+
This is accomplished by adding query parameters to the request that limit the number of
1414
items returned and a marker parameter that identifies where the iteration should start
1515
off.
1616

17-
Let's flush out our example by supposing the group with UUID <id> has 1000 attributes
17+
Let's flesh out our example by supposing the group with UUID <id> has 1000 attributes
1818
named "a0000", "a0001", and so on.
1919

2020
If we'd like to retrieve just the first 100 attributes, we can add a limit value to the
@@ -31,7 +31,7 @@ marker value for the next request:
3131

3232
This request will return attributes "a0100", "a0101", through "a0199".
3333

34-
Repeat this pattern until less the limit items are returned. This indicates that you've
34+
Repeat this pattern until less than 'Limit' items are returned. This indicates that you've
3535
completed the iteration through all elements of the group.
3636

3737
Iteration is also supported for links in a group, and the groups, datasets, and datatypes

Utilities.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
Utilities
33
###################
44

5-
The h5serv distribution includes the following utility scripts. These are all
5+
The HDF Kita distribution includes the following utility scripts. These are all
66
located in the ``util`` directory.
77

8+
TODO: HSDS util scripts
89
dumpobjdb.py
910
------------
1011

0 commit comments

Comments
 (0)