Skip to content

Commit

Permalink
update changelog, sort, black
Browse files Browse the repository at this point in the history
  • Loading branch information
kthare10 committed Nov 6, 2024
1 parent 939e959 commit 1d6626d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## 1.8.0 - TBD

### Added
- Advance Scheduling Improvements (Issue [#388](https://github.com/fabric-testbed/fabrictestbed-extensions/issues/388))

## [1.7.4] - 11/05/2024

Expand Down
16 changes: 12 additions & 4 deletions fabrictestbed_extensions/fablib/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2411,12 +2411,20 @@ def submit(
# Generate Slice Graph
slice_graph = self.get_fim_topology().serialize()

start_time_str = lease_start_time.strftime("%Y-%m-%d %H:%M:%S %z") if lease_start_time else None
end_time_str = lease_end_time.strftime("%Y-%m-%d %H:%M:%S %z") if lease_end_time else None
start_time_str = (
lease_start_time.strftime("%Y-%m-%d %H:%M:%S %z")
if lease_start_time
else None
)
end_time_str = (
lease_end_time.strftime("%Y-%m-%d %H:%M:%S %z") if lease_end_time else None
)

# Create slice now or Renew slice
if lease_in_hours and not lease_start_time and not lease_end_time:
end_time_str = (datetime.now(timezone.utc) + timedelta(hours=lease_in_hours)).strftime("%Y-%m-%d %H:%M:%S %z")
end_time_str = (
datetime.now(timezone.utc) + timedelta(hours=lease_in_hours)
).strftime("%Y-%m-%d %H:%M:%S %z")

# Request slice from Orchestrator
if self._is_modify():
Expand Down Expand Up @@ -2459,7 +2467,7 @@ def submit(
ssh_key=ssh_keys,
lease_end_time=end_time_str,
lease_start_time=start_time_str,
lifetime=lease_in_hours
lifetime=lease_in_hours,
)
if return_status == Status.OK:
logging.info(
Expand Down

0 comments on commit 1d6626d

Please sign in to comment.