Skip to content

Commit

Permalink
Merge pull request #101 from grycap/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
micafer authored Dec 20, 2023
2 parents 81daa35 + 0c59741 commit 875ae95
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Dockerfile to create a container with the IM client
FROM alpine:3.16
LABEL maintainer="Miguel Caballer <micafer1@upv.es>"
LABEL version="1.7.0"
LABEL version="1.8.0"
LABEL description="Container image to run the IM client. (http://www.grycap.upv.es/im)"

# Install python3
RUN apk add --no-cache python3 py3-requests jq bash

# Install IM client
RUN apk add --no-cache py3-pip && \
pip3 install im-client==1.7.0 && \
pip3 install im-client==1.8.0 && \
apk del --no-cache py3-pip

COPY im_client.cfg /im-client/im_client.cfg
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.oidc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Dockerfile to create a container with the IM client
FROM ubuntu:22.04
LABEL maintainer="Miguel Caballer <micafer1@upv.es>"
LABEL version="1.7.0-oidc"
LABEL version="1.8.0-oidc"
LABEL description="Container image to run the IM client. (http://www.grycap.upv.es/im)"

# Install python3
Expand All @@ -11,7 +11,7 @@ RUN apt update && \
apt-key adv --keyserver hkp://pgp.surfnet.nl --recv-keys ACDFB08FDC962044D87FF00B512839863D487A87 && \
apt update && \
apt install -y --no-install-recommends python3-requests jq python3-pip oidc-agent && \
pip install im-client==1.7.0 && \
pip install im-client==1.8.0 && \
apt-get purge -y python-pip && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/

Expand Down
4 changes: 2 additions & 2 deletions im_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,12 @@ def main(operation, options, args, parser):
elif operation == "create_wait_outputs":
success, inf_id = imclient._create()
if not success:
print('{"error": "%s"}' % inf_id)
print(json.dumps({'error': inf_id}))
return False
imclient.args = [inf_id]
success, error = imclient._wait()
if not success:
print('{"infid": "%s", "error": "%s"}' % (inf_id, error))
print(json.dumps({'error': error, 'infid': inf_id}))
return False
success, outputs = imclient._get_infra_property("outputs")
if success:
Expand Down
3 changes: 3 additions & 0 deletions imclient/imclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ def create(self, inf_desc, desc_type="radl", asyncr=False):
def _create(self):
radl_file = self._get_radl(0)
asyncr = False
# by default asyncr is False, but in case of REST API, it is True
if self.options.restapi:
asyncr = True
if len(self.args) >= 2:
asyncr = bool(int(self.args[1]))

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from setuptools import setup

setup(name="IM-client", version="1.7.0",
setup(name="IM-client", version="1.8.0",
author='GRyCAP - Universitat Politecnica de Valencia',
author_email='micafer1@upv.es',
url='http://www.grycap.upv.es/im',
Expand Down

0 comments on commit 875ae95

Please sign in to comment.