vagrant-delphix 0.1.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9045bcce53bb29434dae1f6d6d187dbda846e832
4
- data.tar.gz: bc20988049ca2e63023e57b362b71048cc3b8012
3
+ metadata.gz: 6ebb2dc50427468204e85062a32aff1c1fed2b05
4
+ data.tar.gz: ce41033a44d50ad38e7d716540758de5f0c0142f
5
5
  SHA512:
6
- metadata.gz: 9d54f5da24dc423a3150a7be3eac23d5160361739452f27f588c2413bbf1cae08db908b54437a1979bfacc805021980d548827ec5945c89ce312e45b8abfd27a
7
- data.tar.gz: bdcd6eae4951d46c7da4f6d5846150ebfadaeeacd5bf1c0c2e2ad3de1d88fbe8261d8ce25436a8cafdd92f2a89e204f5daef0fa8d3cc1c6b9f11d4ff97af406b
6
+ metadata.gz: 963ffb7d9892261c234bd321d9c54c456b1d586db1d484d2e373b6d0b79558f48d2b2070d648475a80b077d7bd0b7c7ffa829fff91f6c221150bf8544a6d7a66
7
+ data.tar.gz: b7c214a2217415db297b1c0b7c07321b2c2f09068510ab58eb83ac663979924e6217a669664bef7357510fa1db115250d9d9d35e503bf96468695d714b5804dc
@@ -5,44 +5,44 @@ require 'vagrant-delphix/util'
5
5
  module VagrantPlugins
6
6
  module DelphixEngine
7
7
  module Action
8
-
8
+
9
9
  class DestroyEnvironment
10
10
  include VagrantPlugins::DelphixEngine::Util
11
-
11
+
12
12
  def initialize(app, env)
13
13
  @app = app
14
14
  @machine = env[:machine]
15
15
  @global_env = @machine.env
16
16
  @provider = @machine.provider_name
17
17
  @logger = Log4r::Logger.new('vagrant::delphix_engine::create_environment')
18
-
18
+
19
19
  @config = get_config(@machine)
20
-
20
+
21
21
  end
22
22
 
23
23
  def call(env)
24
24
  # skip if plugin is not active on destroy action
25
25
  return @app.call(env) if !@config.enabled
26
-
26
+
27
27
  # set the DE url
28
28
  Delphix.url = @config.engine_url
29
29
  Delphix.debug = @config.trace
30
30
 
31
31
  # authenticate the connection
32
32
  Delphix.authenticate!(@config.engine_user,@config.engine_password)
33
-
33
+
34
34
  # lookup the environment
35
- environments = Delphix.environments
35
+ environments = Delphix::Environment.list
36
36
  environment = environments.lookup_by_name @config.env_name
37
-
37
+
38
38
  # delete the environment from Delphix
39
39
  environment.delete if environment != nil
40
-
40
+
41
41
  @app.call(env)
42
42
  end
43
-
43
+
44
44
  end # end class
45
-
45
+
46
46
  end
47
47
  end
48
48
  end
@@ -5,43 +5,43 @@ require 'vagrant-delphix/util'
5
5
  module VagrantPlugins
6
6
  module DelphixEngine
7
7
  module Action
8
-
8
+
9
9
  class DisableEnvironment
10
10
  include VagrantPlugins::DelphixEngine::Util
11
-
11
+
12
12
  def initialize(app, env)
13
13
  @app = app
14
14
  @machine = env[:machine]
15
15
  @global_env = @machine.env
16
16
  @provider = @machine.provider_name
17
17
  @logger = Log4r::Logger.new('vagrant::delphix_engine::create_environment')
18
-
18
+
19
19
  @config = get_config(@machine)
20
20
  end
21
21
 
22
22
  def call(env)
23
23
  # skip if plugin is not active on destroy action
24
24
  return @app.call(env) if !@config.enabled
25
-
25
+
26
26
  # set the DE url
27
27
  Delphix.url = @config.engine_url
28
28
  Delphix.debug = @config.trace
29
29
 
30
30
  # authenticate the connection
31
31
  Delphix.authenticate!(@config.engine_user,@config.engine_password)
32
-
32
+
33
33
  # lookup the environment
34
- environments = Delphix.environments
34
+ environments = Delphix::Environment.list
35
35
  environment = environments.lookup_by_name @config.env_name
