Class: Puppet_X::EnterpriseModules::WebLogic::WlstProvider
- Inherits:
-
Object
- Object
- Puppet_X::EnterpriseModules::WebLogic::WlstProvider
show all
- Includes:
- EasyType::Helpers, EasyType::Template, Access
- Defined in:
- lib/puppet_x/enterprisemodules/weblogic/tree.rb
Constant Summary
Constants included
from Access
Access::DEFAULT_FILE
Instance Method Summary
collapse
-
#children(path) ⇒ Object
-
#clear(path) ⇒ Object
-
#create(bean_type, path, name) ⇒ Object
-
#create_property(path) ⇒ Object
-
#default_value(path) ⇒ Object
-
#destroy(bean_type, path, name) ⇒ Object
-
#edit ⇒ Object
-
#execute(script) ⇒ Object
-
#exists?(path) ⇒ Boolean
-
#get(path, runtime = 'serverConfig') ⇒ Object
-
#get_encrypted(path) ⇒ Object
-
#get_security_policy(resource_type, name, action) ⇒ Object
-
#needs_restart? ⇒ Boolean
-
#properties(path) ⇒ Object
-
#realm ⇒ Object
-
#save ⇒ Object
-
#set(path, value) ⇒ Object
-
#set_array(path, value) ⇒ Object
-
#set_domain(domain) ⇒ Object
-
#set_property(path, value) ⇒ Object
-
#set_property_tree(path, value, bean_type) ⇒ Object
-
#set_reference(path, parent, value) ⇒ Object
-
#set_references(path, parent, value) ⇒ Object
-
#set_security_policy(resource_type, name, action, policy) ⇒ Object
-
#set_target(path, target, type) ⇒ Object
-
#start_server(name) ⇒ Object
-
#stop_server(name) ⇒ Object
Methods included from Access
#child_of, included, #puppet_version_higher_or_equal_then, #wlst
Methods included from Settings
#configuration, included, #read_from_yaml, #setting_for, #settings
Instance Method Details
#children(path) ⇒ Object
453
454
455
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 453
def children(path)
elements(path, 'c') end
|
#clear(path) ⇒ Object
401
402
403
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 401
def clear(path)
wlst template('wls_config/wls_config/tree/clear.py.erb', binding), modify_environment
end
|
#create(bean_type, path, name) ⇒ Object
389
390
391
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 389
def create(bean_type, path, name)
wlst template('wls_config/wls_config/tree/create.py.erb', binding), modify_environment
end
|
#create_property(path) ⇒ Object
393
394
395
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 393
def create_property(path)
wlst template('wls_config/wls_config/tree/create_property.py.erb', binding), modify_environment
end
|
#default_value(path) ⇒ Object
361
362
363
364
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 361
def default_value(path)
value = wlst template('wls_config/wls_config/tree/default_value.py.erb', binding), query_environment
value.first['value']
end
|
#destroy(bean_type, path, name) ⇒ Object
397
398
399
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 397
def destroy(bean_type, path, name)
wlst template('wls_config/wls_config/tree/destroy.py.erb', binding), modify_environment
end
|
#edit ⇒ Object
433
434
435
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 433
def edit
wlst template('wls_config/wls_config/tree/edit.py.erb', binding), modify_environment
end
|
#execute(script) ⇒ Object
449
450
451
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 449
def execute(script)
wlst script, modify_environment
end
|
#exists?(path) ⇒ Boolean
375
376
377
378
379
380
381
382
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 375
def exists?(path)
value = wlst template('wls_config/wls_config/tree/exists.py.erb', binding), query_environment
case value.first['value']
when 'True', '1' then true
when 'False', '0' then false
else fail 'invalid value returned from exists? function'
end
end
|
#get(path, runtime = 'serverConfig') ⇒ Object
332
333
334
335
336
337
338
339
340
341
342
343
344
345
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 332
def get(path, runtime = 'serverConfig')
case runtime
when 'serverConfig'
value = wlst template('wls_config/wls_config/tree/get.py.erb', binding), query_environment
when 'domainRuntime'
value = wlst template('wls_config/wls_config/tree/domain_runtime_get.py.erb', binding), query_environment
when 'serverRuntime'
value = wlst template('wls_config/wls_config/tree/server_runtime_get.py.erb', binding), query_environment
value = [{ 'value' => nil }] if value.nil?
else
fail "Weblogic runtime #{runtime} is not supported"
end
value.first['value']
end
|
#get_encrypted(path) ⇒ Object
384
385
386
387
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 384
def get_encrypted(path)
value = wlst template('wls_config/wls_config/tree/get_encrypted.py.erb', binding), query_environment
value.first['value']
end
|
#get_security_policy(resource_type, name, action) ⇒ Object
352
353
354
355
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 352
def get_security_policy(resource_type, name, action)
value = wlst template('wls_config/wls_config/tree/get_security_policy.py.erb', binding), query_environment
value.first['value']
end
|
#needs_restart? ⇒ Boolean
347
348
349
350
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 347
def needs_restart?
value = wlst template('wls_config/wls_config/tree/needs_restart.py.erb', binding), query_environment
value.first['value']
end
|
#properties(path) ⇒ Object
457
458
459
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 457
def properties(path)
elements(path, 'a') end
|
#realm ⇒ Object
366
367
368
369
370
371
372
373
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 366
def realm
value = wlst template('wls_config/wls_config/tree/realm.py.erb', binding), query_environment
if value.empty?
[nil, nil]
else
[value.first['name'], value.first['path']]
end
end
|
#save ⇒ Object
437
438
439
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 437
def save
wlst template('wls_config/wls_config/tree/save.py.erb', binding), modify_environment
end
|
#set(path, value) ⇒ Object
405
406
407
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 405
def set(path, value)
wlst template('wls_config/wls_config/tree/set.py.erb', binding), modify_environment
end
|
#set_array(path, value) ⇒ Object
413
414
415
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 413
def set_array(path, value)
wlst template('wls_config/wls_config/tree/set_array.py.erb', binding), modify_environment
end
|
#set_domain(domain) ⇒ Object
328
329
330
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 328
def set_domain(domain)
@domain = domain
end
|
#set_property(path, value) ⇒ Object
421
422
423
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 421
def set_property(path, value)
wlst template('wls_config/wls_config/tree/set_property.py.erb', binding), modify_environment
end
|
#set_property_tree(path, value, bean_type) ⇒ Object
425
426
427
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 425
def set_property_tree(path, value, bean_type)
wlst template('wls_config/wls_config/tree/set_property_tree.py.erb', binding), modify_environment
end
|
#set_reference(path, parent, value) ⇒ Object
409
410
411
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 409
def set_reference(path, parent, value)
wlst template('wls_config/wls_config/tree/set_reference.py.erb', binding), modify_environment
end
|
#set_references(path, parent, value) ⇒ Object
417
418
419
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 417
def set_references(path, parent, value)
wlst template('wls_config/wls_config/tree/set_references.py.erb', binding), modify_environment
end
|
#set_security_policy(resource_type, name, action, policy) ⇒ Object
357
358
359
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 357
def set_security_policy(resource_type, name, action, policy)
wlst template('wls_config/wls_config/tree/set_security_policy.py.erb', binding), query_environment
end
|
#set_target(path, target, type) ⇒ Object
429
430
431
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 429
def set_target(path, target, type)
wlst template('wls_config/wls_config/tree/set_target.py.erb', binding), modify_environment
end
|
#start_server(name) ⇒ Object
441
442
443
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 441
def start_server(name)
wlst template('wls_config/wls_config/tree/start_server.py.erb', binding), modify_environment
end
|
#stop_server(name) ⇒ Object
445
446
447
|
# File 'lib/puppet_x/enterprisemodules/weblogic/tree.rb', line 445
def stop_server(name)
wlst template('wls_config/wls_config/tree/stop_server.py.erb', binding), modify_environment
end
|