Skip to content

Commit

Permalink
fix: get_hosts ordered by hostname
Browse files Browse the repository at this point in the history
Closes: #511

Change-Id: Id918fe5df22c5137583a854fcd7cd9ca058b05f7
  • Loading branch information
grafuls committed Aug 26, 2024
1 parent 24a157c commit fdcfda3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/quads/server/dao/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def get_host(hostname) -> Optional[Host]:

@staticmethod
def get_hosts() -> List[Host]:
hosts = db.session.query(Host).all()
hosts = db.session.query(Host).order_by(Host.name.asc()).all()
return hosts

@staticmethod
Expand Down
12 changes: 6 additions & 6 deletions tests/cli/fixtures/metadata
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
- broken: false
default_cloud: cloud99
host_type: scalelab
model: R930
name: host2.example.com
retired: false
- broken: false
default_cloud: cloud99
disks:
Expand Down Expand Up @@ -37,6 +31,12 @@
threads: 4
vendor: Intel
retired: false
- broken: false
default_cloud: cloud99
host_type: scalelab
model: R930
name: host2.example.com
retired: false
- broken: false
default_cloud: cloud99
host_type: scalelab
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ skipsdist = True
deps = -rrequirements.txt
-rtests/requirements.txt
.
commands = pytest -p no:warnings --cov=quads.cli --cov=quads.server --cov=quads.tools --cov-report=xml --cov-config=.coveragerc --junitxml=junit-{envname}.xml
commands = pytest -vv -p no:warnings --cov=quads.cli --cov=quads.server --cov=quads.tools --cov-report=xml --cov-config=.coveragerc --junitxml=junit-{envname}.xml

0 comments on commit fdcfda3

Please sign in to comment.