Class: Serverspec::Type::OctopusDeployWorkerPool
- Inherits:
-
Base
- Object
- Base
- Serverspec::Type::OctopusDeployWorkerPool
- Defined in:
- lib/octopus_serverspec_extensions/type/octopus_deploy_worker_pool.rb
Instance Method Summary collapse
- #exists? ⇒ Boolean
-
#initialize(serverUrl, apiKey, worker_pool_name) ⇒ OctopusDeployWorkerPool
constructor
A new instance of OctopusDeployWorkerPool.
Constructor Details
#initialize(serverUrl, apiKey, worker_pool_name) ⇒ OctopusDeployWorkerPool
Returns a new instance of OctopusDeployWorkerPool.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/octopus_serverspec_extensions/type/octopus_deploy_worker_pool.rb', line 12 def initialize(serverUrl, apiKey, worker_pool_name) @name = "Octopus Deploy Worker Pool #{worker_pool_name}" @runner = Specinfra::Runner @serverUrl = serverUrl @apiKey = apiKey if (serverUrl.nil?) raise "'serverUrl' was not provided. Unable to connect to Octopus server to validate configuration." end if (apiKey.nil?) raise "'apiKey' was not provided. Unable to connect to Octopus server to validate configuration." end if (worker_pool_name.nil?) raise "'worker_pool_name' was not provided. Unable to connect to Octopus server to validate configuration." end @worker_pool = get_worker_pool_via_api(serverUrl, apiKey, worker_pool_name) end |
Instance Method Details
#exists? ⇒ Boolean
31 32 33 |
# File 'lib/octopus_serverspec_extensions/type/octopus_deploy_worker_pool.rb', line 31 def exists? (!@worker_pool.nil?) && (@worker_pool != []) end |