|
| 1 | +## orch-cli update-os host |
| 2 | + |
| 3 | +Updates a host |
| 4 | + |
| 5 | +``` |
| 6 | +orch-cli update-os host <resourceID> [flags] |
| 7 | +``` |
| 8 | + |
| 9 | +### Examples |
| 10 | + |
| 11 | +``` |
| 12 | +#Update the host OS |
| 13 | +orch-cli update-os host host-1234abcd --project itep |
| 14 | +
|
| 15 | +#Update the host OS with a specific OS Update Policy |
| 16 | +orch-cli update-os host host-1234abcd --project itep --osupdatepolicy <resourceID> |
| 17 | +
|
| 18 | +--osupdatepolicy - Set the OS Update policy for the host, must be a valid resource ID of an OS Update policy |
| 19 | +
|
| 20 | +#Generate CSV input file using the --generate-csv flag - the default output will be a base test.csv file. |
| 21 | +orch-cli update-os host --project itep --generate-csv |
| 22 | +
|
| 23 | +#Generate CSV input file using the --generate-csv flag with a filter flag which will find a specific list of currently deployed hosts based on the filter - the output will contain filtered hosts. |
| 24 | +orch-cli update-os host --project itep --generate-csv --filter=<filter> --site <siteID> |
| 25 | +orch-cli update-os host --project itep --generate-csv --filter=<filter> --region <regionID> |
| 26 | +
|
| 27 | +
|
| 28 | +--filter - Predefined filters: provisioned, onboarded, registered, "not connected", deauthorized or custom filter (see: https://google.aip.dev/160 and API spec @ |
| 29 | +--region - Region ID to filter hosts by region, cannot be used with --site flag, can be used with --filter flag |
| 30 | +--site - Site ID to filter hosts by site, cannot be used with --region flag, can be used with --filter flag |
| 31 | +
|
| 32 | +#Update a bulk number of hosts from a CSV file - --import-from-csv is a mandatory flag pointing to the input file. |
| 33 | +orch-cli update-os host --project itep --import-from-csv test.csv |
| 34 | +
|
| 35 | +# Sample input csv file test.csv |
| 36 | +
|
| 37 | +Name - Name of the machine - mandatory field |
| 38 | +ResourceID - Unique Identifier of host - mandatory field |
| 39 | +OSUpdatePolicy - Desired update policy - optional field - currently set policy for the host will be used if not provided |
| 40 | +
|
| 41 | +Name,ResourceID,OSUpdatePolicy |
| 42 | +host-1,host-1234abcd,osupdatepolicy-1234abcd |
| 43 | +host-2,host-2234abcd |
| 44 | +host-3,host-3234abcd,osupdatepolicy-1234abcd |
| 45 | +
|
| 46 | +``` |
| 47 | + |
| 48 | +### Options |
| 49 | + |
| 50 | +``` |
| 51 | + -d, --dry-run Verify the validity of input CSV file |
| 52 | + -f, --filter string Optional filter provided as part of host discovery command |
| 53 | + Usage: |
| 54 | + Custom filter: --filter "<custom filter>" ie. --filter "osType=OS_TYPE_IMMUTABLE" see https://google.aip.dev/160 and API spec. |
| 55 | + Predefined filters: --filter provisioned/onboarded/registered/nor connected/deauthorized |
| 56 | + -g, --generate-csv string[="test.csv"] Generates a template CSV file for host import |
| 57 | + -h, --help help for host |
| 58 | + -i, --import-from-csv string CSV file containing information about provisioned hosts to be updated |
| 59 | + -u, --osupdatepolicy string Set OS update policy <resourceID> |
| 60 | + -r, --region string Optional filter provided as part of host discovery command to filter hosts by region |
| 61 | + -s, --site string Optional filter provided as part of host discovery command to filter hosts by site |
| 62 | +``` |
| 63 | + |
| 64 | +### Options inherited from parent commands |
| 65 | + |
| 66 | +``` |
| 67 | + --api-endpoint string API Service Endpoint (default "https://api.orch-10-114-181-120.espdqa.infra-host.com") |
| 68 | + --debug-headers emit debug-style headers separating columns via '|' character |
| 69 | + -n, --noauth use without authentication checks |
| 70 | + -p, --project string Active project name (default "itep") |
| 71 | + -v, --verbose produce verbose output |
| 72 | +``` |
| 73 | + |
| 74 | +### SEE ALSO |
| 75 | + |
| 76 | +* [orch-cli update-os](orch-cli_update-os.md) - Update host |
| 77 | + |
| 78 | +###### Auto generated by spf13/cobra on 5-Nov-2025 |
0 commit comments