vagrant-delphix 0.1.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vagrant-delphix/action/destroy_environment.rb +11 -11
- data/lib/vagrant-delphix/action/disable_environment.rb +10 -10
- data/lib/vagrant-delphix/action/enable_environment.rb +10 -10
- data/lib/vagrant-delphix/provisioner.rb +8 -8
- data/lib/vagrant-delphix/version.rb +1 -1
- data/vagrant-delphix.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ebb2dc50427468204e85062a32aff1c1fed2b05
|
4
|
+
data.tar.gz: ce41033a44d50ad38e7d716540758de5f0c0142f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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.
|
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
|
data/vagrant-delphix.gemspec
CHANGED
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.
|
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-
|
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.
|
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.
|
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
|