Skip to content

Commit

Permalink
fix: web instack links and upped flask workers
Browse files Browse the repository at this point in the history
Change-Id: Id0906756e1ea0bb199e8acf8c7b6d671abceae1f
  • Loading branch information
grafuls committed Oct 29, 2024
1 parent 40a465d commit 6ab0de1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/quads/web/controller/CloudOperations.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ def get_cloud_summary_report(self) -> list:
cloud["percent"] = int(percent)
if cloud_name != 'cloud01':
if Config["openstack_management"]:
cloud["href_url_openstack"] = f"{Config['quads_url']}/instanck/{cloud_name}/_instackenv.json" if is_valid else "#"
cloud["href_url_openstack"] = f"{Config['quads_url']}/instack/{cloud_name}_instackenv.json" if is_valid else "#"
cloud["href_url_text_openstack"] = "download" if is_valid else "validating..."
if Config["openshift_management"]:
cloud["href_url_openshift"] = f"{Config['quads_url']}/instanck/{cloud_name}/_ocpinventory.json" if is_valid else "#"
cloud["href_url_openshift"] = f"{Config['quads_url']}/instack/{cloud_name}_ocpinventory.json" if is_valid else "#"
cloud["href_url_text_openshift"] = "download" if is_valid else "validating..."
cloud["href_color"] = "link-success" if is_valid else "link-danger"
clouds_summary.append(cloud)
Expand Down
2 changes: 1 addition & 1 deletion systemd/quads-web.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ After=network.target quads-server.service

[Service]
Type = simple
ExecStart = /usr/bin/gunicorn quads.web.app:flask_app -b :5001 -w 4 -k gthread --max-requests=5000 --max-requests-jitter=500 --log-level=INFO
ExecStart = /usr/bin/gunicorn quads.web.app:flask_app -b :5001 -w 8 -k gthread --max-requests=5000 --max-requests-jitter=500 --log-level=INFO
ExecStop = /usr/bin/pkill -f quads.web.app
Restart = always
StartLimitInterval = 60
Expand Down
9 changes: 6 additions & 3 deletions tests/cli/test_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,13 @@ def test_mod_cloud_bad_vlan(self):
self.cli_args["cloudticket"] = None
self.cli_args["vlan"] = "BADVLAN"

with pytest.raises(CliException) as ex:
self.quads_cli_call("modcloud")
self.quads_cli_call("modcloud")

assert str(ex.value) == "Could not parse vlan id. Only integers accepted."
assert self._caplog.messages[0] == "Cloud modified successfully"
cloud = CloudDao.get_cloud(MOD_CLOUD)
assignment = AssignmentDao.get_active_cloud_assignment(cloud)
assert assignment
assert assignment.vlan == None

@patch("quads.quads_api.requests.Session.get")
def test_ls_no_clouds(self, mock_get):
Expand Down

0 comments on commit 6ab0de1

Please sign in to comment.