def install_script(): base = url_for('index', _external=True) if base.endswith('/'): base = base[:-1] client = url_for('client_py', _external=True) return render_template('client_install.sh', base_url=base, client_url=client, version=client_version())
def host_get(name): h = hosts.get(name) if _is_host_authenticated(h): h.ping() container_requests.handle(h) data = h.to_dict() data["client_version"] = client_version() withcontainers = request.args.get("with_containers") is not None if not withcontainers and "containers" in h.data: del data["containers"] if "api_key" in data: del data["api_key"] return jsonify(data)
def host_get(name): h = hosts.get(name) if _is_host_authenticated(h): h.ping() container_requests.handle(h) data = h.to_dict() data['client_version'] = client_version() withcontainers = request.args.get('with_containers') is not None if not withcontainers and 'containers' in h.data: del data['containers'] if 'api_key' in data: del data['api_key'] return jsonify(data)