Skip to content

Commit

Permalink
allow disable auto refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed Jan 26, 2024
1 parent 4c2ef71 commit 31de18a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## [1.6.3] - 2024-01-26

### Fixed

- Ability to disable auto refresh tokens (Issue [#277](https://github.com/fabric-testbed/fabrictestbed-extensions/issues/277))
- Use L2STS when connecting two facility ports via L2 (Issue [#275](https://github.com/fabric-testbed/fabrictestbed-extensions/issues/275))

## [1.6.2] - 2024-01-23
Expand Down
4 changes: 4 additions & 0 deletions fabrictestbed_extensions/fablib/fablib.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ def __init__(
output: str = None,
execute_thread_pool_size: int = 64,
offline: bool = False,
auto_token_refresh: bool = True,
**kwargs,
):
"""
Expand Down Expand Up @@ -615,6 +616,7 @@ def __init__(
:param offline: Avoid using FABRIC services when initializing.
This is ``False`` by default, and set to ``True`` only in
some unit tests.
:param auto_token_refresh: Auto refresh tokens
"""
super().__init__(
fabric_rc=fabric_rc,
Expand Down Expand Up @@ -644,6 +646,7 @@ def __init__(
self.resources = None
self.links = None
self.facility_ports = None
self.auto_token_refresh = auto_token_refresh

if not offline:
self.ssh_thread_pool_executor = ThreadPoolExecutor(execute_thread_pool_size)
Expand Down Expand Up @@ -959,6 +962,7 @@ def __build_slice_manager(self) -> SliceManager:
token_location=self.get_token_location(),
initialize=True,
scope="all",
auto_refresh=self.auto_token_refresh
)
self.slice_manager.initialize()
logging.debug("Slice manager initialized!")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies = [
"ipyleaflet",
"ipycytoscape",
"tabulate",
"fabrictestbed==1.6.7",
"fabrictestbed==1.6.8",
"paramiko",
"jinja2>=3.0.0",
"pandas",
Expand Down

0 comments on commit 31de18a

Please sign in to comment.