Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Davide Principi <[email protected]>
  • Loading branch information
tommaso-ascani and DavidePrincipi committed Sep 17, 2024
1 parent c799749 commit c6fb08f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ request = json.load(sys.stdin)
module_env = os.getenv("AGENT_TASK_USER")

if module_env != "" and module_env != f"module/{request['module_id']}":
print(agent.SD_ERR + f"Agent {module_env} do not have permission to change port allocation for another module.")
print(agent.SD_ERR + f"Agent {module_env} does not have permission to change the port allocation for {request['module_id']}.")
sys.exit(1)

range = node.ports_manager.allocate_ports(int(request['ports']), request['module_id'], request['protocol'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"module_id": {
"type": "string",
"title": "Module identifier",
"description": "Name of module that is asking to allocate ports"
"description": "Ports are allocated to the given module."
},
"protocol": {
"type": "string",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ request = json.load(sys.stdin)
module_env = os.getenv("AGENT_TASK_USER")

if module_env != "" and module_env != f"module/{request['module_id']}":
print(agent.SD_ERR + f"Agent {module_env} do not have permission to change port allocation for another module.")
print(agent.SD_ERR + f"Agent {module_env} does not have permission to change the port allocation for {request['module_id']}.")
sys.exit(1)

range = node.ports_manager.deallocate_ports(request['module_id'], request['protocol'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"module_id": {
"type": "string",
"title": "Module identifier",
"description": "Name of module that is asking to deallocate ports"
"description": "Ports are deallocated from the given module."
},
"protocol": {
"type": "string",
Expand Down

0 comments on commit c6fb08f

Please sign in to comment.