ood_core 0.24.1 → 0.24.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d7ae635ec6299414feac4de3589bea126a97cd427507bd99242f0bcb79553b4
4
- data.tar.gz: 29855a0d0573e1d51fe6ebf7a0679c37993c608f77e45f804f6851d84160620c
3
+ metadata.gz: '08f64f135dbbf6ea8058870d4339c1669586deed5be368d54dd0ff3ae476d8b0'
4
+ data.tar.gz: 3f04d4f98590cbaa3ce502fca901e23e67638442b2daa6621bc5fb5c640a91ae
5
5
  SHA512:
6
- metadata.gz: 6b93ec8179ffca892538e5bdd8bcc1eae6adceac3a2d898079c7f8f3a60d5cd04ac64569e71ba0af2fb9ab9833a9b7f6d0c1f845cde1487eaf3d9c8f90b382d8
7
- data.tar.gz: 2919276a9ade663afce93339602304f0fc727fa392d6f711f0166b82003c51e8765520603c93047919e4f1d1b81104723fd5ac05c760e891e90ab3a13a5d1c8e
6
+ metadata.gz: 0ca0bdf738b58a61f45c030cc202b3a035d0f33782d7a125d5367fcd63e3fe5f83b70c60a61b772fd3ec5872742632af571c7d9be154845b4836e1fe8659d96c
7
+ data.tar.gz: 2e7c8f01385fb2553e0ac5774442e3d4b1fca9cee72b1c8fd80b9a4436bcbf297ebce7a0a3e802a7e40fffab1a611c8d02ff74cf19d2c4a627ee5e755ed63581
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ # [0.24.2] - 01-24-2024
11
+
12
+ - [823](https://github.com/OSC/ood_core/pull/823) Corrected a mistake in converting duration to seconds.
13
+ * [821](https://github.com/OSC/ood_core/pull/821) add container_start_args to pass options to the start command.
14
+
10
15
  ## [0.24.1] - 11-29-2023
11
16
 
12
17
  [820](https://github.com/OSC/ood_core/pull/820) Reverts [818](https://github.com/OSC/ood_core/pull/818)
@@ -524,7 +529,10 @@ Functionally the same as [0.17.3] but with some CI updates.
524
529
  ### Added
525
530
  - Initial release!
526
531
 
527
- [Unreleased]: https://github.com/OSC/ood_core/compare/v0.23.4...HEAD
532
+ [Unreleased]: https://github.com/OSC/ood_core/compare/v0.24.2...HEAD
533
+ [0.24.2]: https://github.com/OSC/ood_core/compare/v0.24.1...v0.24.2
534
+ [0.24.1]: https://github.com/OSC/ood_core/compare/v0.24.0...v0.24.1
535
+ [0.24.0]: https://github.com/OSC/ood_core/compare/v0.23.5...v0.24.0
528
536
  [0.23.5]: https://github.com/OSC/ood_core/compare/v0.23.4...v0.23.5
529
537
  [0.23.4]: https://github.com/OSC/ood_core/compare/v0.23.3...v0.23.4
530
538
  [0.23.3]: https://github.com/OSC/ood_core/compare/v0.23.2...v0.23.3
@@ -70,6 +70,8 @@ module OodCore
70
70
  # empty string.
71
71
  # @option context [#to_s] :container_command ("singularity") the
72
72
  # singularity or apptainer execution command
73
+ # @option context [#to_a] :container_start_args ([]) Additional
74
+ # arguements you wish to pass to the container start command.
73
75
  # @param instance_name (uuid) a name for the instance
74
76
  # @see Template
75
77
 
@@ -99,8 +101,8 @@ module OodCore
99
101
  export INSTANCE_NAME="#{@instance_name}"
100
102
  export instance_name="#{@instance_name}"
101
103
  echo "Starting instance..."
102
- #{container_command} instance start #{container_path} #{@instance_name}
103
-
104
+ #{container_command} instance start #{container_start_args} #{container_path} #{@instance_name}
105
+
104
106
  # Setup one-time use passwords and initialize the VNC password
105
107
  function change_passwd () {
106
108
  echo "Setting VNC password..."
@@ -219,6 +221,10 @@ module OodCore
219
221
  context.fetch(:container_command, "singularity").to_s
220
222
  end
221
223
 
224
+ def container_start_args
225
+ context.fetch(:container_start_args, []).to_a.join(' ')
226
+ end
227
+
222
228
  # Arguments sent to `vncserver` command
223
229
  def vnc_args
224
230
  context.fetch(:vnc_args) do
@@ -386,9 +386,8 @@ module OodCore
386
386
  # Convert duration to seconds
387
387
  def duration_in_seconds(time)
388
388
  return 0 if time.nil? or time == "-"
389
- time, days = time.split("-").reverse
390
- days.to_i * 24 * 3600 +
391
- time.split(':').map { |v| v.to_i }.inject(0) { |total, v| total * 60 + v }
389
+ matched = time.match(/\((\d+\))/)
390
+ return matched ? matched[1].to_i : 0
392
391
  end
393
392
 
394
393
  # Convert seconds to duration
@@ -1,4 +1,4 @@
1
1
  module OodCore
2
2
  # The current version of {OodCore}
3
- VERSION = "0.24.1"
3
+ VERSION = "0.24.2"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ood_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.1
4
+ version: 0.24.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Franz
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2023-11-29 00:00:00.000000000 Z
13
+ date: 2024-01-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ood_support