Lines Matching refs:storage_dict
114 def mount_volume(self, index=None, storage_dict=None, args=''): argument
129 if index is None and storage_dict is None:
130 storage_dict = self.storages[0]
132 storage_dict = self.storages[index]
133 elif not isinstance(storage_dict, dict):
137 if storage_dict['is_mounted']:
142 logging.info('Mounting %(device)s in %(mountpoint)s.', storage_dict)
146 os.mkdir(storage_dict['mountpoint'])
152 cmd += ' %(device)s %(mountpoint)s' % storage_dict
154 storage_dict['is_mounted'] = True
155 self.__mounted[storage_dict['mountpoint']] = storage_dict
158 def umount_volume(self, index=None, storage_dict=None, args=''): argument
173 if index is None and storage_dict is None:
174 storage_dict = self.storages[0]
176 storage_dict = self.storages[index]
177 elif not isinstance(storage_dict, dict):
182 if not storage_dict['is_mounted']:
188 storage_dict)
190 cmd += ' %(device)s' % storage_dict
195 os.rmdir(storage_dict['mountpoint'])
198 storage_dict['mountpoint'], e)
199 storage_dict['is_mounted'] = False
201 if storage_dict['mountpoint'] in self.__mounted:
202 del self.__mounted[storage_dict['mountpoint']]
211 self.umount_volume(storage_dict=self.__mounted[volume])
327 self.scanner.mount_volume(storage_dict=storage)
425 storage_dict = {}
443 if set_if_exists(args_dict, storage_dict, key):
448 return storage_dict, args_dict