cloudapi/v2: add all existing customizations to openapi spec
This commit is contained in:
parent
d7e960f0c1
commit
0a255df1ca
11 changed files with 743 additions and 138 deletions
|
|
@ -414,6 +414,26 @@ EOF
|
|||
esac
|
||||
export OPENSCAP_CUSTOMIZATION_BLOCK
|
||||
|
||||
TIMEZONE_CUSTOMIZATION_BLOCK=$(cat <<EOF
|
||||
,
|
||||
"timezone": {
|
||||
"timezone": "Europe/Prague"
|
||||
}
|
||||
EOF
|
||||
)
|
||||
export TIMEZONE_CUSTOMIZATION_BLOCK
|
||||
|
||||
FIREWALL_CUSTOMIZATION_BLOCK=$(cat <<EOF
|
||||
,
|
||||
"firewall": {
|
||||
"services": {
|
||||
"enabled": ["nfs"]
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)
|
||||
export FIREWALL_CUSTOMIZATION_BLOCK
|
||||
|
||||
# generate a temp key for user tests
|
||||
ssh-keygen -t rsa-sha2-512 -f "${WORKDIR}/usertest" -C "usertest" -N ""
|
||||
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ function createReqFile() {
|
|||
"key": "$(cat "${WORKDIR}/usertest.pub")"
|
||||
}
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ function createReqFile() {
|
|||
"postgresql",
|
||||
"dummy"
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ function createReqFile() {
|
|||
"postgresql",
|
||||
"dummy"
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}${FIREWALL_CUSTOMIZATION_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ function createReqFile() {
|
|||
"postgresql",
|
||||
"dummy"
|
||||
]${SUBSCRIPTION_BLOCK}${DIR_FILES_CUSTOMIZATION_BLOCK}${REPOSITORY_CUSTOMIZATION_BLOCK}${OPENSCAP_CUSTOMIZATION_BLOCK}
|
||||
${TIMEZONE_CUSTOMIZATION_BLOCK}
|
||||
},
|
||||
"image_request": {
|
||||
"architecture": "$ARCH",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue