class DTK::Client::TestModule
Constants
- PushCatalogs
Public Class Methods
all_children()
click to toggle source
this includes children of children - has to be sorted by n-level access
# File lib/commands/thor/test_module.rb, line 34 def self.all_children() # [:"component-template", :attribute] # Amar: attribute context commented out per Rich suggeston # [:"component-template"] [:component] end
multi_context_children()
click to toggle source
# File lib/commands/thor/test_module.rb, line 40 def self.multi_context_children() [[:component], [:remotes], [:component, :remotes]] end
override_allowed_methods()
click to toggle source
# File lib/commands/thor/test_module.rb, line 56 def self.override_allowed_methods() return DTK::Shell::OverrideTasks.new( { :command_only => { :remotes => [ ["push-remote", "push-remote [REMOTE-NAME] [--force]", "# Push local changes to remote git repository"], ["list-remotes", "list-remotes", "# List git remotes for given module"], ["add-remote", "add-remote REMOTE-NAME REMOTE-URL", "# Add git remote for given module"], ["remove-remote", "remove-remote REPO-NAME [-y]", "# Remove git remote for given module"] ] } }) end
valid_child?(name_of_sub_context)
click to toggle source
# File lib/commands/thor/test_module.rb, line 44 def self.valid_child?(name_of_sub_context) return TestModule.valid_children().include?(name_of_sub_context.to_sym) end
valid_children()
click to toggle source
# File lib/commands/thor/test_module.rb, line 28 def self.valid_children() # [:"component-template"] [:component, :remotes] end
validation_list(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 48 def self.validation_list(context_params) get_cached_response(:test_module, "test_module/list", {}) end
whoami()
click to toggle source
# File lib/commands/thor/test_module.rb, line 52 def self.whoami() return :test_module, "test_module/list", nil end
Public Instance Methods
add_collaborators(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 205 def add_collaborators(context_params) add_collaborators_module_aux(context_params) end
add_remote(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 285 def add_remote(context_params) remote_add_aux(context_params) end
chmod(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 185 def chmod(context_params) chmod_module_aux(context_params) end
clone(context_params, internal_trigger=false)
click to toggle source
# File lib/commands/thor/test_module.rb, line 225 def clone(context_params, internal_trigger=false) clone_module_aux(context_params, internal_trigger) end
create(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 154 def create(context_params) create_test_module_aux(context_params) end
delete(context_params,method_opts={})
click to toggle source
# File lib/commands/thor/test_module.rb, line 72 def delete(context_params,method_opts={}) response = delete_module_aux(context_params, method_opts) @@invalidate_map << :test_module if response && response.ok? response end
delete_all(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 300 def delete_all(context_params) return unless Console.confirmation_prompt("This will DELETE ALL test modules, are you sure"+'?') response = list(context_params) response.data().each do |e| run_shell_command("delete #{e['display_name']} -y -p") end end
delete_from_catalog(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 161 def delete_from_catalog(context_params) delete_from_catalog_aux(context_params) end
edit(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 230 def edit(context_params) edit_module_aux(context_params) end
import(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 124 def import(context_params) response = import_module_aux(context_params) @@invalidate_map << :test_module response end
import_git(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 135 def import_git(context_params) response = import_git_module_aux(context_params) @@invalidate_map << :test_module response end
install(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 146 def install(context_params) response = install_module_aux(context_params) @@invalidate_map << :test_module if response && response.ok? response end
list(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 91 def list(context_params) return module_info_about(context_params, :components, :component) if context_params.is_there_command?(:"component") forwarded_remote = context_params.get_forwarded_options()["remote"] if context_params.get_forwarded_options() remote = options.remote? || forwarded_remote action = (remote ? "list_remote" : "list") post_body = (remote ? { :rsa_pub_key => SSHUtil.rsa_pub_key_content() } : {:detail_to_include => ["remotes"]}) post_body[:diff] = options.diff? ? options.diff : {} post_body.merge!(:module_namespace => options.namespace) response = post rest_url("test_module/#{action}"),post_body return response unless response.ok? response.render_table() end
list_attributes(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 114 def list_attributes(context_params) module_info_about(context_params, :attributes, :attribute_without_link) end
list_collaborators(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 219 def list_collaborators(context_params) list_collaborators_module_aux(context_params) end
list_components(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 109 def list_components(context_params) module_info_about(context_params, :components, :component) end
list_diffs(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 266 def list_diffs(context_params) list_remote_module_diffs(context_params) # list_diffs_module_aux(context_params) end
list_instances(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 119 def list_instances(context_params) module_info_about(context_params, :instances, :component) end
list_remotes(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 280 def list_remotes(context_params) remote_list_aux(context_params) end
make_private(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 197 def make_private(context_params) make_private_module_aux(context_params) end
make_public(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 191 def make_public(context_params) make_public_module_aux(context_params) end
publish(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 166 def publish(context_params) publish_module_aux(context_params) end
push(context_params, internal_trigger=false)
click to toggle source
# File lib/commands/thor/test_module.rb, line 244 def push(context_params, internal_trigger=false) push_module_aux(context_params, internal_trigger) end
push_dtkn(context_params, internal_trigger=false)
click to toggle source
# File lib/commands/thor/test_module.rb, line 259 def push_dtkn(context_params, internal_trigger=false) push_dtkn_module_aux(context_params, internal_trigger) end
push_remote(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 275 def push_remote(context_params) push_remote_module_aux(context_params) end
remove_collaborators(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 213 def remove_collaborators(context_params) remove_collaborators_module_aux(context_params) end
remove_remote(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 291 def remove_remote(context_params) remote_remove_aux(context_params) end
set_attribute(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 80 def set_attribute(context_params) set_attribute_module_aux(context_params) end
update(context_params)
click to toggle source
# File lib/commands/thor/test_module.rb, line 179 def update(context_params) update_aux(context_params) end