cloudapi/v2: add all existing customizations to openapi spec

This commit is contained in:
Sanne Raymaekers 2023-10-04 12:16:14 +02:00
parent d7e960f0c1
commit 0a255df1ca
11 changed files with 743 additions and 138 deletions

View file

@ -58,6 +58,23 @@ function _instanceCheck() {
verify_openscap_customization "$_ssh"
echo "✔️ Checking timezone customization"
TZ=$($_ssh timedatectl show -p Timezone --value)
if [ "$TZ" != "Europe/Prague" ]; then
echo "Timezone $TZ isn't Europe/Prague"
exit 1
fi
echo "✔️ Checking firewall customization"
if $_ssh rpm -q firewalld; then
FW_SERVICES=$($_ssh sudo firewall-cmd --list-services)
if ! grep -q "nfs" <<< "$FW_SERVICES"; then
echo "firewalld nfs service isn't enabled: $FW_SERVICES"
exit 1
fi
else
echo "firewalld not available on host, that's fine"
fi
}
WORKER_REFRESH_TOKEN_PATH="/etc/osbuild-worker/token"

View file

@ -79,6 +79,7 @@ function createReqFileGuest() {
"key": "$(cat "${WORKDIR}/usertest.pub")"
}
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}
},
"image_request": {
"architecture": "$ARCH",
@ -108,6 +109,7 @@ function createReqFileVSphere() {
"postgresql",
"dummy"
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}
},
"image_request": {
"architecture": "$ARCH",