-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds the `lldp` daemon and CLI to the switch zone and updates `sled-agent` to do the basic configuration and enablement of the service. On its own, this change will not cause the switch zone to advertise or receive `lldp` packets, as no interfaces are configured. That can be done using the CLI in the switch zone for testing on `dogfood` and/or the colo. Adding runtime configuration by `nexus` will be follow-on work.
- Loading branch information
1 parent
72cdbd7
commit 145f25c
Showing
4 changed files
with
137 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o pipefail | ||
set -o errexit | ||
|
||
SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
function usage { | ||
echo "usage: $0 [-c COMMIT] [-n]" | ||
echo | ||
echo " -c COMMIT Ask to update Lldp to a specific commit." | ||
echo " If this is unset, Github is queried." | ||
echo " -n Dry-run" | ||
exit 1 | ||
} | ||
|
||
PACKAGES=( | ||
"lldp" | ||
) | ||
|
||
CRATES=( | ||
"lldp" | ||
) | ||
|
||
REPO="oxidecomputer/lldp" | ||
|
||
. "$SOURCE_DIR/update_helpers.sh" | ||
|
||
function main { | ||
TARGET_COMMIT="" | ||
DRY_RUN="" | ||
while getopts "c:n" o; do | ||
case "${o}" in | ||
c) | ||
TARGET_COMMIT="$OPTARG" | ||
;; | ||
n) | ||
DRY_RUN="yes" | ||
;; | ||
*) | ||
usage | ||
;; | ||
esac | ||
done | ||
|
||
TARGET_COMMIT=$(get_latest_commit_from_gh "$REPO" "$TARGET_COMMIT") | ||
install_toml2json | ||
do_update_packages "$TARGET_COMMIT" "$DRY_RUN" "$REPO" "${PACKAGES[@]}" | ||
do_update_crates "$TARGET_COMMIT" "$DRY_RUN" "$REPO" "${CRATES[@]}" | ||
} | ||
|
||
main "$@" |