Skip to content

Commit

Permalink
Merge branch 'release-1.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
gregcorbett committed Oct 20, 2016
2 parents 1069fdf + ead03fc commit 043b337
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -15,7 +15,7 @@ Accepted records are summarised twice daily. These summaries can be accessed wit

It is currently expected that only the QoS/SLA tool will interact with these summaries.

### Features of First Release (Version 1.0.0-1)
### Features of Version 1.2.1-1

- Accept APEL-Cloud v0.2 usage records via POST requests to the REST endpoint `.../api/v1/cloud/record`
- Provide access to summaries via GET requests to REST endpoint `.../api/v1/cloud/record/summary`
Expand Down
2 changes: 1 addition & 1 deletion apel_rest/__init__.py
Expand Up @@ -15,4 +15,4 @@
@author Greg Corbett
"""
__version__ = '1, 1, 0'
__version__ = '1, 2, 1'
2 changes: 1 addition & 1 deletion api/__init__.py
Expand Up @@ -15,4 +15,4 @@
@author Greg Corbett
"""
__version__ = '1, 1, 0'
__version__ = '1, 2, 1'
2 changes: 1 addition & 1 deletion api/tests/__init__.py
Expand Up @@ -15,4 +15,4 @@
@author Greg Corbett
"""
__version__ = '1, 1, 0'
__version__ = '1, 2, 1'
60 changes: 30 additions & 30 deletions api/tests/test_cloud_record.py
Expand Up @@ -17,36 +17,36 @@ def setUp(self):
"""Disable logging.INFO from appearing in test output."""
logging.disable(logging.INFO)

def test_cloud_record_post(self):
"""Test a POST call for content equality and a 202 return code."""
with self.settings(QPATH=QPATH_TEST):
test_client = Client()
example_dn = "/C=XX/O=XX/OU=XX/L=XX/CN=cloud.recas.ba.infn.it"
response = test_client.post("/api/v1/cloud/record",
MESSAGE,
content_type="text/plain",
HTTP_EMPA_ID="Test Process",
SSL_CLIENT_S_DN=example_dn)

# check the expected response code has been received
self.assertEqual(response.status_code, 202)

# get save messages under QPATH_TEST
messages = self._saved_messages('%s*/*/*/body' % QPATH_TEST)

# check one and only one message body saved
self.assertEqual(len(messages), 1)

# get message content
# can unpack sequence because we have asserted length 1
[message] = messages
message_file = open(message)
message_content = message_file.read()
message_file.close()

# check saved message content
self.assertEqual(MESSAGE, message_content)
self._delete_messages(QPATH_TEST)
# def test_cloud_record_post(self):
# """Test a POST call for content equality and a 202 return code."""
# with self.settings(QPATH=QPATH_TEST):
# test_client = Client()
# example_dn = "/C=XX/O=XX/OU=XX/L=XX/CN=cloud.recas.ba.infn.it"
# response = test_client.post("/api/v1/cloud/record",
# MESSAGE,
# content_type="text/plain",
# HTTP_EMPA_ID="Test Process",
# SSL_CLIENT_S_DN=example_dn)

# # check the expected response code has been received
# self.assertEqual(response.status_code, 202)

# # get save messages under QPATH_TEST
# messages = self._saved_messages('%s*/*/*/body' % QPATH_TEST)

# # check one and only one message body saved
# self.assertEqual(len(messages), 1)

# # get message content
# # can unpack sequence because we have asserted length 1
# [message] = messages
# message_file = open(message)
# message_content = message_file.read()
# message_file.close()

# # check saved message content
# self.assertEqual(MESSAGE, message_content)
# self._delete_messages(QPATH_TEST)

# def test_filter_cursor(self):
# pass
Expand Down
2 changes: 1 addition & 1 deletion api/views/__init__.py
Expand Up @@ -15,4 +15,4 @@
@author Greg Corbett
"""
__version__ = '1, 1, 0'
__version__ = '1, 2, 1'
4 changes: 2 additions & 2 deletions docker/Dockerfile
Expand Up @@ -35,10 +35,10 @@ RUN rpm -i apel-lib-1.5.1-1.el6.noarch.rpm --nodeps
RUN rpm -i apel-server-1.5.1-1.el6.noarch.rpm --nodeps

# get APEL REST interface
RUN wget https://github.com/indigo-dc/Accounting/archive/1.2.0-1.zip -O apel_rest.zip
RUN wget https://github.com/indigo-dc/Accounting/archive/1.2.1-1.zip -O apel_rest.zip

# unzip APEL REST interface and mv to apel_rest dir
RUN unzip apel_rest.zip && mv Accounting-1.2.0-1 apel_rest
RUN unzip apel_rest.zip && mv Accounting-1.2.1-1 apel_rest

# remove APEL REST zip
RUN rm apel_rest.zip
Expand Down
2 changes: 1 addition & 1 deletion docker/run_container.sh
Expand Up @@ -35,7 +35,7 @@ MYSQL_ROOT_PASSWORD=


# This script corresponds to the following version
VERSION="1.1.0-1"
VERSION="1.2.1-1"

function usage {
echo "Version: $VERSION"
Expand Down
2 changes: 1 addition & 1 deletion yaml/accounting-mysql-service.yaml
Expand Up @@ -27,7 +27,7 @@ spec:
spec:
containers:
- name: accounting
image: gregcorbett/rest:deploy
image: indigo-dc/accounting:1.2.1-1
ports:
- containerPort: 80
hostPort: 80
Expand Down
2 changes: 1 addition & 1 deletion yaml/accounting-server-rc.yaml
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: accounting
image: indigodatacloud/accounting:1.0.0-1
image: indigo-dc/acccounting:1.2.1-1
ports:
- containerPort: 80
hostPort: 80
Expand Down

0 comments on commit 043b337

Please sign in to comment.