Class: DTK::Network::Client::Command::List

Inherits:
DTK::Network::Client::Command show all
Defined in:
lib/client/command/list.rb

Class Method Summary collapse

Methods inherited from DTK::Network::Client::Command

wrap_command

Methods included from RestWrapper

#rest_delete, #rest_get, #rest_post

Methods included from Client::PermissionsUtil

#validate_permissions!

Methods included from Util::Tar

#gzip, #tar, #ungzip, #untar

Class Method Details

.run(namespace, opts = {}) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/client/command/list.rb', line 4

def self.run(namespace, opts = {})
  params = namespace ? {namespace: namespace} : {}
  modules_info = rest_get('modules', params)

  # return format expected by dtk-client, should change this to be more generic
  {'status' => 'ok', 'datatype' => 'remote_module', 'data' => modules_info}
end