Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1131 from deNBI/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dweinholz authored Jun 20, 2022
2 parents b99ca2b + 98a0bcb commit 5362900
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 99 deletions.
13 changes: 9 additions & 4 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1460,11 +1460,10 @@ def delete_backend(self, id):
LOG.exception(e)
return str(-1)

def add_user_to_backend(self, backend_id, owner_id, user_id):
def add_user_to_backend(self, backend_id, user_id):
try:
post_url = f"{self.RE_BACKEND_URL}{self.USERS_URL}/{backend_id}"
user_info = {
"owner": owner_id,
"user": user_id,
}
except Exception as e:
Expand Down Expand Up @@ -1513,10 +1512,9 @@ def get_users_from_backend(self, backend_id):
LOG.info(msg=f"Get users for backend timed out. {e}")
return []

def delete_user_from_backend(self, backend_id, owner_id, user_id):
def delete_user_from_backend(self, backend_id, user_id):
delete_url = f"{self.RE_BACKEND_URL}{self.USERS_URL}/{backend_id}"
user_info = {
"owner": owner_id,
"user": user_id,
}
try:
Expand Down Expand Up @@ -2185,6 +2183,13 @@ def start_cluster(self, public_key, master_instance, worker_instances, user):
"masterInstance": master_instance,
"workerInstances": wI,
"useMasterWithPublicIp": False,
"ansibleGalaxyRoles": [
{
"name": "autoscaling",
"hosts": "master",
"git": "https://github.com/patricS4/autoscaling-config-ansible",
}
],
}
for mode in self.BIBIGRID_MODES:
body.update({mode: True})
Expand Down
16 changes: 6 additions & 10 deletions VirtualMachineService/VirtualMachineService-remote
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,9 @@ if len(sys.argv) <= 1 or sys.argv[1] == "--help":
print(" get_backends_by_template(string template)")
print(" Backend get_backend_by_id(i64 id)")
print(" string delete_backend(i64 id)")
print(" add_user_to_backend(i64 backend_id, string owner_id, string user_id)")
print(" add_user_to_backend(i64 backend_id, string user_id)")
print(" get_users_from_backend(i64 backend_id)")
print(
" delete_user_from_backend(i64 backend_id, string owner_id, string user_id)"
)
print(" delete_user_from_backend(i64 backend_id, string user_id)")
print(" get_templates()")
print(" get_allowed_templates()")
print(" get_templates_by_template(string template_name)")
Expand Down Expand Up @@ -585,14 +583,13 @@ elif cmd == "delete_backend":
)

elif cmd == "add_user_to_backend":
if len(args) != 3:
print("add_user_to_backend requires 3 args")
if len(args) != 2:
print("add_user_to_backend requires 2 args")
sys.exit(1)
pp.pprint(
client.add_user_to_backend(
eval(args[0]),
args[1],
args[2],
)
)

Expand All @@ -607,14 +604,13 @@ elif cmd == "get_users_from_backend":
)

elif cmd == "delete_user_from_backend":
if len(args) != 3:
print("delete_user_from_backend requires 3 args")
if len(args) != 2:
print("delete_user_from_backend requires 2 args")
sys.exit(1)
pp.pprint(
client.delete_user_from_backend(
eval(args[0]),
args[1],
args[2],
)
)

Expand Down
88 changes: 14 additions & 74 deletions VirtualMachineService/VirtualMachineService.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docker-compose.bibigrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:

client_redis:
container_name: client_redis
image: redis:7.0.1
image: redis:7.0.2
expose:
- "6379"
networks:
Expand All @@ -40,7 +40,7 @@ services:

# filebeat
filebeat:
image: docker.elastic.co/beats/filebeat:8.2.2
image: docker.elastic.co/beats/filebeat:8.2.3
env_file:
- .env
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev.bibigrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:

client_redis:
container_name: client_redis
image: redis:7.0.1
image: redis:7.0.2
expose:
- "6379"
networks:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:

client_redis:
container_name: client_redis
image: redis:7.0.1
image: redis:7.0.2
expose:
- "6379"
networks:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:

client_redis:
container_name: client_redis
image: redis:7.0.1
image: redis:7.0.2
expose:
- "6379"
networks:
Expand All @@ -26,7 +26,7 @@ services:
# filebeat
filebeat:
container_name: client_filebeat
image: docker.elastic.co/beats/filebeat:8.2.2
image: docker.elastic.co/beats/filebeat:8.2.3
env_file:
- .env
volumes:
Expand Down
Loading

0 comments on commit 5362900

Please sign in to comment.