From d311632d20199da7bb4f4ac3f8f717e213a34587 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 29 Nov 2023 06:30:47 +0100 Subject: [PATCH] refactor: Move automount location to separate field The automount location used to be an `ipa-client-install` argument. However the approach has to issues: 1. `ipa-client-install --automount-location` is currently broken and wont't get fixed in time for next internal demo, see https://pagure.io/freeipa/issue/9487 2. For NFS automount of home directories, the SELinux boolean `use_nfs_home_dirs` must be enabled first. The new API has the automount location in a new field, so `ipahcc-auto-enrollment` can run `ipa-client-automount` and `setsebool` after `ipa-client-install`. IPA's automount location is an RDN attribute, `cn=name,cn=automount,$SUFFIX`. Also syncs golang version and oapi-codegen version with backend. Signed-off-by: Christian Heimes --- .github/workflows/main.yml | 2 +- Makefile | 2 +- public.openapi.json | 8 +++++++- public.openapi.yaml | 7 ++++++- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac2eafb..9988b97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,7 @@ jobs: oapi_codegen: runs-on: "ubuntu-latest" - container: registry.access.redhat.com/ubi9/go-toolset:1.18 + container: registry.access.redhat.com/ubi9/go-toolset:1.20 steps: - uses: "actions/checkout@v3" - run: make oapi-codegen diff --git a/Makefile b/Makefile index 06cd8f9..6c152fc 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ NODE_BIN = node_modules/.bin BIN = bin TMP = tmp OAPI_CODEGEN = $(BIN)/oapi-codegen -OAPI_CODEGEN_VERSION ?= v1.12.4 +OAPI_CODEGEN_VERSION ?= v1.14.0 SWAGGER_CONTAINER = swagger-editor diff --git a/public.openapi.json b/public.openapi.json index 7852e18..dd536ed 100644 --- a/public.openapi.json +++ b/public.openapi.json @@ -1098,6 +1098,12 @@ ], "additionalProperties": false, "properties": { + "automount_location": { + "description": "Automount location name for ipa-client-automount", + "type": "string", + "minLength": 1, + "example": "default" + }, "cabundle": { "$ref": "#/components/schemas/CaCertBundle" }, @@ -1115,7 +1121,7 @@ "items": { "type": "string" }, - "example": "[\"--automount-location=default\", \"--enable-dns-updates\"]" + "example": "[\"--enable-dns-updates\"]" }, "realm_name": { "$ref": "#/components/schemas/RealmName" diff --git a/public.openapi.yaml b/public.openapi.yaml index 2576b8d..6a01275 100644 --- a/public.openapi.yaml +++ b/public.openapi.yaml @@ -776,6 +776,11 @@ components: - realm_name additionalProperties: false properties: + automount_location: + description: Automount location name for ipa-client-automount + type: string + minLength: 1 + example: default cabundle: $ref: '#/components/schemas/CaCertBundle' enrollment_servers: @@ -789,7 +794,7 @@ components: type: array items: type: string - example: '["--automount-location=default", "--enable-dns-updates"]' + example: '["--enable-dns-updates"]' realm_name: $ref: '#/components/schemas/RealmName' x-rh-ipa-hcc: