This method handles the user's command line arguments, for example, if
        the user specified a path file we'll open it and read the contents.
        Finally it will run the scan using TagCubeClient.scan(...)

        :return: The exit code for our process

def run(self):
        """
        This method handles the user's command line arguments, for example, if
        the user specified a path file we'll open it and read the contents.
        Finally it will run the scan using TagCubeClient.scan(...)

        :return: The exit code for our process
        """
        client = None

        if self.cmd_args.subcommand in self.API_SUBCOMMAND:
            email, api_key = TagCubeCLI.get_credentials(self.cmd_args)
            client = TagCubeClient(email, api_key, verbose=self.cmd_args.verbose)

        subcommands = {'auth': do_auth_test,
                       'scan': do_scan_start,
                       'batch': do_batch_scan,
                       'version': do_version}

        try:
            subcommands.get(self.cmd_args.subcommand)(client, self.cmd_args)

        except ConnectionError, ce:
            msg = 'Failed to connect to TagCube REST API: "%s"'
            cli_logger.error(msg % ce)
            return 3

        except TagCubeAPIException, tae:
            cli_logger.error('%s' % tae)
            return 4

        return 0