irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

paths.py
Go to the documentation of this file.
1 import grp
2 import inspect
3 import os
4 import pwd
5 
7  return os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(scripts_directory()))))
8 
10  return os.path.join(root_directory(), 'var', 'lib', 'irods')
11 
13  return os.path.join(root_directory(), 'etc', 'irods')
14 
16  return os.path.join(root_directory(), 'usr', 'lib', 'irods', 'plugins')
17 
19  return irods_user_and_group_entries()[0][5]
20 
22  return config_directory()
23 
25  return os.path.dirname(os.path.dirname(os.path.abspath(
26  inspect.stack()[0][1])))
27 
29  return os.path.join(scripts_directory(), 'irods', 'test')
30 
32  return os.path.join(
34  'server_config.json')
35 
37  return os.path.join(
39  'database_config.json')
40 
42  return os.path.join(
44  'VERSION.json')
45 
47  return os.path.join(
49  'hosts_config.json')
50 
52  return os.path.join(
54  'host_access_control_config.json')
55 
57  return os.path.join(
59  '.irods',
60  '.irodsA')
61 
63  return os.path.join(
65  '.irods',
66  'irods_environment.json')
67 
69  return os.path.join(
71  'log')
72 
74  return os.path.join(
75  log_directory(),
76  'control_log.txt')
77 
79  return os.path.join(
80  log_directory(),
81  'setup_log.txt')
82 
84  return os.path.join(
85  log_directory(),
86  'test_log.txt')
87 
89  return os.path.join(
91  'clients',
92  'icommands',
93  'test')
94 
96  return os.path.join(
98  'test',
99  'bin')
100 
102  return sorted([os.path.join(log_directory(), name)
103  for name in os.listdir(log_directory())
104  if name.startswith('rodsServerLog')],
105  key=lambda path: os.path.getctime(path))[-1]
106 
108  return sorted([os.path.join(log_directory(), name)
109  for name in os.listdir(log_directory())
110  if name.startswith('rodsLog')],
111  key=lambda path: os.path.getctime(path))[-1]
112 
114  return sorted([os.path.join(log_directory(), name)
115  for name in os.listdir(log_directory())
116  if name.startswith('reLog')],
117  key=lambda path: os.path.getctime(path))[-1]
118 
120  return os.path.join(
121  root_directory(),
122  'usr',
123  'sbin')
124 
126  return os.path.join(
128  'irodsServer')
129 
131  return os.path.join(
133  'irodsReServer')
134 
136  return os.path.join(
138  'irodsXmsgServer')
139 
141  return os.path.join(config_directory(), 'service_account.config')
142 
144  return os.path.join(irods_directory(), 'clients', 'bin', 'genOSAuth')
145 
147  try:
148  with open(service_account_file_path()) as f:
149  service_account_dict = dict([(l.partition('=')[0].strip(), l.partition('=')[2].strip()) for l in f.readlines()])
150  user = pwd.getpwnam(service_account_dict['IRODS_SERVICE_ACCOUNT_NAME'])
151  group = grp.getgrnam(service_account_dict['IRODS_SERVICE_GROUP_NAME'])
152  except IOError:
153  user = pwd.getpwuid(os.stat(irods_directory()).st_uid)
154  group = grp.getgrgid(os.stat(irods_directory()).st_gid)
155  return (user, group)
156 
158  return irods_user_and_group_entries()[0][0]
159 
160 def irods_uid():
161  return irods_user_and_group_entries()[0][2]
162 
164  return irods_user_and_group_entries()[1][0]
165 
166 def irods_gid():
167  return irods_user_and_group_entries()[1][2]
168 
169 def get_template_filepath(filepath):
170  return os.path.join(irods_directory(), 'packaging', '.'.join([os.path.basename(filepath), 'template']))
irods.paths.config_directory
def config_directory()
Definition: paths.py:12
irods.paths.core_re_directory
def core_re_directory()
Definition: paths.py:21
irods.paths.plugins_directory
def plugins_directory()
Definition: paths.py:15
irods.paths.service_account_file_path
def service_account_file_path()
Definition: paths.py:140
irods.paths.home_directory
def home_directory()
Definition: paths.py:18
irods.paths.server_bin_directory
def server_bin_directory()
Definition: paths.py:119
irods.paths.log_directory
def log_directory()
Definition: paths.py:68
irods.paths.control_log_path
def control_log_path()
Definition: paths.py:73
irods.paths.genosauth_path
def genosauth_path()
Definition: paths.py:143
irods.paths.root_directory
def root_directory()
Definition: paths.py:6
irods.paths.test_log_path
def test_log_path()
Definition: paths.py:83
irods.paths.server_executable
def server_executable()
Definition: paths.py:125
irods.paths.irods_user
def irods_user()
Definition: paths.py:157
irods.paths.hosts_config_path
def hosts_config_path()
Definition: paths.py:46
irods.paths.host_access_control_config_path
def host_access_control_config_path()
Definition: paths.py:51
irods.paths.setup_log_path
def setup_log_path()
Definition: paths.py:78
irods.paths.irods_group
def irods_group()
Definition: paths.py:163
irods.paths.irods_user_and_group_entries
def irods_user_and_group_entries()
Definition: paths.py:146
irods.paths.password_file_path
def password_file_path()
Definition: paths.py:56
irods.paths.server_test_directory
def server_test_directory()
Definition: paths.py:95
irods.paths.database_config_path
def database_config_path()
Definition: paths.py:36
irods.paths.default_client_environment_path
def default_client_environment_path()
Definition: paths.py:62
irods::join
std::string join(std::vector< std::string > &strs, const std::string &separator)
Definition: irods_serialization.cpp:169
irods.paths.test_directory
def test_directory()
Definition: paths.py:28
irods.paths.server_log_path
def server_log_path()
Definition: paths.py:107
irods.paths.server_parent_log_path
def server_parent_log_path()
Definition: paths.py:101
irods.paths.irods_uid
def irods_uid()
Definition: paths.py:160
irods.paths.version_path
def version_path()
Definition: paths.py:41
irods.paths.scripts_directory
def scripts_directory()
Definition: paths.py:24
irods.paths.rule_engine_executable
def rule_engine_executable()
Definition: paths.py:130
irods.paths.irods_directory
def irods_directory()
Definition: paths.py:9
irods.paths.icommands_test_directory
def icommands_test_directory()
Definition: paths.py:88
irods.paths.get_template_filepath
def get_template_filepath(filepath)
Definition: paths.py:169
irods.paths.re_log_path
def re_log_path()
Definition: paths.py:113
irods.paths.xmsg_server_executable
def xmsg_server_executable()
Definition: paths.py:135
irods.paths.irods_gid
def irods_gid()
Definition: paths.py:166
irods.paths.server_config_path
def server_config_path()
Definition: paths.py:31