dtk-client 0.7.2.1 → 0.7.3

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.
@@ -14,6 +14,10 @@ module DTK
14
14
  module_namespace ? resolve_name(module_name, module_namespace) : module_name
15
15
  end
16
16
 
17
+ def self.module_name(module_type)
18
+ module_type.gsub('_',' ')
19
+ end
20
+
17
21
  # returns [namespace,name]; namespace can be null if cant determine it
18
22
  def self.full_module_name_parts?(name_or_full_module_name)
19
23
  if name_or_full_module_name.nil?
data/lib/util/os_util.rb CHANGED
@@ -145,6 +145,10 @@ module DTK
145
145
  end
146
146
  end
147
147
 
148
+ def temp_git_remote_location()
149
+ File::join(dtk_local_folder, 'temp_remote_location')
150
+ end
151
+
148
152
  def component_clone_location()
149
153
  clone_base_path(:component_module)
150
154
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtk-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2.1
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rich PELAVIN
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-24 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -114,28 +114,28 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 0.7.1
117
+ version: 0.7.2
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 0.7.1
124
+ version: 0.7.2
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: git
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - '='
130
130
  - !ruby/object:Gem::Version
131
- version: 1.2.6
131
+ version: 1.2.8
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - '='
137
137
  - !ruby/object:Gem::Version
138
- version: 1.2.6
138
+ version: 1.2.8
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: colorize
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -216,6 +216,8 @@ files:
216
216
  - lib/commands/common/thor/assembly_workspace.rb
217
217
  - lib/commands/common/thor/clone.rb
218
218
  - lib/commands/common/thor/common.rb
219
+ - lib/commands/common/thor/common_base.rb
220
+ - lib/commands/common/thor/create_target.rb
219
221
  - lib/commands/common/thor/edit.rb
220
222
  - lib/commands/common/thor/inventory_parser.rb
221
223
  - lib/commands/common/thor/list_diffs.rb
@@ -287,7 +289,6 @@ files:
287
289
  - lib/execute/execute_context/result_store.rb
288
290
  - lib/execute/script.rb
289
291
  - lib/execute/script/add_tenant.rb
290
- - lib/execute/script/add_tenant_without_router.rb
291
292
  - lib/git-logs/git.log
292
293
  - lib/parser/adapters/option_parser.rb
293
294
  - lib/parser/adapters/thor.rb
@@ -1,87 +0,0 @@
1
- class DTK::Client::Execute::Script
2
- class AddTenantWithoutRouter < self
3
- def self.ret_params_from_argv()
4
- banner = "Usage: dtk-execute add-tenant-no-router TENANT-NAME CATALOG-USERNAME -p PASSWORD [-s SERVICE-INSTANCE]"
5
- tenant_name = catalog_username = tenant_number = nil
6
- if ARGV.size > 2
7
- tenant_name = ARGV[1]
8
- if tenant_name =~ /^dtk([0-9]+)$/
9
- tenant_number = $1
10
- else
11
- raise ErrorUsage.new("TENANT-NAME must be of form 'dtkNUMs', like dtk601")
12
- end
13
- catalog_username = ARGV[2]
14
- else
15
- show_help_and_exit(banner)
16
- end
17
-
18
- params = Hash.new
19
- process_params_from_options(banner) do |opts|
20
- opts.on( '-p', '--password PASSWORD', "Password for tenant and catalog" ) do |pw|
21
- params[:password] = pw
22
- end
23
- opts.on( '-s', '--service SERVICE-INSTANCE', "Name of Service instance" ) do |s|
24
- params[:service_instance] = s
25
- end
26
- end
27
-
28
- # TODO: use opt parser to enforce that :password option is manditory
29
- unless password = params[:password]
30
- raise ErrorUsage.new("Password is mandatory; use -p commnd line option")
31
- end
32
- service_instance = params[:service_instance] || "dtkhost#{tenant_number[0]}"
33
- to_add = {
34
- :tenant_name => tenant_name,
35
- :catalog_username => catalog_username,
36
- :service_instance => service_instance
37
- }
38
- params.merge(to_add)
39
- end
40
-
41
- def self.execute_with_params(params)
42
- tenant_name = params[:tenant_name]
43
- catalog_username = params[:catalog_username]
44
- service = params[:service_instance]
45
- password = params[:password]
46
- node = params[:node_name] || 'server'
47
-
48
- component_with_namespace = "dtk-meta-user:dtk_tenant[#{tenant_name}]"
49
- component_namespace, component = (component_with_namespace =~ /(^[^:]+):(.+$)/; [$1,$2])
50
-
51
- av_pairs = {
52
- :catalog_username => catalog_username,
53
- :tenant_password => password,
54
- :catalog_password => password
55
- }
56
-
57
- ExecuteContext(:print_results => true) do
58
- result = call 'service/add_component',
59
- :service => service,
60
- :node => node,
61
- :component => component,
62
- :namespace => component_namespace,
63
- :donot_update_workflow => true
64
-
65
- av_pairs.each_pair do |a,v|
66
- result = call 'service/set_attribute',
67
- :service => service,
68
- :attribute_path => "#{node}/#{component}/#{a}",
69
- :value => v
70
- end
71
-
72
- ['dtk_postgresql::databases'].each do |shared_service_component|
73
- result = call 'service/link_components',
74
- :service => service,
75
- :input_component => "#{node}/#{component}",
76
- :output_component => "#{node}/#{shared_service_component}"
77
- end
78
-
79
- result = call 'service/execute_workflow',
80
- :service => service,
81
- :workflow_name => 'add_tenant_without_router',
82
- :workflow_params => {'name' => tenant_name}
83
-
84
- end
85
- end
86
- end
87
- end