| 44 | using std::string; |
| 45 | |
| 46 | mesos::internal::slave::Flags::Flags() |
| 47 | { |
| 48 | add(&Flags::hostname, |
| 49 | "hostname", |
| 50 | "The hostname the agent should report.\n" |
| 51 | "If left unset, the hostname is resolved from the IP address\n" |
| 52 | "that the agent advertises; unless the user explicitly prevents\n" |
| 53 | "that, using `--no-hostname_lookup`, in which case the IP itself\n" |
| 54 | "is used."); |
| 55 | |
| 56 | add(&Flags::hostname_lookup, |
| 57 | "hostname_lookup", |
| 58 | "Whether we should execute a lookup to find out the server's hostname,\n" |
| 59 | "if not explicitly set (via, e.g., `--hostname`).\n" |
| 60 | "True by default; if set to `false` it will cause Mesos\n" |
| 61 | "to use the IP address, unless the hostname is explicitly set.", |
| 62 | true); |
| 63 | |
| 64 | add(&Flags::version, |
| 65 | "version", |
| 66 | "Show version and exit.", |
| 67 | false); |
| 68 | |
| 69 | // TODO(benh): Is there a way to specify units for the resources? |
| 70 | add(&Flags::resources, |
| 71 | "resources", |
| 72 | "Total consumable resources per agent. Can be provided in JSON format\n" |
| 73 | "or as a semicolon-delimited list of key:value pairs, with the role\n" |
| 74 | "optionally specified.\n" |
| 75 | "\n" |
| 76 | "As a key:value list:\n" |
| 77 | "`name(role):value;name:value...`\n" |
| 78 | "\n" |
| 79 | "To use JSON, pass a JSON-formatted string or use\n" |
| 80 | "`--resources=filepath` to specify the resources via a file containing\n" |
| 81 | "a JSON-formatted string. `filepath` can only be of the form\n" |
| 82 | "`file:///path/to/file`.\n" |
| 83 | "\n" |
| 84 | "Example JSON:\n" |
| 85 | "[\n" |
| 86 | " {\n" |
| 87 | " \"name\": \"cpus\",\n" |
| 88 | " \"type\": \"SCALAR\",\n" |
| 89 | " \"scalar\": {\n" |
| 90 | " \"value\": 24\n" |
| 91 | " }\n" |
| 92 | " },\n" |
| 93 | " {\n" |
| 94 | " \"name\": \"mem\",\n" |
| 95 | " \"type\": \"SCALAR\",\n" |
| 96 | " \"scalar\": {\n" |
| 97 | " \"value\": 24576\n" |
| 98 | " }\n" |
| 99 | " }\n" |
| 100 | "]"); |
| 101 | |
| 102 | add(&Flags::resource_provider_config_dir, |
| 103 | "resource_provider_config_dir", |
nothing calls this directly
no test coverage detected