'fetch a remote control file or packages'

def fetch(self, args, options):

    if (not len(args)):
        self.help()
    url = args.pop(0)
    if (not utils.is_url(url)):
        logging.info('Not    a    remote    url,    nothing    to    fetch    (%s)', url)
        self.help()
    if len(args):
        name = args.pop(0)
    else:
        name = ''
    logging.info('Fetching    file    %s:%s', url, name)
    pkg_dir = os.path.join(output_dir, 'packages')
    install_dir = os.path.join(FETCHDIRTEST, name)
    pkgmgr = packages.PackageManager(output_dir, run_function_dargs={'timeout': 3600})
    pkgmgr.install_pkg(name, 'test', pkg_dir, install_dir, repo_url=url)
    raise SystemExit(0)
