clients/irodsPublishCollection.py
def assignTicket(self, all = True):
        '''
        Creates irods tickets for anonymous read access for the collection.
        Ticket can be used in metalnx or wth the icommands to download data.
        It also creates a metadata entry for the ticket in the metadata of the respective
        data object or collection to avoid long searches through the iCAT.
        Note: Not yet available in python client (v0.8), hence icommands wrapper!
        Returns a dictionary mapping from iRODS paths to tickets.
        Requires icommands!
        '''
        tickets = {}
        errorMsg = []

        #iticket create read <obj path>
        #imeta add <obj path> TICKET <ticket>

        cmd = 'iticket create read ' + self.coll.path
        p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out, err = p.communicate()
        if out == '':
            errorMsg.append('TICKET ERROR: No ticket created '+ err)
            return tickets, errorMsg

        msg = self.mdUpdate('TICKET', out.split(':')[1].strip())
        tickets[self.coll.path] = out.split(':')[1].strip()
        self.mdUpdate('TECHNICALINFO', '{"irods_host": "'+self.session.host \
            + '", "irods_port": 1247, "irods_user_name": "anonymous", "irods_zone_name": "' \
            + self.session.zone+ '"}; iget/ils -t <ticket> ' + self.coll.path )

        if not all:
            return tickets, errorMsg

        for obj in self.coll.data_objects:
            cmd = 'iticket create read ' + obj.path
            p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE,
                stderr=subprocess.PIPE)
            out, err = p.communicate()
            if out == '':
                errorMsg.append('TICKET ERROR: No ticket created '+ err)
                return tickets, errorMsg
            obj.metadata.add('TICKET', out.split(':')[1].strip())
            tickets[obj.path] = out.split(':')[1].strip()

        return tickets, errorMsg

        Creates irods tickets for anonymous read access for the collection.
        Ticket can be used in metalnx or wth the icommands to download data.
        It also creates a metadata entry for the ticket in the metadata of the respective
        data object or collection to avoid long searches through the iCAT.
        Note: Not yet available in python client (v0.8), hence icommands wrapper!
        Returns a dictionary mapping from iRODS paths to tickets.
        Requires icommands!
        
Creates irods tickets for anonymous read access for the collection.
Ticket can be used in metalnx or wth the icommands to download data.
It also creates a metadata entry for the ticket in the metadata of the respective
data object or collection to avoid long searches through the iCAT.
Note: Not yet available in python client (v0.8), hence icommands wrapper.
Returns a dictionary mapping from iRODS paths to tickets.
Requires icommands!
Creates irods tickets for anonymous read access for the collection . Ticket can be used in metalnx or wth the icommands to download data . It also creates a metadata entry for the ticket in the metadata of the respective data object or collection to avoid long searches through the iCAT . Note : Not yet available in python client ( v0 . 8 ) hence icommands wrapper . Returns a dictionary mapping from iRODS paths to tickets . Requires icommands!
def assignTicket(self, all = True):
        tickets = {}
        errorMsg = []
        cmd = 'iticket create read ' + self.coll.path
        p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out, err = p.communicate()
        if out == '':
            errorMsg.append('TICKET ERROR: No ticket created '+ err)
            return tickets, errorMsg
        msg = self.mdUpdate('TICKET', out.split(':')[1].strip())
        tickets[self.coll.path] = out.split(':')[1].strip()
        self.mdUpdate('TECHNICALINFO', '{"irods_host": "'+self.session.host \
            + '", "irods_port": 1247, "irods_user_name": "anonymous", "irods_zone_name": "' \
            + self.session.zone+ '"}; iget/ils -t <ticket> ' + self.coll.path )
        if not all:
            return tickets, errorMsg
        for obj in self.coll.data_objects:
            cmd = 'iticket create read ' + obj.path
            p = subprocess.Popen([cmd], shell=True, stdout=subprocess.PIPE,
                stderr=subprocess.PIPE)
            out, err = p.communicate()
            if out == '':
                errorMsg.append('TICKET ERROR: No ticket created '+ err)
                return tickets, errorMsg
            obj.metadata.add('TICKET', out.split(':')[1].strip())
            tickets[obj.path] = out.split(':')[1].strip()
        return tickets, errorMsg
def assignTicket ( self , all = True ) : tickets = { } errorMsg = [ ] cmd = 'iticket create read ' + self . coll . path p = subprocess . Popen ( [ cmd ] , shell = True , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) out , err = p . communicate ( ) if out == '' : errorMsg . append ( 'TICKET ERROR: No ticket created ' + err ) return tickets , errorMsg msg = self . mdUpdate ( 'TICKET' , out . split ( ':' ) [ 1 ] . strip ( ) ) tickets [ self . coll . path ] = out . split ( ':' ) [ 1 ] . strip ( ) self . mdUpdate ( 'TECHNICALINFO' , '{"irods_host": "' + self . session . host + '", "irods_port": 1247, "irods_user_name": "anonymous", "irods_zone_name": "' + self . session . zone + '"}; iget/ils -t <ticket> ' + self . coll . path ) if not all : return tickets , errorMsg for obj in self . coll . data_objects : cmd = 'iticket create read ' + obj . path p = subprocess . Popen ( [ cmd ] , shell = True , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) out , err = p . communicate ( ) if out == '' : errorMsg . append ( 'TICKET ERROR: No ticket created ' + err ) return tickets , errorMsg obj . metadata . add ( 'TICKET' , out . split ( ':' ) [ 1 ] . strip ( ) ) tickets [ obj . path ] = out . split ( ':' ) [ 1 ] . strip ( ) return tickets , errorMsg
Creates irods tickets for anonymous read access for the collection.
Creates irods tickets for anonymous read access for the collection .
'''
        Creates irods tickets for anonymous read access for the collection.
        Ticket can be used in metalnx or wth the icommands to download data.
        It also creates a metadata entry for the ticket in the metadata of the respective
        data object or collection to avoid long searches through the iCAT.
        Note: Not yet available in python client (v0.8), hence icommands wrapper!
        Returns a dictionary mapping from iRODS paths to tickets.
        Requires icommands!
        ''' #iticket create read <obj path> #imeta add <obj path> TICKET <ticket>
self
all