Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tcmitchell committed Jan 31, 2017
2 parents a3c797a + 80b573f commit ce5f92c
Show file tree
Hide file tree
Showing 16 changed files with 435 additions and 133 deletions.
21 changes: 21 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# GENI Clearinghouse Release Notes

# [Release 2.17](https://github.com/GENI-NSF/geni-ch/milestones/2.17)

## Changes

* Add service enabling to CentOS install guide
([#534](https://github.com/GENI-NSF/geni-ch/issues/534))
* Create a version file for get_version responses
([#540](https://github.com/GENI-NSF/geni-ch/issues/540))
* Move one-time initialization to WSGI files
([#542](https://github.com/GENI-NSF/geni-ch/issues/542))
* Require client certificate httpd config template
([#544](https://github.com/GENI-NSF/geni-ch/issues/544))
* Convert timestamps for opsmon properly to GMT
([#546](https://github.com/GENI-NSF/geni-ch/issues/546))
* Define "WSGIProcessGroup" in ch-ssl.conf template
([#548](https://github.com/GENI-NSF/geni-ch/issues/548))

## Installation Notes

* None

# [Release 2.16](https://github.com/GENI-NSF/geni-ch/milestones/2.16)

## Changes
Expand Down
17 changes: 17 additions & 0 deletions INSTALL-centos.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,20 @@ geni-add-trusted-tool -d portal -u portal -p portal --host localhost \
Open up Firewall if necessary
-----------------------------
If your machine is running firewall software it may be necessary for you to add rules to allow connections to the Clearinghouse. The ports that need to be open are 22(SSH), 80(HTTP), 443(HTTPS) and 8444(Clearinghouse).

Enable HTTPD and SHIBD services to start at boot time
-----------------------------------------------------

The following command will enable the HTTPD service (Apache) to start
at boot time:

````sh
sudo systemctl enable httpd.service
````

The following command will verify that the HTTPD service is set to start
at boot time. This should report "enabled".

````sh
sudo systemctl is-enabled httpd.service
````
17 changes: 6 additions & 11 deletions Makefile.sync
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ RSYNC_EXCLUDE = --exclude .git --exclude '*~' \
RSYNC_DELETE = --delete --delete-excluded
RSYNC_ARGS = -aztv $(RSYNC_EXCLUDE)

GITHASH = etc/geni-chapi-githash

# This will probably be "../geni-ch"
SRC_DIR = ../$(notdir $(CURDIR))

Expand All @@ -21,23 +19,20 @@ SRC_DIR = ../$(notdir $(CURDIR))
default:
echo "Choose a specific sync target."

$(GITHASH): .git
git rev-parse HEAD > $@

syncb: $(GITHASH)
syncb:
$(RSYNC) $(RSYNC_ARGS) $(SRC_DIR) bigslide.gpolab.bbn.com:

syncd: $(GITHASH)
syncd:
$(RSYNC) $(RSYNC_ARGS) $(SRC_DIR) dagoola.gpolab.bbn.com:

syncm: $(GITHASH)
syncm:
$(RSYNC) $(RSYNC_ARGS) $(SRC_DIR) marilac.gpolab.bbn.com:

synci: $(GITHASH)
synci:
$(RSYNC) $(RSYNC_ARGS) $(SRC_DIR) illyrica.gpolab.bbn.com:

syncc: $(GITHASH)
syncc:
$(RSYNC) $(RSYNC_ARGS) $(SRC_DIR) cascade.gpolab.bbn.com:

syncn: $(GITHASH)
syncn:
$(RSYNC) $(RSYNC_ARGS) $(SRC_DIR) nye.gpolab.bbn.com:
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Specify package name, version, bug report URL, tar name, and URL
AC_INIT([GENI Clearinghouse], [2.16],
AC_INIT([GENI Clearinghouse], [2.17],
[https://github.com/GENI-NSF/geni-ch/issues], [geni-chapi],
[https://github.com/GENI-NSF/geni-ch])
AM_INIT_AUTOMAKE([foreign -Wall -Wno-portability])
Expand All @@ -20,8 +20,6 @@ AC_ARG_ENABLE([gpo_lab],
esac],[gpo_lab=false])
AM_CONDITIONAL([GPO_LAB], [test x$gpo_lab = xtrue])

AM_CONDITIONAL(INSTALL_GITHASH, [test -f etc/geni-chapi-githash])

AC_CONFIG_FILES([Makefile plugins/Makefile tools/Makefile etc/Makefile])
AC_CONFIG_FILES([bin/Makefile man/Makefile data/Makefile db/Makefile])
AC_CONFIG_FILES([templates/Makefile])
Expand Down
226 changes: 226 additions & 0 deletions docs/RequestAPI.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
= Clearinghouse Request API =

This API handles project join requests.

_This document is incomplete. More information and detail is needed._
_This should be considered a first draft._
_https://github.com/GENI-NSF/geni-ch/issues/new[Bug reports] are welcome._

== Common arguments ==

=== Context Type ===

These constants are enumerated in `tools/geni_constants.py`. Only `PROJECT_CONTEXT`
is currently used in the clearinghouse.

[source]
--------
PROJECT_CONTEXT = 1
SLICE_CONTEXT = 2
RESOURCE_CONTEXT = 3
SERVICE_CONTEXT = 4
MEMBER_CONTEXT = 5
--------

=== Status ===

The status of a given request. Requests can have one of the following statuses:

[source]
--------
PENDING = 0;
APPROVED = 1;
CANCELLED = 2;
REJECTED = 3;
--------

Cancelled means the user withdrew the request.

=== Return Values ===

All return values are in the form of a three element struct. Each API
method below only documents the 'value' entry of this triple.

----------
{
'code': <integer>,
'value': <some value>,
'output': <an error string if 'code' is non-zero>
}
----------

== create_request ==

Creates a new request.

=== Synopsis ===

[source,python]
-------------
create_request(context_type, context_id, request_type, request_text,
request_details, credentials, options)
-------------

=== Arguments ===

* context_type - an integer indicating the type of `context_id`. Should always be PROJECT_CONTEXT. See "Context Type" above.
* context_id - a UUID, usually a project ID
* request_type - ?
* request_text - ?
* request_details - ?
* credentials - a list of credentials, can be empty
* options - an XML-RPC struct (Python dict). Ignored.

=== Return value ===

The request id as an integer.

== resolve_pending_request ==

Resolves the request by adding resolution columns in the database.

_This call does not add members to projects, it only closes out the_
_request object. If the request is approved, a separate call should_
_be made to add members to the project._

=== Synopsis ===

[source,python]
-------------
resolve_pending_request(context_type, request_id, resolution_status,
resolution_description, credentials, options)
-------------

=== Arguments ===

* context_type - an integer indicating the type of `context_id`. Should always be PROJECT_CONTEXT. See "Context Type" above.
* request_id - a integer id of a request
* resolution_status - an integer status (see status above)
* resolution_description - ?
* credentials - a list of credentials, can be empty
* options - an XML-RPC struct (Python dict). Ignored.

=== Return value ===

Boolean True

== get_requests_for_context ==

Gets the all the requests for a given project.

=== Synopsis ===

[source,python]
-------------
get_requests_for_context(context_type, context_id, status,
credentials, options)
-------------

=== Arguments ===

* context_type - an integer indicating the type of `context_id`. Should always be PROJECT_CONTEXT. See "Context Type" above.
* context_id - a UUID, usually a project ID
* status - an integer status, see above
* credentials - a list of credentials, can be empty
* options - an XML-RPC struct (Python dict). Ignored.

=== Return value ===

The request id as an integer.

== get_requests_by_user ==

Gets requests submitted by the given user.

=== Synopsis ===

[source,python]
-------------
get_requests_by_user(member_id, context_type, context_id, status,
credentials, options)
-------------

=== Arguments ===

* member_id - the UUID of the member who submitted the requests
* context_type - an integer indicating the type of `context_id`. Should always be PROJECT_CONTEXT. See "Context Type" above.
* context_id - a UUID, usually a project ID
* status - an integer status, see above
* credentials - a list of credentials, can be empty
* options - an XML-RPC struct (Python dict). Ignored.

=== Return value ===

A list of request structs. If there are no requests submitted by
the given member, the list will be empty.

== get_pending_requests_for_user ==

Get the pending requests that the given user can act upon.

=== Synopsis ===

[source,python]
-------------
get_pending_requests_for_user(member_id, context_type, context_id,
credentials, options)
-------------

=== Arguments ===

* member_id - the UUID of the member who may act on the requests
* context_type - an integer indicating the type of `context_id`. Should always be PROJECT_CONTEXT. See "Context Type" above.
* context_id - a UUID, usually a project ID
* credentials - a list of credentials, can be empty
* options - an XML-RPC struct (Python dict). Ignored.

=== Return value ===

A list of request structs. If there are no requests to be acted upon
the list will be empty.

== get_number_of_pending_requests_for_user ==

Get the number of pending requests that the given user can act upon.

=== Synopsis ===

[source,python]
-------------
get_number_of_pending_requests_for_user(member_id, context_type, context_id,
credentials, options)
-------------

=== Arguments ===

* member_id - the UUID of the member who may act on the requests
* context_type - an integer indicating the type of `context_id`. Should always be PROJECT_CONTEXT. See "Context Type" above.
* context_id - a UUID, usually a project ID
* credentials - a list of credentials, can be empty
* options - an XML-RPC struct (Python dict). Ignored.

=== Return value ===

An integer indicating the number of pending requests.

== get_request_by_id ==

Get a specific request by supplying the request id.

=== Synopsis ===

[source,python]
-------------
get_request_by_id(request_id, context_type, credentials, options)
-------------

=== Arguments ===

* request_id - an integer id of a request
* context_type - an integer indicating the type of the request. Should always be PROJECT_CONTEXT. See "Context Type" above.
* credentials - a list of credentials, can be empty
* options - an XML-RPC struct (Python dict). Ignored.

=== Return value ===

The request as an XML-RPC struct.
1 change: 0 additions & 1 deletion etc/.gitignore

This file was deleted.

28 changes: 23 additions & 5 deletions etc/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
pkgsysconfdir = $(sysconfdir)/$(PACKAGE)

edit = sed -e 's|@VERSION[@]|$(VERSION)|g'

TEMPLATES = geni-ch-version.txt

TEMPLATES.IN = $(TEMPLATES:%=%.in)

$(TEMPLATES): Makefile
rm -f $@ $@.tmp
srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit) $${srcdir}$@.in >$@.tmp
chmod a-w $@.tmp
mv $@.tmp $@

%: $(srcdir)/%.in

# Distribute but do not install
EXTRA_DIST = $(TEMPLATES.IN)

CLEANFILES = $(TEMPLATES)

dist_pkgsysconf_DATA = \
example-chapi.ini \
example-parameters.json \
geni-ch-version.txt \
logging_config.conf \
credential_store_policy.json \
logging_policy.json \
member_authority_policy.json \
slice_authority_policy.json

if INSTALL_GITHASH
pkgsysconf_DATA = geni-chapi-githash
endif
slice_authority_policy.json
1 change: 1 addition & 0 deletions etc/geni-ch-version.txt.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@VERSION@
3 changes: 2 additions & 1 deletion geni-chapi.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: geni-chapi
Version: 2.16
Version: 2.17
Release: 1%{?dist}
Summary: GENI clearinghouse
BuildArch: noarch
Expand Down Expand Up @@ -47,6 +47,7 @@ rm -rf $RPM_BUILD_ROOT
%config %{_sysconfdir}/%{name}/credential_store_policy.json
%config %{_sysconfdir}/%{name}/example-chapi.ini
%config %{_sysconfdir}/%{name}/example-parameters.json
%config %{_sysconfdir}/%{name}/geni-ch-version.txt
%config %{_sysconfdir}/%{name}/logging_config.conf
%config %{_sysconfdir}/%{name}/logging_policy.json
%config %{_sysconfdir}/%{name}/member_authority_policy.json
Expand Down
Loading

0 comments on commit ce5f92c

Please sign in to comment.