def upload_package_profile(): consumer_id = lookup_consumer_id() if consumer_id is None: sys.stderr.write( "Cannot upload package profile. Is this client registered?\n") else: get_manager().profilelib._do_update()
def upload_package_profile(force=False): if not plugin_enabled(PACKAGE_PROFILE_PLUGIN_CONF, DISABLE_PACKAGE_PROFILE_VAR, force): return consumer_id = lookup_consumer_id() if consumer_id is None: sys.stderr.write("Cannot upload package profile. Is this client registered?\n") else: get_manager().profilelib._do_update()
def upload_enabled_repos_report(report): content = report.content consumer_id = lookup_consumer_id() if consumer_id is None: error_message('Cannot upload enabled repos report, is this client registered?') else: cache = EnabledRepoCache(consumer_id, content) if not cache.is_valid() and report_enabled_repos(consumer_id, content): cache.save()
def upload_tracer_profile(queryfunc, plugin): uep = get_uep() consumer_id = lookup_consumer_id() if consumer_id is None: sys.stderr.write("Cannot upload tracer data, is this client registered?\n") else: method = '/consumers/%s/tracer' % uep.sanitize(consumer_id) data = {"traces": get_apps(queryfunc, plugin)} uep.conn.request_put(method, data)
def upload_tracer_profile(queryfunc, plugin=None): uep = get_uep() consumer_id = lookup_consumer_id() if consumer_id is None: sys.stderr.write( "Cannot upload tracer data, is this client registered?\n") else: method = '/consumers/%s/tracer' % uep.sanitize(consumer_id) data = {"traces": get_apps(queryfunc, plugin)} uep.conn.request_put(method, data)
def upload_package_profile(force=False): if not plugin_enabled(PACKAGE_PROFILE_PLUGIN_CONF, DISABLE_PACKAGE_PROFILE_VAR, force): return consumer_id = lookup_consumer_id() if consumer_id is None: sys.stderr.write( "Cannot upload package profile. Is this client registered?\n") else: get_manager().profilelib._do_update()
def upload_enabled_repos_report(report, force=False): if not plugin_enabled(ENABLED_REPOS_PLUGIN_CONF, DISABLE_ENABLE_REPOS_VAR, force): return content = report.content consumer_id = lookup_consumer_id() if consumer_id is None: error_message( 'Cannot upload enabled repos report, is this client registered?') else: cache = EnabledRepoCache(consumer_id, content) if not cache.is_valid() and report_enabled_repos(consumer_id, content): cache.save()
def upload_tracer_profile(queryfunc, plugin): uep = get_uep() method = '/consumers/%s/tracer' % uep.sanitize(lookup_consumer_id()) data = {"traces": get_apps(queryfunc, plugin)} uep.conn.request_put(method, data)