36
-
36
+
37
37
  # delete the environment from Delphix
38
38
  environment.disable if environment != nil
39
-
39
+
40
40
  @app.call(env)
41
41
  end
42
-
42
+
43
43
  end # end class
44
-
44
+
45
45
  end
46
46
  end
47
47
  end
@@ -5,43 +5,43 @@ require 'vagrant-delphix/util'
5
5
  module VagrantPlugins
6
6
  module DelphixEngine
7
7
  module Action
8
-
8
+
9
9
  class EnableEnvironment
10
10
  include VagrantPlugins::DelphixEngine::Util
11
-
11
+
12
12
  def initialize(app, env)
13
13
  @app = app
14
14
  @machine = env[:machine]
15
15
  @global_env = @machine.env
16
16
  @provider = @machine.provider_name
17
17
  @logger = Log4r::Logger.new('vagrant::delphix_engine::create_environment')
18
-
18
+
19
19
  @config = get_config(@machine)
20
20
  end
21
21
 
22
22
  def call(env)
23
23
  # skip if plugin is not active on destroy action
24
24
  return @app.call(env) if !@config.enabled
25
-
25
+
26
26
  # set the DE url
27
27
  Delphix.url = @config.engine_url
28
28
  Delphix.debug = @config.trace
29
29
 
30
30
  # authenticate the connection
31
31
  Delphix.authenticate!(@config.engine_user,@config.engine_password)
32
-
32
+
33
33
  # lookup the environment
34
- environments = Delphix.environments
34
+ environments = Delphix::Environment.list
35
35
  environment = environments.lookup_by_name @config.env_name
36
-
36
+
37
37
  # delete the environment from Delphix
38
38
  environment.enable if environment != nil
39
-
39
+
40
40
  @app.call(env)
41
41
  end
42
-
42
+
43
43
  end # end class
44
-
44
+
45
45
  end
46
46
  end
47
47
  end
@@ -7,7 +7,7 @@ module VagrantPlugins
7
7
 
8
8
  class Provisioner < Vagrant.plugin('2', :provisioner)
9
9
  include VagrantPlugins::DelphixEngine::Util
10
-
10
+
11
11
  def initialize(machine, config)
12
12
  super(machine, config)
13
13
  @config = get_config(machine)
@@ -17,18 +17,18 @@ module VagrantPlugins
17
17
 
18
18
  # skip if plugin is not active on destroy action
19
19
  return if !@config.enabled
20
-
20
+
21
21
  # set the DE url
22
22
  Delphix.url = @config.engine_url
23
23
  Delphix.debug = @config.trace
24
24
 
25
25
  # authenticate the connection
26
26
  Delphix.authenticate!(@config.engine_user,@config.engine_password)
27
-
27
+
28
28
  # lookup the environment
29
- environments = Delphix.environments
29
+ environments = Delphix::Environment.list
30
30
  environment = environments.lookup_by_name @config.env_name
31
-
31
+
32
32
  if environment == nil
33
33
  # ceate a new environment
34
34
  environment = Delphix::Environment.create @config.env_name, @config.env_ip, @config.env_port, @config.toolkit_path, @config.user, @config.password
@@ -36,10 +36,10 @@ module VagrantPlugins
36
36
  # enable the environment
37
37
  environment.enable
38
38
  end
39
-
39
+
40
40
  end
41
-
41
+
42
42
  end # end Class
43
-
43
+
44
44
  end
45
45
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module DelphixEngine
3
- VERSION = '0.1.2'
3
+ VERSION = '1.0.0'
4
4
  end
5
5
  end
@@ -19,6 +19,6 @@ Gem::Specification.new do |gem|
19
19
 
20
20
  gem.add_development_dependency 'bundler', '~> 1.3'
21
21
  gem.add_development_dependency 'rake'
22
-
23
- gem.add_dependency 'delphix_rb', '~> 0.3.2'
22
+
23
+ gem.add_dependency 'delphix_rb', '~> 1.0.0'
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-delphix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kuehl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.3.2
47
+ version: 1.0.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.3.2
54
+ version: 1.0.0
55
55
  description: A Vagrant plugin that interacts with the Delphix Engine
56
56
  email:
57
57
  - michael.kuehl@delphix.com