Skip to content

Commit

Permalink
CRAYSAT-1923: Update sat bootsys to support CFS v2 or v3
Browse files Browse the repository at this point in the history
  • Loading branch information
annapoorna-s-alt committed Dec 2, 2024
1 parent cd20601 commit 409e17f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/man/sat-bootsys.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ These options apply to both the ``shutdown`` and ``boot`` actions.
**--bos-version BOS_VERSION**
The version of the BOS API to use when launching BOS sessions.

**--cfs-version CFS_VERSION**
The version of the CFS API to use when launching CFS sessions.

**--cle-bos-template** *CLE_BOS_TEMPLATE*
The name of the BOS session template for shutdown or boot of
COS (formerly known as CLE) compute nodes. If not specified, no
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ coverage==6.3.2
cray-product-catalog==2.4.1
croniter==0.3.37
cryptography==43.0.1
csm-api-client==2.2.3
csm-api-client==2.3.0
dataclasses-json==0.5.6
docutils==0.17.1
google-auth==2.6.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.lock.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ click==8.0.4
cray-product-catalog==2.4.1
croniter==0.3.37
cryptography==43.0.1
csm-api-client==2.2.3
csm-api-client==2.3.0
dataclasses-json==0.5.6
google-auth==2.6.0
htmlmin==0.1.12
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ argcomplete
boto3
botocore
cray-product-catalog >= 2.4.1
csm-api-client >= 2.2.3, <3.0
csm-api-client >= 2.3.0, <3.0
croniter >= 0.3, < 1.0
inflect >= 0.2.5, < 3.0
Jinja2 >= 3.0, < 4.0
Expand Down
6 changes: 6 additions & 0 deletions sat/cli/bootsys/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ def add_bootsys_subparser(subparsers):
help='The version of the BOS API to use for BOS operations',
)

bootsys_parser.add_argument(
'--cfs-version',
choices=['v2', 'v3'],
help='The version of the CFS API to use for CFS operations',
)

actions_subparsers = bootsys_parser.add_subparsers(
metavar='action', dest='action', help='The action to perform.'
)
Expand Down
2 changes: 1 addition & 1 deletion sat/cli/bootsys/service_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def get_active_sessions(self):
Raises:
ServiceCheckError: if unable to get the active CFS sessions.
"""
cfs_client = CFSClientBase.get_cfs_client(SATSession(), 'v2')
cfs_client = CFSClientBase.get_cfs_client(SATSession(), get_config_value('cfs.api_version'))
try:
sessions = cfs_client.get('sessions').json()
except (APIError, ValueError) as err:
Expand Down

0 comments on commit 409e17f

Please sign in to comment.