'Stores the image location.  This should be accessible on all nodes
that need to access it.  Format: can be one of the following:
* username:password@hostname:/path/to/the/filename.ext
* username@hostname:/path/to/the/filename.ext
* hostname:/path/to/the/filename.ext
* /path/to/the/filename.ext'

def set_file(self, filename):

    uri = ''
    auth = hostname = path = ''
    if (filename.find('://') != (-1)):
        raise CX('Invalid    image    file    path    location,    it    should    not    contain    a    protocol')
    uri = filename
    if (filename.find('@') != (-1)):
        (auth, filename) = filename.split('@')
    if (filename.find(':') != (-1)):
        (hostname, filename) = filename.split(':')
    elif (filename[0] != '/'):
        raise CX(_(('invalid    file:    %s' % filename)))
    if ((len(filename) > 0) and (filename[0] != '/')):
        raise CX(_(('file    contains    an    invalid    path:    %s' % filename)))
    if (filename.find('/') != (-1)):
        (path, filename) = filename.rsplit('/', 1)
    if (len(filename) == 0):
        raise CX(_('missing    filename'))
    if ((len(auth) > 0) and (len(hostname) == 0)):
        raise CX(_('a    hostname    must    be    specified    with    authentication    details'))
    self.file = uri
