diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 75eb02a..00d466b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -7,13 +7,16 @@ name: flightctl Python package on: [push, pull_request] +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -28,4 +31,4 @@ jobs: pip install -r test-requirements.txt - name: Test with pytest run: | - pytest --cov={{packageName}} + pytest --cov=flightctl diff --git a/.gitignore b/.gitignore index 43995bd..65b06b9 100644 --- a/.gitignore +++ b/.gitignore @@ -62,5 +62,5 @@ docs/_build/ # PyBuilder target/ -#Ipython Notebook +# Ipython Notebook .ipynb_checkpoints diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4da3dde..c3f377c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,9 +14,6 @@ stages: - pip install -r test-requirements.txt - pytest --cov=flightctl -pytest-3.8: - extends: .pytest - image: python:3.8-alpine pytest-3.9: extends: .pytest image: python:3.9-alpine @@ -29,3 +26,6 @@ pytest-3.11: pytest-3.12: extends: .pytest image: python:3.12-alpine +pytest-3.13: + extends: .pytest + image: python:3.13-alpine diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 8855160..cb8d6a8 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,19 +3,33 @@ .gitlab-ci.yml .travis.yml README.md +docs/AapProviderSpec.md docs/AbsolutePath.md docs/AppType.md docs/ApplicationContent.md docs/ApplicationEnvVars.md docs/ApplicationProviderSpec.md +docs/ApplicationResourceLimits.md +docs/ApplicationResources.md docs/ApplicationStatusType.md docs/ApplicationVolume.md docs/ApplicationVolumeProviderSpec.md +docs/ApplicationVolumeReclaimPolicy.md docs/ApplicationVolumeStatus.md docs/ApplicationsSummaryStatusType.md docs/AuthConfig.md -docs/AuthOrganizationsConfig.md +docs/AuthDynamicOrganizationAssignment.md +docs/AuthDynamicRoleAssignment.md +docs/AuthOrganizationAssignment.md +docs/AuthPerUserOrganizationAssignment.md +docs/AuthProvider.md +docs/AuthProviderList.md +docs/AuthProviderSpec.md +docs/AuthRoleAssignment.md +docs/AuthStaticOrganizationAssignment.md +docs/AuthStaticRoleAssignment.md docs/AuthenticationApi.md +docs/AuthproviderApi.md docs/Batch.md docs/BatchLimit.md docs/BatchSequence.md @@ -105,6 +119,7 @@ docs/FleetStatus.md docs/GenericRepoSpec.md docs/GitConfigProviderSpec.md docs/GitConfigProviderSpecGitRef.md +docs/GitHubIntrospectionSpec.md docs/HookAction.md docs/HookActionRun.md docs/HookCondition.md @@ -114,6 +129,7 @@ docs/HttpConfigProviderSpec.md docs/HttpConfigProviderSpecHttpRef.md docs/HttpRepoSpec.md docs/ImageApplicationProviderSpec.md +docs/ImageMountVolumeProviderSpec.md docs/ImagePullPolicy.md docs/ImageVolumeProviderSpec.md docs/ImageVolumeSource.md @@ -121,6 +137,8 @@ docs/InlineApplicationProviderSpec.md docs/InlineConfigProviderSpec.md docs/InternalTaskFailedDetails.md docs/InternalTaskPermanentlyFailedDetails.md +docs/JwtIntrospectionSpec.md +docs/K8sProviderSpec.md docs/KubernetesSecretProviderSpec.md docs/KubernetesSecretProviderSpecSecretRef.md docs/LabelApi.md @@ -128,13 +146,20 @@ docs/LabelSelector.md docs/ListMeta.md docs/MatchExpression.md docs/MemoryResourceMonitorSpec.md +docs/MountVolumeProviderSpec.md +docs/OAuth2Introspection.md +docs/OAuth2ProviderSpec.md +docs/OIDCProviderSpec.md docs/ObjectMeta.md docs/ObjectReference.md +docs/OpenShiftProviderSpec.md docs/Organization.md docs/OrganizationApi.md docs/OrganizationList.md docs/OrganizationSpec.md docs/PatchRequestInner.md +docs/Permission.md +docs/PermissionList.md docs/ReferencedRepositoryUpdatedDetails.md docs/RelativePath.md docs/RepoSpecType.md @@ -155,22 +180,31 @@ docs/ResourceSyncSpec.md docs/ResourceSyncStatus.md docs/ResourceUpdatedDetails.md docs/ResourcesyncApi.md -docs/RolloutDeviceSelection.md +docs/Rfc7662IntrospectionSpec.md docs/RolloutPolicy.md docs/RolloutStrategy.md docs/SshConfig.md docs/SshRepoSpec.md docs/Status.md +docs/SystemdActiveStateType.md +docs/SystemdEnableStateType.md +docs/SystemdLoadStateType.md +docs/SystemdUnitStatus.md docs/TemplateVersion.md docs/TemplateVersionList.md docs/TemplateVersionSpec.md docs/TemplateVersionStatus.md +docs/TokenRequest.md +docs/TokenResponse.md docs/UpdateSchedule.md +docs/UserInfoResponse.md docs/Version.md docs/VersionApi.md +docs/VolumeMount.md flightctl/__init__.py flightctl/api/__init__.py flightctl/api/authentication_api.py +flightctl/api/authprovider_api.py flightctl/api/certificatesigningrequest_api.py flightctl/api/device_api.py flightctl/api/deviceactions_api.py @@ -187,18 +221,31 @@ flightctl/api_response.py flightctl/configuration.py flightctl/exceptions.py flightctl/models/__init__.py +flightctl/models/aap_provider_spec.py flightctl/models/absolute_path.py flightctl/models/app_type.py flightctl/models/application_content.py flightctl/models/application_env_vars.py flightctl/models/application_provider_spec.py +flightctl/models/application_resource_limits.py +flightctl/models/application_resources.py flightctl/models/application_status_type.py flightctl/models/application_volume.py flightctl/models/application_volume_provider_spec.py +flightctl/models/application_volume_reclaim_policy.py flightctl/models/application_volume_status.py flightctl/models/applications_summary_status_type.py flightctl/models/auth_config.py -flightctl/models/auth_organizations_config.py +flightctl/models/auth_dynamic_organization_assignment.py +flightctl/models/auth_dynamic_role_assignment.py +flightctl/models/auth_organization_assignment.py +flightctl/models/auth_per_user_organization_assignment.py +flightctl/models/auth_provider.py +flightctl/models/auth_provider_list.py +flightctl/models/auth_provider_spec.py +flightctl/models/auth_role_assignment.py +flightctl/models/auth_static_organization_assignment.py +flightctl/models/auth_static_role_assignment.py flightctl/models/batch.py flightctl/models/batch_limit.py flightctl/models/batch_sequence.py @@ -282,6 +329,7 @@ flightctl/models/fleet_status.py flightctl/models/generic_repo_spec.py flightctl/models/git_config_provider_spec.py flightctl/models/git_config_provider_spec_git_ref.py +flightctl/models/git_hub_introspection_spec.py flightctl/models/hook_action.py flightctl/models/hook_action_run.py flightctl/models/hook_condition.py @@ -291,6 +339,7 @@ flightctl/models/http_config_provider_spec.py flightctl/models/http_config_provider_spec_http_ref.py flightctl/models/http_repo_spec.py flightctl/models/image_application_provider_spec.py +flightctl/models/image_mount_volume_provider_spec.py flightctl/models/image_pull_policy.py flightctl/models/image_volume_provider_spec.py flightctl/models/image_volume_source.py @@ -298,18 +347,27 @@ flightctl/models/inline_application_provider_spec.py flightctl/models/inline_config_provider_spec.py flightctl/models/internal_task_failed_details.py flightctl/models/internal_task_permanently_failed_details.py +flightctl/models/jwt_introspection_spec.py +flightctl/models/k8s_provider_spec.py flightctl/models/kubernetes_secret_provider_spec.py flightctl/models/kubernetes_secret_provider_spec_secret_ref.py flightctl/models/label_selector.py flightctl/models/list_meta.py flightctl/models/match_expression.py flightctl/models/memory_resource_monitor_spec.py +flightctl/models/mount_volume_provider_spec.py +flightctl/models/o_auth2_introspection.py +flightctl/models/o_auth2_provider_spec.py flightctl/models/object_meta.py flightctl/models/object_reference.py +flightctl/models/oidc_provider_spec.py +flightctl/models/open_shift_provider_spec.py flightctl/models/organization.py flightctl/models/organization_list.py flightctl/models/organization_spec.py flightctl/models/patch_request_inner.py +flightctl/models/permission.py +flightctl/models/permission_list.py flightctl/models/referenced_repository_updated_details.py flightctl/models/relative_path.py flightctl/models/repo_spec_type.py @@ -328,18 +386,26 @@ flightctl/models/resource_sync_list.py flightctl/models/resource_sync_spec.py flightctl/models/resource_sync_status.py flightctl/models/resource_updated_details.py -flightctl/models/rollout_device_selection.py +flightctl/models/rfc7662_introspection_spec.py flightctl/models/rollout_policy.py flightctl/models/rollout_strategy.py flightctl/models/ssh_config.py flightctl/models/ssh_repo_spec.py flightctl/models/status.py +flightctl/models/systemd_active_state_type.py +flightctl/models/systemd_enable_state_type.py +flightctl/models/systemd_load_state_type.py +flightctl/models/systemd_unit_status.py flightctl/models/template_version.py flightctl/models/template_version_list.py flightctl/models/template_version_spec.py flightctl/models/template_version_status.py +flightctl/models/token_request.py +flightctl/models/token_response.py flightctl/models/update_schedule.py +flightctl/models/user_info_response.py flightctl/models/version.py +flightctl/models/volume_mount.py flightctl/py.typed flightctl/rest.py git_push.sh diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index b23eb27..6328c54 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.11.0 +7.17.0 diff --git a/.travis.yml b/.travis.yml index 680949c..8a9f15e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" + - "3.13" # uncomment the following if needed - #- "3.12-dev" # 3.12 development branch + #- "3.13-dev" # 3.13 development branch #- "nightly" # nightly build # command to install dependencies install: diff --git a/Makefile b/Makefile index 726c13a..325de86 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ generate-client: - npx @openapitools/openapi-generator-cli version-manager set 7.11.0 + npx @openapitools/openapi-generator-cli version-manager set 7.17.0 npx @openapitools/openapi-generator-cli generate \ -g python \ -i ./api/v1alpha1/openapi.yml \ diff --git a/README.md b/README.md index f7356dc..8256b8a 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,15 @@ This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: v1alpha1 +- API version: v1beta1 - Package version: 1.0.0 -- Generator version: 7.11.0 +- Generator version: 7.17.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://flightctl.io](https://flightctl.io) ## Requirements. -Python 3.8+ +Python 3.9+ ## Installation & Usage ### pip install @@ -86,7 +86,16 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AuthenticationApi* | [**auth_config**](docs/AuthenticationApi.md#auth_config) | **GET** /api/v1/auth/config | +*AuthenticationApi* | [**auth_get_permissions**](docs/AuthenticationApi.md#auth_get_permissions) | **GET** /api/v1/auth/permissions | +*AuthenticationApi* | [**auth_token**](docs/AuthenticationApi.md#auth_token) | **POST** /api/v1/auth/{providername}/token | +*AuthenticationApi* | [**auth_user_info**](docs/AuthenticationApi.md#auth_user_info) | **GET** /api/v1/auth/userinfo | *AuthenticationApi* | [**auth_validate**](docs/AuthenticationApi.md#auth_validate) | **GET** /api/v1/auth/validate | +*AuthproviderApi* | [**create_auth_provider**](docs/AuthproviderApi.md#create_auth_provider) | **POST** /api/v1/authproviders | +*AuthproviderApi* | [**delete_auth_provider**](docs/AuthproviderApi.md#delete_auth_provider) | **DELETE** /api/v1/authproviders/{name} | +*AuthproviderApi* | [**get_auth_provider**](docs/AuthproviderApi.md#get_auth_provider) | **GET** /api/v1/authproviders/{name} | +*AuthproviderApi* | [**list_auth_providers**](docs/AuthproviderApi.md#list_auth_providers) | **GET** /api/v1/authproviders | +*AuthproviderApi* | [**patch_auth_provider**](docs/AuthproviderApi.md#patch_auth_provider) | **PATCH** /api/v1/authproviders/{name} | +*AuthproviderApi* | [**replace_auth_provider**](docs/AuthproviderApi.md#replace_auth_provider) | **PUT** /api/v1/authproviders/{name} | *CertificatesigningrequestApi* | [**create_certificate_signing_request**](docs/CertificatesigningrequestApi.md#create_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests | *CertificatesigningrequestApi* | [**delete_certificate_signing_request**](docs/CertificatesigningrequestApi.md#delete_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name} | *CertificatesigningrequestApi* | [**get_certificate_signing_request**](docs/CertificatesigningrequestApi.md#get_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | @@ -150,18 +159,31 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [AapProviderSpec](docs/AapProviderSpec.md) - [AbsolutePath](docs/AbsolutePath.md) - [AppType](docs/AppType.md) - [ApplicationContent](docs/ApplicationContent.md) - [ApplicationEnvVars](docs/ApplicationEnvVars.md) - [ApplicationProviderSpec](docs/ApplicationProviderSpec.md) + - [ApplicationResourceLimits](docs/ApplicationResourceLimits.md) + - [ApplicationResources](docs/ApplicationResources.md) - [ApplicationStatusType](docs/ApplicationStatusType.md) - [ApplicationVolume](docs/ApplicationVolume.md) - [ApplicationVolumeProviderSpec](docs/ApplicationVolumeProviderSpec.md) + - [ApplicationVolumeReclaimPolicy](docs/ApplicationVolumeReclaimPolicy.md) - [ApplicationVolumeStatus](docs/ApplicationVolumeStatus.md) - [ApplicationsSummaryStatusType](docs/ApplicationsSummaryStatusType.md) - [AuthConfig](docs/AuthConfig.md) - - [AuthOrganizationsConfig](docs/AuthOrganizationsConfig.md) + - [AuthDynamicOrganizationAssignment](docs/AuthDynamicOrganizationAssignment.md) + - [AuthDynamicRoleAssignment](docs/AuthDynamicRoleAssignment.md) + - [AuthOrganizationAssignment](docs/AuthOrganizationAssignment.md) + - [AuthPerUserOrganizationAssignment](docs/AuthPerUserOrganizationAssignment.md) + - [AuthProvider](docs/AuthProvider.md) + - [AuthProviderList](docs/AuthProviderList.md) + - [AuthProviderSpec](docs/AuthProviderSpec.md) + - [AuthRoleAssignment](docs/AuthRoleAssignment.md) + - [AuthStaticOrganizationAssignment](docs/AuthStaticOrganizationAssignment.md) + - [AuthStaticRoleAssignment](docs/AuthStaticRoleAssignment.md) - [Batch](docs/Batch.md) - [BatchLimit](docs/BatchLimit.md) - [BatchSequence](docs/BatchSequence.md) @@ -245,6 +267,7 @@ Class | Method | HTTP request | Description - [GenericRepoSpec](docs/GenericRepoSpec.md) - [GitConfigProviderSpec](docs/GitConfigProviderSpec.md) - [GitConfigProviderSpecGitRef](docs/GitConfigProviderSpecGitRef.md) + - [GitHubIntrospectionSpec](docs/GitHubIntrospectionSpec.md) - [HookAction](docs/HookAction.md) - [HookActionRun](docs/HookActionRun.md) - [HookCondition](docs/HookCondition.md) @@ -254,6 +277,7 @@ Class | Method | HTTP request | Description - [HttpConfigProviderSpecHttpRef](docs/HttpConfigProviderSpecHttpRef.md) - [HttpRepoSpec](docs/HttpRepoSpec.md) - [ImageApplicationProviderSpec](docs/ImageApplicationProviderSpec.md) + - [ImageMountVolumeProviderSpec](docs/ImageMountVolumeProviderSpec.md) - [ImagePullPolicy](docs/ImagePullPolicy.md) - [ImageVolumeProviderSpec](docs/ImageVolumeProviderSpec.md) - [ImageVolumeSource](docs/ImageVolumeSource.md) @@ -261,18 +285,27 @@ Class | Method | HTTP request | Description - [InlineConfigProviderSpec](docs/InlineConfigProviderSpec.md) - [InternalTaskFailedDetails](docs/InternalTaskFailedDetails.md) - [InternalTaskPermanentlyFailedDetails](docs/InternalTaskPermanentlyFailedDetails.md) + - [JwtIntrospectionSpec](docs/JwtIntrospectionSpec.md) + - [K8sProviderSpec](docs/K8sProviderSpec.md) - [KubernetesSecretProviderSpec](docs/KubernetesSecretProviderSpec.md) - [KubernetesSecretProviderSpecSecretRef](docs/KubernetesSecretProviderSpecSecretRef.md) - [LabelSelector](docs/LabelSelector.md) - [ListMeta](docs/ListMeta.md) - [MatchExpression](docs/MatchExpression.md) - [MemoryResourceMonitorSpec](docs/MemoryResourceMonitorSpec.md) + - [MountVolumeProviderSpec](docs/MountVolumeProviderSpec.md) + - [OAuth2Introspection](docs/OAuth2Introspection.md) + - [OAuth2ProviderSpec](docs/OAuth2ProviderSpec.md) + - [OIDCProviderSpec](docs/OIDCProviderSpec.md) - [ObjectMeta](docs/ObjectMeta.md) - [ObjectReference](docs/ObjectReference.md) + - [OpenShiftProviderSpec](docs/OpenShiftProviderSpec.md) - [Organization](docs/Organization.md) - [OrganizationList](docs/OrganizationList.md) - [OrganizationSpec](docs/OrganizationSpec.md) - [PatchRequestInner](docs/PatchRequestInner.md) + - [Permission](docs/Permission.md) + - [PermissionList](docs/PermissionList.md) - [ReferencedRepositoryUpdatedDetails](docs/ReferencedRepositoryUpdatedDetails.md) - [RelativePath](docs/RelativePath.md) - [RepoSpecType](docs/RepoSpecType.md) @@ -291,18 +324,26 @@ Class | Method | HTTP request | Description - [ResourceSyncSpec](docs/ResourceSyncSpec.md) - [ResourceSyncStatus](docs/ResourceSyncStatus.md) - [ResourceUpdatedDetails](docs/ResourceUpdatedDetails.md) - - [RolloutDeviceSelection](docs/RolloutDeviceSelection.md) + - [Rfc7662IntrospectionSpec](docs/Rfc7662IntrospectionSpec.md) - [RolloutPolicy](docs/RolloutPolicy.md) - [RolloutStrategy](docs/RolloutStrategy.md) - [SshConfig](docs/SshConfig.md) - [SshRepoSpec](docs/SshRepoSpec.md) - [Status](docs/Status.md) + - [SystemdActiveStateType](docs/SystemdActiveStateType.md) + - [SystemdEnableStateType](docs/SystemdEnableStateType.md) + - [SystemdLoadStateType](docs/SystemdLoadStateType.md) + - [SystemdUnitStatus](docs/SystemdUnitStatus.md) - [TemplateVersion](docs/TemplateVersion.md) - [TemplateVersionList](docs/TemplateVersionList.md) - [TemplateVersionSpec](docs/TemplateVersionSpec.md) - [TemplateVersionStatus](docs/TemplateVersionStatus.md) + - [TokenRequest](docs/TokenRequest.md) + - [TokenResponse](docs/TokenResponse.md) - [UpdateSchedule](docs/UpdateSchedule.md) + - [UserInfoResponse](docs/UserInfoResponse.md) - [Version](docs/Version.md) + - [VolumeMount](docs/VolumeMount.md) diff --git a/api/v1alpha1/openapi.yml b/api/v1alpha1/openapi.yml index fa2e539..edbb4f9 100644 --- a/api/v1alpha1/openapi.yml +++ b/api/v1alpha1/openapi.yml @@ -1,7 +1,7 @@ openapi: 3.0.1 info: title: Flight Control API - version: v1alpha1 + version: v1beta1 description: | [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. contact: @@ -16,6 +16,8 @@ servers: tags: - name: authentication description: Operations for authentication. + - name: authprovider + description: Operations on AuthProvider resources. - name: certificatesigningrequest description: Operations on CertificateSigningRequest resources. - name: device @@ -89,6 +91,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /api/v1/auth/validate: get: tags: @@ -126,6 +134,121 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/auth/permissions: + get: + tags: + - authentication + description: Get the list of available permissions for the authenticated user. + operationId: authGetPermissions + responses: + "200": + description: List of available permissions + content: + application/json: + schema: + $ref: '#/components/schemas/PermissionList' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "418": + description: Auth not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/auth/{providername}/token: + post: + tags: + - authentication + description: OAuth2 token exchange endpoint. Proxies token requests to the configured authentication provider (PAM issuer) for authorization code flow with PKCE support. + operationId: authToken + parameters: + - name: providername + in: path + required: true + schema: + type: string + description: Name of the authentication provider to use. + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/TokenRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TokenRequest' + responses: + "200": + description: Token response + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + /api/v1/auth/userinfo: + get: + tags: + - authentication + description: OIDC UserInfo endpoint. Proxies the request to the configured authentication provider to retrieve user information. + operationId: authUserInfo + responses: + "200": + description: User information + content: + application/json: + schema: + $ref: '#/components/schemas/UserInfoResponse' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "418": + description: Auth not configured + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "500": description: Internal Server Error content: @@ -3590,6 +3713,12 @@ paths: summary: List organizations description: Retrieves a list of organizations. Only returns organizations that the user has access to. operationId: listOrganizations + parameters: + - name: fieldSelector + in: query + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). + schema: + type: string responses: "200": description: OK @@ -3627,147 +3756,507 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' -components: - securitySchemes: - bearerAuth: - type: http - scheme: bearer - bearerFormat: JWT - orgId: - type: apiKey - in: query - name: org_id - description: The UUID of the organization that owns the resource. Maps to an organizations metadata.name. - schemas: - ResourceKind: - type: string - enum: [CertificateSigningRequest, EnrollmentRequest, Device, Fleet, Repository, ResourceSync, TemplateVersion] - description: Resource types exposed via the API. - DeviceDecommissionTargetType: - type: string - enum: - - "Unenroll" - - "FactoryReset" - x-enum-varnames: - - "DeviceDecommissionTargetTypeUnenroll" - - "DeviceDecommissionTargetTypeFactoryReset" - description: Specifies the desired decommissioning method of the device. - DeviceDecommission: - type: object - properties: - target: - $ref: '#/components/schemas/DeviceDecommissionTargetType' - required: - - target - description: Metadata about a device decommissioning request. - - DeviceResumeRequest: - type: object - additionalProperties: false - properties: - labelSelector: - type: string - description: A selector to restrict the list of devices to resume by their labels. Uses the same format as Kubernetes label selectors (e.g., "key1=value1,key2!=value2"). - fieldSelector: - type: string - description: A selector to restrict the list of devices to resume by their fields. Uses the same format as Kubernetes field selectors (e.g., "metadata.name=device1,status.phase!=Pending"). - anyOf: - - required: - - labelSelector - - required: - - fieldSelector - description: Request to resume devices based on label selector and/or field selector. At least one selector must be provided. - example: - labelSelector: "environment=production,tier=frontend" - - DeviceResumeResponse: - type: object - additionalProperties: false - required: - - resumedDevices - properties: - resumedDevices: - type: integer - description: Number of devices that were successfully resumed. - description: Response from resuming devices. - example: - resumedDevices: 3 - - - PatchRequest: - type: array - items: - type: object - additionalProperties: false - required: - - op - - path - properties: - path: - description: A JSON Pointer path. + /api/v1/authproviders: + get: + tags: + - authprovider + description: List AuthProvider resources. + operationId: listAuthProviders + parameters: + - name: continue + in: query + description: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + required: false + schema: type: string - value: - description: The value to add or replace. - op: - description: The operation to perform. + - name: labelSelector + in: query + description: A selector to restrict the list of returned objects by their labels. Defaults to everything. + schema: type: string - enum: - - add - - replace - - remove - - test - Repository: - type: object - properties: - apiVersion: - type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' - kind: - type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' - metadata: - $ref: '#/components/schemas/ObjectMeta' - spec: - $ref: '#/components/schemas/RepositorySpec' - status: - $ref: '#/components/schemas/RepositoryStatus' - required: - - apiVersion - - kind - - metadata - - spec - description: Repository represents a Git repository or an HTTP endpoint. - HttpConfig: - type: object - description: Configuration for HTTP transport. - additionalProperties: false - properties: - username: - type: string - description: The username for auth with HTTP transport. - password: - type: string - description: The password for auth with HTTP transport. - format: password - tls.crt: - type: string - description: Base64 encoded TLS cert data. - format: password - tls.key: - type: string - description: Base64 encoded TLS cert key. - format: password - ca.crt: - type: string - description: Base64 encoded root CA. - skipServerVerification: - type: boolean - description: Skip remote server verification. - token: - type: string - description: The token for auth with HTTP transport. - format: password - HttpRepoSpec: + - name: fieldSelector + in: query + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). + schema: + type: string + - name: limit + in: query + description: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + required: false + schema: + type: integer + format: int32 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProviderList' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + post: + tags: + - authprovider + description: Create an AuthProvider resource. + operationId: createAuthProvider + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProvider' + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProvider' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "409": + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + /api/v1/authproviders/{name}: + get: + tags: + - authprovider + description: Get an AuthProvider resource. + operationId: getAuthProvider + parameters: + - name: name + in: path + description: The name of the AuthProvider resource to get. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProvider' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "404": + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + put: + tags: + - authprovider + description: Update an AuthProvider resource. + operationId: replaceAuthProvider + parameters: + - name: name + in: path + description: The name of the AuthProvider resource to update. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProvider' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProvider' + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProvider' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "404": + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "409": + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + patch: + tags: + - authprovider + description: Patch an AuthProvider resource. + operationId: patchAuthProvider + parameters: + - name: name + in: path + description: The name of the AuthProvider resource to patch. + required: true + schema: + type: string + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthProvider' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "404": + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "409": + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + delete: + tags: + - authprovider + description: Delete an AuthProvider resource. + operationId: deleteAuthProvider + parameters: + - name: name + in: path + description: The name of the AuthProvider resource to delete. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "404": + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "429": + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Status' +components: + securitySchemes: + bearerAuth: + type: http + scheme: bearer + bearerFormat: JWT + orgId: + type: apiKey + in: query + name: org_id + description: The UUID of the organization that owns the resource. Maps to an organizations metadata.name. + schemas: + ResourceKind: + type: string + enum: [CertificateSigningRequest, EnrollmentRequest, Device, Fleet, Repository, ResourceSync, TemplateVersion, AuthProvider] + description: Resource types exposed via the API. + DeviceDecommissionTargetType: + type: string + enum: + - "Unenroll" + - "FactoryReset" + x-enum-varnames: + - "DeviceDecommissionTargetTypeUnenroll" + - "DeviceDecommissionTargetTypeFactoryReset" + description: Specifies the desired decommissioning method of the device. + DeviceDecommission: + type: object + properties: + target: + $ref: '#/components/schemas/DeviceDecommissionTargetType' + required: + - target + description: Metadata about a device decommissioning request. + + DeviceResumeRequest: + type: object + additionalProperties: false + properties: + labelSelector: + type: string + description: A selector to restrict the list of devices to resume by their labels. Uses the same format as Kubernetes label selectors (e.g., "key1=value1,key2!=value2"). + fieldSelector: + type: string + description: A selector to restrict the list of devices to resume by their fields. Uses the same format as Kubernetes field selectors (e.g., "metadata.name=device1,status.phase!=Pending"). + anyOf: + - required: + - labelSelector + - required: + - fieldSelector + description: Request to resume devices based on label selector and/or field selector. At least one selector must be provided. + example: + labelSelector: "environment=production,tier=frontend" + + DeviceResumeResponse: + type: object + additionalProperties: false + required: + - resumedDevices + properties: + resumedDevices: + type: integer + description: Number of devices that were successfully resumed. + description: Response from resuming devices. + example: + resumedDevices: 3 + + + PatchRequest: + type: array + items: + type: object + additionalProperties: false + required: + - op + - path + properties: + path: + description: A JSON Pointer path. + type: string + value: + description: The value to add or replace. + op: + description: The operation to perform. + type: string + enum: + - add + - replace + - remove + - test + Repository: + type: object + properties: + apiVersion: + type: string + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' + kind: + type: string + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' + metadata: + $ref: '#/components/schemas/ObjectMeta' + spec: + $ref: '#/components/schemas/RepositorySpec' + status: + $ref: '#/components/schemas/RepositoryStatus' + required: + - apiVersion + - kind + - metadata + - spec + description: Repository represents a Git repository or an HTTP endpoint. + HttpConfig: + type: object + description: Configuration for HTTP transport. + additionalProperties: false + properties: + username: + type: string + description: The username for auth with HTTP transport. + password: + type: string + description: The password for auth with HTTP transport. + format: password + tls.crt: + type: string + description: Base64 encoded TLS cert data. + format: password + tls.key: + type: string + description: Base64 encoded TLS cert key. + format: password + ca.crt: + type: string + description: Base64 encoded root CA. + skipServerVerification: + type: boolean + description: Skip remote server verification. + token: + type: string + description: The token for auth with HTTP transport. + format: password + HttpRepoSpec: type: object additionalProperties: false properties: @@ -4072,6 +4561,8 @@ components: description: The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace. appType: $ref: '#/components/schemas/AppType' + required: + - appType - oneOf: - $ref: '#/components/schemas/ImageApplicationProviderSpec' - $ref: '#/components/schemas/InlineApplicationProviderSpec' @@ -4083,7 +4574,14 @@ components: properties: image: type: string - description: Reference to the container image for the application package. + description: Reference to the OCI image or artifact for the application package. + ports: + type: array + description: Port mappings. + items: + $ref: '#/components/schemas/ApplicationPort' + resources: + $ref: '#/components/schemas/ApplicationResources' required: - image InlineApplicationProviderSpec: @@ -4115,10 +4613,30 @@ components: name: type: string description: Unique name of the volume used within the application. + reclaimPolicy: + $ref: "#/components/schemas/ApplicationVolumeReclaimPolicy" required: - name - oneOf: - $ref: "#/components/schemas/ImageVolumeProviderSpec" + - $ref: "#/components/schemas/MountVolumeProviderSpec" + - $ref: "#/components/schemas/ImageMountVolumeProviderSpec" + ApplicationVolumeReclaimPolicy: + type: string + description: Defines how the agent handles a volume when the owning application is removed. + default: Retain + enum: + - Retain + VolumeMount: + type: object + description: Mount configuration for a volume. + properties: + path: + type: string + description: Mount path in the container with support for options. + example: "/etc/nginx/conf.d:ro" + required: + - path ImageVolumeProviderSpec: type: object properties: @@ -4126,6 +4644,8 @@ components: $ref: '#/components/schemas/ImageVolumeSource' required: - image + not: + required: [mount] ImageVolumeSource: type: object description: Describes the source of an OCI-compliant image or artifact. @@ -4137,6 +4657,27 @@ components: $ref: '#/components/schemas/ImagePullPolicy' required: - reference + MountVolumeProviderSpec: + type: object + description: Named volume mount configuration. + properties: + mount: + $ref: '#/components/schemas/VolumeMount' + required: + - mount + not: + required: [image] + ImageMountVolumeProviderSpec: + type: object + description: Volume from OCI image mounted at specified path. + properties: + image: + $ref: '#/components/schemas/ImageVolumeSource' + mount: + $ref: '#/components/schemas/VolumeMount' + required: + - image + - mount ApplicationContent: allOf: - $ref: '#/components/schemas/FileContent' @@ -4152,13 +4693,40 @@ components: description: Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters. additionalProperties: type: string + ApplicationPort: + type: string + description: Port mapping in format "hostPort:containerPort" (e.g., "8080:80"). + pattern: '^\d+:\d+$' + example: "8080:80" + ApplicationResourceLimits: + type: object + description: Resource limits for the application. + properties: + cpu: + type: string + description: CPU limit in cores. Format restricted based on application type. + example: "0.75" + memory: + type: string + description: Memory limit with optional unit. Format restricted based on application type. + example: "256m" + ApplicationResources: + type: object + description: Resource constraints for the application. + properties: + limits: + $ref: '#/components/schemas/ApplicationResourceLimits' AppType: type: string description: The type of the application. enum: - "compose" + - "quadlet" + - "container" x-enum-varnames: - "AppTypeCompose" + - "AppTypeQuadlet" + - "AppTypeContainer" ResourceMonitor: oneOf: - $ref: '#/components/schemas/CpuResourceMonitorSpec' @@ -4352,6 +4920,7 @@ components: $ref: '#/components/schemas/Duration' required: - at + - startGraceDuration TimeZone: type: string description: Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported ("GMT", "UTC"). @@ -4443,9 +5012,14 @@ components: $ref: '#/components/schemas/Condition' systemInfo: $ref: "#/components/schemas/DeviceSystemInfo" + systemd: + type: array + description: List of systemd unit statuses. + items: + $ref: "#/components/schemas/SystemdUnitStatus" applications: type: array - description: List of device application status. + description: List of device application statuses. items: $ref: "#/components/schemas/DeviceApplicationStatus" applicationsSummary: @@ -4513,6 +5087,116 @@ components: additionalProperties: type: string description: A user-defined custom property value. + SystemdUnitStatus: + type: object + required: + - unit + - description + - enableState + - loadState + - activeState + - subState + properties: + unit: + type: string + description: The unit name (e.g., "sshd.service"). + example: "sshd.service" + description: + type: string + description: The human-readable description for the unit. + maxLength: 2048 + example: "OpenSSH server daemon" + enableState: + $ref: "#/components/schemas/SystemdEnableStateType" + loadState: + $ref: "#/components/schemas/SystemdLoadStateType" + activeState: + $ref: "#/components/schemas/SystemdActiveStateType" + subState: + type: string + description: The low-level, unit-type-specific state. + maxLength: 64 + pattern: '^[a-z0-9-]+$' + example: "running" + SystemdEnableStateType: + type: string + description: The enable state of the unit file. + enum: + - "enabled" + - "enabled-runtime" + - "linked" + - "linked-runtime" + - "alias" + - "masked" + - "masked-runtime" + - "static" + - "disabled" + - "indirect" + - "generated" + - "transient" + - "bad" + - "unknown" + - "" + x-enum-varnames: + - "SystemdEnableStateEnabled" + - "SystemdEnableStateEnabledRuntime" + - "SystemdEnableStateLinked" + - "SystemdEnableStateLinkedRuntime" + - "SystemdEnableStateAlias" + - "SystemdEnableStateMasked" + - "SystemdEnableStateMaskedRuntime" + - "SystemdEnableStateStatic" + - "SystemdEnableStateDisabled" + - "SystemdEnableStateIndirect" + - "SystemdEnableStateGenerated" + - "SystemdEnableStateTransient" + - "SystemdEnableStateBad" + - "SystemdEnableStateUnknown" + - "SystemdEnableStateEmpty" + SystemdLoadStateType: + type: string + description: The load state of the unit file. + enum: + - "stub" + - "loaded" + - "not-found" + - "bad-setting" + - "error" + - "merged" + - "masked" + - "unknown" + x-enum-varnames: + - "SystemdLoadStateStub" + - "SystemdLoadStateLoaded" + - "SystemdLoadStateNotFound" + - "SystemdLoadStateBadSetting" + - "SystemdLoadStateError" + - "SystemdLoadStateMerged" + - "SystemdLoadStateMasked" + - "SystemdLoadStateUnknown" + SystemdActiveStateType: + type: string + description: The high-level unit activation state. + enum: + - "active" + - "reloading" + - "inactive" + - "failed" + - "activating" + - "deactivating" + - "maintenance" + - "refreshing" + - "unknown" + x-enum-varnames: + - "SystemdActiveStateActive" + - "SystemdActiveStateReloading" + - "SystemdActiveStateInactive" + - "SystemdActiveStateFailed" + - "SystemdActiveStateActivating" + - "SystemdActiveStateDeactivating" + - "SystemdActiveStateMaintenance" + - "SystemdActiveStateRefreshing" + - "SystemdActiveStateUnknown" DeviceApplicationStatus: type: object required: @@ -4520,6 +5204,8 @@ components: - ready - restarts - status + - embedded + - appType properties: name: type: string @@ -4532,6 +5218,11 @@ components: description: Number of restarts observed for the application. status: $ref: "#/components/schemas/ApplicationStatusType" + embedded: + type: boolean + description: Whether the application is embedded in the bootc image. + appType: + $ref: "#/components/schemas/AppType" volumes: type: array description: Status of volumes used by this application. @@ -4569,11 +5260,13 @@ components: - "Degraded" - "Error" - "Unknown" + - "NoApplications" x-enum-varnames: - "ApplicationsSummaryStatusHealthy" - "ApplicationsSummaryStatusDegraded" - "ApplicationsSummaryStatusError" - "ApplicationsSummaryStatusUnknown" + - "ApplicationsSummaryStatusNoApplications" ApplicationStatusType: type: string description: Status of a single application on the device. @@ -4916,6 +5609,9 @@ components: additionalProperties: type: string description: 'A set of labels that the service will apply to this device when its enrollment is approved.' + knownRenderedVersion: + type: string + description: 'The rendered version of the device from desired.json (optional).' description: EnrollmentRequestSpec is a description of a EnrollmentRequest's target state. EnrollmentRequestStatus: type: object @@ -5096,7 +5792,6 @@ components: type: string pattern: '^(?:[1-9]\d*)?\d[smh]$' description: 'The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.' - default: "0s" RolloutStrategy: type: string @@ -5324,36 +6019,124 @@ components: $ref: '#/components/schemas/TemplateVersion' required: - apiVersion - - kind - - metadata - - items - description: TemplateVersionList is a list of TemplateVersions. - AuthConfig: + - kind + - metadata + - items + description: TemplateVersionList is a list of TemplateVersions. + AuthConfig: + type: object + properties: + apiVersion: + type: string + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' + providers: + type: array + description: List of all available authentication providers. + items: + $ref: '#/components/schemas/AuthProvider' + defaultProvider: + type: string + description: Name of the default authentication provider. + organizationsEnabled: + type: boolean + description: Whether organizations are enabled for authentication. + required: + - apiVersion + TokenRequest: type: object + required: + - grant_type + - client_id properties: - authType: + grant_type: type: string - description: Auth type. - authURL: + enum: [refresh_token, authorization_code] + description: OAuth2 grant type. + x-oapi-codegen-extra-tags: + form: grant_type + client_id: type: string - description: Auth URL. - authOrganizationsConfig: - $ref: '#/components/schemas/AuthOrganizationsConfig' - required: - - authType - - authURL - - authOrganizationsConfig - description: Auth config. - AuthOrganizationsConfig: + description: OAuth2 client identifier. + x-oapi-codegen-extra-tags: + form: client_id + refresh_token: + type: string + nullable: true + description: Refresh token for refresh_token grant. + x-oapi-codegen-extra-tags: + form: refresh_token,omitempty + code: + type: string + nullable: true + description: Authorization code for authorization_code grant. + x-oapi-codegen-extra-tags: + form: code,omitempty + scope: + type: string + nullable: true + description: OAuth2 scope. + x-oapi-codegen-extra-tags: + form: scope,omitempty + code_verifier: + type: string + nullable: true + description: PKCE code verifier. + x-oapi-codegen-extra-tags: + form: code_verifier,omitempty + redirect_uri: + type: string + nullable: true + description: OAuth2 redirect URI (required for authorization_code grant if included in authorization request). + x-oapi-codegen-extra-tags: + form: redirect_uri,omitempty + description: OAuth2 token request + TokenResponse: type: object - description: Auth related organizations configuration. properties: - enabled: - type: boolean - description: If true, support for IdP provided organizations is enabled. - default: false - required: - - enabled + access_token: + type: string + description: OAuth2 access token. + token_type: + type: string + enum: [Bearer] + description: Token type. + id_token: + type: string + description: OIDC ID token (JWT). Present when using OIDC with openid scope. + refresh_token: + type: string + description: OAuth2 refresh token. + expires_in: + type: integer + description: Token expiration time in seconds. + error: + type: string + description: OAuth2 error code. + error_description: + type: string + description: OAuth2 error description. + description: OAuth2 token response + UserInfoResponse: + type: object + properties: + sub: + type: string + description: Subject identifier. + preferred_username: + type: string + description: Preferred username. + name: + type: string + description: Full name. + organizations: + type: array + items: + $ref: '#/components/schemas/Organization' + description: User organizations. + error: + type: string + description: Error code. + description: OIDC UserInfo response ListMeta: type: object properties: @@ -6157,4 +6940,498 @@ components: description: 'List of Organizations.' items: $ref: '#/components/schemas/Organization' - description: OrganizationList is a list of Organizations. \ No newline at end of file + description: OrganizationList is a list of Organizations. + AuthProvider: + type: object + properties: + apiVersion: + type: string + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' + kind: + type: string + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' + metadata: + $ref: '#/components/schemas/ObjectMeta' + spec: + $ref: '#/components/schemas/AuthProviderSpec' + required: + - apiVersion + - kind + - metadata + - spec + description: AuthProvider represents an authentication provider configuration supporting both OIDC and OAuth2. + AuthProviderSpec: + oneOf: + - $ref: '#/components/schemas/OIDCProviderSpec' + - $ref: '#/components/schemas/OAuth2ProviderSpec' + - $ref: '#/components/schemas/OpenShiftProviderSpec' + - $ref: '#/components/schemas/AapProviderSpec' + - $ref: '#/components/schemas/K8sProviderSpec' + discriminator: + propertyName: providerType + mapping: + oidc: '#/components/schemas/OIDCProviderSpec' + oauth2: '#/components/schemas/OAuth2ProviderSpec' + openshift: '#/components/schemas/OpenShiftProviderSpec' + aap: '#/components/schemas/AapProviderSpec' + k8s: '#/components/schemas/K8sProviderSpec' + required: + - providerType + OIDCProviderSpec: + type: object + description: OIDCProviderSpec describes an OIDC provider configuration. + properties: + providerType: + type: string + enum: [oidc] + description: The type of authentication provider. + displayName: + type: string + description: Human-readable display name for the provider. + issuer: + type: string + description: The OIDC issuer URL (e.g., https://accounts.google.com). + clientId: + type: string + description: The OIDC client ID. + clientSecret: + type: string + description: The OIDC client secret. + writeOnly: true + enabled: + type: boolean + description: Whether this OIDC provider is enabled. + default: true + scopes: + type: array + items: + type: string + description: List of OIDC scopes to request. + organizationAssignment: + $ref: '#/components/schemas/AuthOrganizationAssignment' + usernameClaim: + type: array + items: + type: string + description: JSON path to the username claim in the JWT token as an array of path segments (e.g., ["preferred_username"], ["email"], ["sub"]). + default: ["preferred_username"] + roleAssignment: + $ref: '#/components/schemas/AuthRoleAssignment' + required: + - providerType + - issuer + - clientId + - clientSecret + - organizationAssignment + - roleAssignment + OAuth2ProviderSpec: + type: object + description: OAuth2ProviderSpec describes an OAuth2 provider configuration. + properties: + providerType: + type: string + enum: [oauth2] + description: The type of authentication provider. + displayName: + type: string + description: Human-readable display name for the provider. + issuer: + type: string + description: The OAuth2 issuer identifier (used for issuer identification in tokens). + authorizationUrl: + type: string + description: The OAuth2 authorization endpoint URL. + tokenUrl: + type: string + description: The OAuth2 token endpoint URL. + userinfoUrl: + type: string + description: The OAuth2 userinfo endpoint URL. + clientId: + type: string + description: The OAuth2 client ID. + clientSecret: + type: string + description: The OAuth2 client secret. + writeOnly: true + enabled: + type: boolean + description: Whether this OAuth2 provider is enabled. + default: true + scopes: + type: array + items: + type: string + description: List of OAuth2 scopes to request. + organizationAssignment: + $ref: '#/components/schemas/AuthOrganizationAssignment' + usernameClaim: + type: array + items: + type: string + description: JSON path to the username claim in the userinfo response as an array of path segments (e.g., ["preferred_username"], ["email"], ["sub"]). + default: ["preferred_username"] + roleAssignment: + $ref: '#/components/schemas/AuthRoleAssignment' + introspection: + $ref: '#/components/schemas/OAuth2Introspection' + required: + - providerType + - authorizationUrl + - tokenUrl + - userinfoUrl + - clientId + - clientSecret + - organizationAssignment + - roleAssignment + OAuth2Introspection: + type: object + description: OAuth2Introspection defines the token introspection configuration. + oneOf: + - $ref: '#/components/schemas/Rfc7662IntrospectionSpec' + - $ref: '#/components/schemas/GitHubIntrospectionSpec' + - $ref: '#/components/schemas/JwtIntrospectionSpec' + discriminator: + propertyName: type + mapping: + rfc7662: '#/components/schemas/Rfc7662IntrospectionSpec' + github: '#/components/schemas/GitHubIntrospectionSpec' + jwt: '#/components/schemas/JwtIntrospectionSpec' + Rfc7662IntrospectionSpec: + type: object + description: Rfc7662IntrospectionSpec defines token introspection using RFC 7662 standard. Uses the OAuth2ProviderSpec clientId and clientSecret for authentication. + properties: + type: + type: string + enum: [rfc7662] + description: The introspection type. + url: + type: string + description: The RFC 7662 token introspection endpoint URL. + required: + - type + - url + GitHubIntrospectionSpec: + type: object + description: GitHubIntrospectionSpec defines token introspection using GitHub API (POST /applications/{client_id}/token). Uses the OAuth2ProviderSpec clientId and clientSecret for Basic Auth and URL path. + properties: + type: + type: string + enum: [github] + description: The introspection type. + url: + type: string + description: The GitHub API base URL. Defaults to https://api.github.com for GitHub.com, but can be customized for GitHub Enterprise Server. + default: https://api.github.com + required: + - type + JwtIntrospectionSpec: + type: object + description: JwtIntrospectionSpec defines token introspection using JWT validation with JWKS. + properties: + type: + type: string + enum: [jwt] + description: The introspection type. + jwksUrl: + type: string + description: The JWKS (JSON Web Key Set) endpoint URL for fetching public keys to validate JWT signatures. + issuer: + type: string + description: Expected issuer claim value in the JWT. If not specified, uses the OAuth2ProviderSpec issuer. + audience: + type: array + items: + type: string + description: Expected audience claim values in the JWT. If not specified, uses the OAuth2ProviderSpec clientId. + required: + - type + - jwksUrl + OpenShiftProviderSpec: + type: object + description: OpenShiftProviderSpec describes an OpenShift OAuth provider configuration. + properties: + providerType: + type: string + enum: [openshift] + description: The type of authentication provider. + displayName: + type: string + description: Human-readable display name for the provider. + issuer: + type: string + description: The OAuth2 issuer identifier (used for issuer identification in tokens). + authorizationUrl: + type: string + description: The OAuth2 authorization endpoint URL. + tokenUrl: + type: string + description: The OAuth2 token endpoint URL. + clientId: + type: string + description: The OAuth2 client ID. + clientSecret: + type: string + description: The OAuth2 client secret. + writeOnly: true + enabled: + type: boolean + description: Whether this OpenShift provider is enabled. + default: true + scopes: + type: array + items: + type: string + description: List of OAuth2 scopes to request. + clusterControlPlaneUrl: + type: string + description: The OpenShift cluster control plane URL. + projectLabelFilter: + type: string + description: If specified, only projects with this label will be considered. The label selector should be in the format 'key' or 'key=value'. If only the key is provided, any project with that label (regardless of value) will be included. This enables server-side filtering for better performance. + roleSuffix: + type: string + description: Optional suffix to strip from ClusterRole names when normalizing role names. Used for multi-release deployments where ClusterRoles have namespace-specific names (e.g., flightctl-admin-). + required: + - providerType + AapProviderSpec: + type: object + description: AapProviderSpec describes an Ansible Automation Platform (AAP) provider configuration. + properties: + providerType: + type: string + enum: [aap] + description: The type of authentication provider. + displayName: + type: string + description: Human-readable display name for the provider. + apiUrl: + type: string + description: The internal AAP API URL. + authorizationUrl: + type: string + description: The OAuth2 authorization endpoint URL. + tokenUrl: + type: string + description: The OAuth2 token endpoint URL. + clientId: + type: string + description: The OAuth2 client ID. + clientSecret: + type: string + description: The OAuth2 client secret. + writeOnly: true + enabled: + type: boolean + description: Whether this AAP provider is enabled. + default: true + scopes: + type: array + items: + type: string + description: List of OAuth2 scopes to request. + required: + - providerType + - apiUrl + - authorizationUrl + - tokenUrl + - clientId + - clientSecret + - scopes + K8sProviderSpec: + type: object + description: K8sProviderSpec describes a Kubernetes/OpenShift provider configuration. + properties: + providerType: + type: string + enum: [k8s] + description: The type of authentication provider. + displayName: + type: string + description: Human-readable display name for the provider. + apiUrl: + type: string + description: The internal Kubernetes API URL. + rbacNs: + type: string + description: The RBAC namespace for permissions. + enabled: + type: boolean + description: Whether this K8s provider is enabled. + default: true + organizationAssignment: + $ref: '#/components/schemas/AuthOrganizationAssignment' + roleAssignment: + $ref: '#/components/schemas/AuthRoleAssignment' + roleSuffix: + type: string + description: Optional suffix to strip from ClusterRole names when normalizing role names. Used for multi-release deployments where ClusterRoles have namespace-specific names (e.g., flightctl-admin-). + required: + - providerType + - apiUrl + - organizationAssignment + - roleAssignment + AuthOrganizationAssignment: + type: object + description: AuthOrganizationAssignment defines how users from this auth provider are assigned to organizations. + oneOf: + - $ref: '#/components/schemas/AuthStaticOrganizationAssignment' + - $ref: '#/components/schemas/AuthDynamicOrganizationAssignment' + - $ref: '#/components/schemas/AuthPerUserOrganizationAssignment' + discriminator: + propertyName: type + mapping: + static: '#/components/schemas/AuthStaticOrganizationAssignment' + dynamic: '#/components/schemas/AuthDynamicOrganizationAssignment' + perUser: '#/components/schemas/AuthPerUserOrganizationAssignment' + AuthStaticOrganizationAssignment: + type: object + description: AuthStaticOrganizationAssignment assigns all users from this auth provider to a single static organization. + properties: + type: + type: string + enum: [static] + description: The type of organization assignment. + organizationName: + type: string + description: The name of the organization where all users will be assigned. + required: + - type + - organizationName + AuthDynamicOrganizationAssignment: + type: object + description: AuthDynamicOrganizationAssignment assigns users to organizations based on auth provider claims. + properties: + type: + type: string + enum: [dynamic] + description: The type of organization assignment. + claimPath: + type: array + items: + type: string + description: The JSON path to the claim that contains the organization identifier (e.g., ["groups", "0"] or ["custom", "org"]). + organizationNamePrefix: + type: string + description: The prefix for the organization name (e.g., "org-"). + default: "" + organizationNameSuffix: + type: string + description: The suffix for the organization name (e.g., "-org"). + default: "" + required: + - type + - claimPath + AuthPerUserOrganizationAssignment: + type: object + description: AuthPerUserOrganizationAssignment creates a separate organization for each user. + properties: + type: + type: string + enum: [perUser] + description: The type of organization assignment. + organizationNamePrefix: + type: string + description: The prefix for the user-specific organization name (e.g., "user-org-"). + default: "user-org-" + organizationNameSuffix: + type: string + description: The suffix for the user-specific organization name (e.g., "-org"). + default: "" + required: + - type + AuthRoleAssignment: + type: object + description: AuthRoleAssignment defines how roles are assigned to users from this auth provider. + oneOf: + - $ref: '#/components/schemas/AuthStaticRoleAssignment' + - $ref: '#/components/schemas/AuthDynamicRoleAssignment' + discriminator: + propertyName: type + mapping: + static: '#/components/schemas/AuthStaticRoleAssignment' + dynamic: '#/components/schemas/AuthDynamicRoleAssignment' + AuthStaticRoleAssignment: + type: object + description: AuthStaticRoleAssignment assigns a static set of roles to all users from this auth provider. + properties: + type: + type: string + enum: [static] + description: The type of role assignment. + roles: + type: array + items: + type: string + description: The list of role names to assign to all users. + required: + - type + - roles + AuthDynamicRoleAssignment: + type: object + description: AuthDynamicRoleAssignment extracts roles from auth provider claims using a JSON path. + properties: + type: + type: string + enum: [dynamic] + description: The type of role assignment. + claimPath: + type: array + items: + type: string + description: The JSON path to the role/group claim (e.g., ["groups"], ["roles"], ["realm_access", "roles"]). + separator: + type: string + description: Separator for org:role format (default ':'). Roles containing the separator are split into organization-scoped roles. Roles without separator are global and apply to all organizations. + default: ":" + required: + - type + - claimPath + AuthProviderList: + type: object + properties: + apiVersion: + type: string + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' + kind: + type: string + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' + metadata: + $ref: '#/components/schemas/ListMeta' + items: + type: array + description: 'List of auth providers.' + items: + $ref: '#/components/schemas/AuthProvider' + required: + - apiVersion + - kind + - metadata + - items + description: AuthProviderList is a list of auth providers. + PermissionList: + type: object + description: List of available permissions for a user. + properties: + permissions: + type: array + description: List of permissions available to the user. + items: + $ref: '#/components/schemas/Permission' + required: + - permissions + Permission: + type: object + description: A permission defining allowed operations on a resource. + properties: + resource: + type: string + description: The resource (e.g., "devices", "fleets", "*" for all resources). + operations: + type: array + description: List of allowed operations (e.g., "get", "list", "create", "update", "patch", "delete", "*" for all operations). + items: + type: string + required: + - resource + - operations \ No newline at end of file diff --git a/docs/AapProviderSpec.md b/docs/AapProviderSpec.md new file mode 100644 index 0000000..e1a462a --- /dev/null +++ b/docs/AapProviderSpec.md @@ -0,0 +1,38 @@ +# AapProviderSpec + +AapProviderSpec describes an Ansible Automation Platform (AAP) provider configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | The type of authentication provider. | +**display_name** | **str** | Human-readable display name for the provider. | [optional] +**api_url** | **str** | The internal AAP API URL. | +**authorization_url** | **str** | The OAuth2 authorization endpoint URL. | +**token_url** | **str** | The OAuth2 token endpoint URL. | +**client_id** | **str** | The OAuth2 client ID. | +**client_secret** | **str** | The OAuth2 client secret. | +**enabled** | **bool** | Whether this AAP provider is enabled. | [optional] [default to True] +**scopes** | **List[str]** | List of OAuth2 scopes to request. | + +## Example + +```python +from flightctl.models.aap_provider_spec import AapProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of AapProviderSpec from a JSON string +aap_provider_spec_instance = AapProviderSpec.from_json(json) +# print the JSON string representation of the object +print(AapProviderSpec.to_json()) + +# convert the object into a dict +aap_provider_spec_dict = aap_provider_spec_instance.to_dict() +# create an instance of AapProviderSpec from a dict +aap_provider_spec_from_dict = AapProviderSpec.from_dict(aap_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AppType.md b/docs/AppType.md index b23ba50..bb1eaa1 100644 --- a/docs/AppType.md +++ b/docs/AppType.md @@ -4,7 +4,11 @@ The type of the application. ## Enum -* `COMPOSE` (value: `'compose'`) +* `AppTypeCompose` (value: `'compose'`) + +* `AppTypeQuadlet` (value: `'quadlet'`) + +* `AppTypeContainer` (value: `'container'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApplicationProviderSpec.md b/docs/ApplicationProviderSpec.md index 7194316..ff01e40 100644 --- a/docs/ApplicationProviderSpec.md +++ b/docs/ApplicationProviderSpec.md @@ -7,9 +7,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters. | [optional] **name** | **str** | The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace. | [optional] -**app_type** | [**AppType**](AppType.md) | | [optional] +**app_type** | [**AppType**](AppType.md) | | **volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] -**image** | **str** | Reference to the container image for the application package. | +**image** | **str** | Reference to the OCI image or artifact for the application package. | +**ports** | **List[str]** | Port mappings. | [optional] +**resources** | [**ApplicationResources**](ApplicationResources.md) | | [optional] **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | ## Example diff --git a/docs/ApplicationResourceLimits.md b/docs/ApplicationResourceLimits.md new file mode 100644 index 0000000..92ca2c9 --- /dev/null +++ b/docs/ApplicationResourceLimits.md @@ -0,0 +1,31 @@ +# ApplicationResourceLimits + +Resource limits for the application. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cpu** | **str** | CPU limit in cores. Format restricted based on application type. | [optional] +**memory** | **str** | Memory limit with optional unit. Format restricted based on application type. | [optional] + +## Example + +```python +from flightctl.models.application_resource_limits import ApplicationResourceLimits + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationResourceLimits from a JSON string +application_resource_limits_instance = ApplicationResourceLimits.from_json(json) +# print the JSON string representation of the object +print(ApplicationResourceLimits.to_json()) + +# convert the object into a dict +application_resource_limits_dict = application_resource_limits_instance.to_dict() +# create an instance of ApplicationResourceLimits from a dict +application_resource_limits_from_dict = ApplicationResourceLimits.from_dict(application_resource_limits_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationResources.md b/docs/ApplicationResources.md new file mode 100644 index 0000000..97bf0af --- /dev/null +++ b/docs/ApplicationResources.md @@ -0,0 +1,30 @@ +# ApplicationResources + +Resource constraints for the application. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**limits** | [**ApplicationResourceLimits**](ApplicationResourceLimits.md) | | [optional] + +## Example + +```python +from flightctl.models.application_resources import ApplicationResources + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationResources from a JSON string +application_resources_instance = ApplicationResources.from_json(json) +# print the JSON string representation of the object +print(ApplicationResources.to_json()) + +# convert the object into a dict +application_resources_dict = application_resources_instance.to_dict() +# create an instance of ApplicationResources from a dict +application_resources_from_dict = ApplicationResources.from_dict(application_resources_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationStatusType.md b/docs/ApplicationStatusType.md index 6bf66d2..4bae259 100644 --- a/docs/ApplicationStatusType.md +++ b/docs/ApplicationStatusType.md @@ -4,17 +4,17 @@ Status of a single application on the device. ## Enum -* `PREPARING` (value: `'Preparing'`) +* `ApplicationStatusPreparing` (value: `'Preparing'`) -* `STARTING` (value: `'Starting'`) +* `ApplicationStatusStarting` (value: `'Starting'`) -* `RUNNING` (value: `'Running'`) +* `ApplicationStatusRunning` (value: `'Running'`) -* `ERROR` (value: `'Error'`) +* `ApplicationStatusError` (value: `'Error'`) -* `UNKNOWN` (value: `'Unknown'`) +* `ApplicationStatusUnknown` (value: `'Unknown'`) -* `COMPLETED` (value: `'Completed'`) +* `ApplicationStatusCompleted` (value: `'Completed'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApplicationVolume.md b/docs/ApplicationVolume.md index 0bf0c2b..8bfd827 100644 --- a/docs/ApplicationVolume.md +++ b/docs/ApplicationVolume.md @@ -6,7 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | Unique name of the volume used within the application. | +**reclaim_policy** | [**ApplicationVolumeReclaimPolicy**](ApplicationVolumeReclaimPolicy.md) | | [optional] [default to ApplicationVolumeReclaimPolicy.RETAIN] **image** | [**ImageVolumeSource**](ImageVolumeSource.md) | | +**mount** | [**VolumeMount**](VolumeMount.md) | | ## Example diff --git a/docs/ApplicationVolumeReclaimPolicy.md b/docs/ApplicationVolumeReclaimPolicy.md new file mode 100644 index 0000000..ab182f7 --- /dev/null +++ b/docs/ApplicationVolumeReclaimPolicy.md @@ -0,0 +1,11 @@ +# ApplicationVolumeReclaimPolicy + +Defines how the agent handles a volume when the owning application is removed. + +## Enum + +* `RETAIN` (value: `'Retain'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationsSummaryStatusType.md b/docs/ApplicationsSummaryStatusType.md index a419150..313d5da 100644 --- a/docs/ApplicationsSummaryStatusType.md +++ b/docs/ApplicationsSummaryStatusType.md @@ -4,13 +4,15 @@ Status of all applications on the device. ## Enum -* `HEALTHY` (value: `'Healthy'`) +* `ApplicationsSummaryStatusHealthy` (value: `'Healthy'`) -* `DEGRADED` (value: `'Degraded'`) +* `ApplicationsSummaryStatusDegraded` (value: `'Degraded'`) -* `ERROR` (value: `'Error'`) +* `ApplicationsSummaryStatusError` (value: `'Error'`) -* `UNKNOWN` (value: `'Unknown'`) +* `ApplicationsSummaryStatusUnknown` (value: `'Unknown'`) + +* `ApplicationsSummaryStatusNoApplications` (value: `'NoApplications'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AuthConfig.md b/docs/AuthConfig.md index 7c1fccb..d0b3a2d 100644 --- a/docs/AuthConfig.md +++ b/docs/AuthConfig.md @@ -1,14 +1,14 @@ # AuthConfig -Auth config. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**auth_type** | **str** | Auth type. | -**auth_url** | **str** | Auth URL. | -**auth_organizations_config** | [**AuthOrganizationsConfig**](AuthOrganizationsConfig.md) | | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**providers** | [**List[AuthProvider]**](AuthProvider.md) | List of all available authentication providers. | [optional] +**default_provider** | **str** | Name of the default authentication provider. | [optional] +**organizations_enabled** | **bool** | Whether organizations are enabled for authentication. | [optional] ## Example diff --git a/docs/AuthDynamicOrganizationAssignment.md b/docs/AuthDynamicOrganizationAssignment.md new file mode 100644 index 0000000..0ff9cbe --- /dev/null +++ b/docs/AuthDynamicOrganizationAssignment.md @@ -0,0 +1,33 @@ +# AuthDynamicOrganizationAssignment + +AuthDynamicOrganizationAssignment assigns users to organizations based on auth provider claims. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of organization assignment. | +**claim_path** | **List[str]** | The JSON path to the claim that contains the organization identifier (e.g., [\"groups\", \"0\"] or [\"custom\", \"org\"]). | +**organization_name_prefix** | **str** | The prefix for the organization name (e.g., \"org-\"). | [optional] [default to ''] +**organization_name_suffix** | **str** | The suffix for the organization name (e.g., \"-org\"). | [optional] [default to ''] + +## Example + +```python +from flightctl.models.auth_dynamic_organization_assignment import AuthDynamicOrganizationAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthDynamicOrganizationAssignment from a JSON string +auth_dynamic_organization_assignment_instance = AuthDynamicOrganizationAssignment.from_json(json) +# print the JSON string representation of the object +print(AuthDynamicOrganizationAssignment.to_json()) + +# convert the object into a dict +auth_dynamic_organization_assignment_dict = auth_dynamic_organization_assignment_instance.to_dict() +# create an instance of AuthDynamicOrganizationAssignment from a dict +auth_dynamic_organization_assignment_from_dict = AuthDynamicOrganizationAssignment.from_dict(auth_dynamic_organization_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthDynamicRoleAssignment.md b/docs/AuthDynamicRoleAssignment.md new file mode 100644 index 0000000..e09e289 --- /dev/null +++ b/docs/AuthDynamicRoleAssignment.md @@ -0,0 +1,32 @@ +# AuthDynamicRoleAssignment + +AuthDynamicRoleAssignment extracts roles from auth provider claims using a JSON path. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of role assignment. | +**claim_path** | **List[str]** | The JSON path to the role/group claim (e.g., [\"groups\"], [\"roles\"], [\"realm_access\", \"roles\"]). | +**separator** | **str** | Separator for org:role format (default ':'). Roles containing the separator are split into organization-scoped roles. Roles without separator are global and apply to all organizations. | [optional] [default to ':'] + +## Example + +```python +from flightctl.models.auth_dynamic_role_assignment import AuthDynamicRoleAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthDynamicRoleAssignment from a JSON string +auth_dynamic_role_assignment_instance = AuthDynamicRoleAssignment.from_json(json) +# print the JSON string representation of the object +print(AuthDynamicRoleAssignment.to_json()) + +# convert the object into a dict +auth_dynamic_role_assignment_dict = auth_dynamic_role_assignment_instance.to_dict() +# create an instance of AuthDynamicRoleAssignment from a dict +auth_dynamic_role_assignment_from_dict = AuthDynamicRoleAssignment.from_dict(auth_dynamic_role_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthOrganizationAssignment.md b/docs/AuthOrganizationAssignment.md new file mode 100644 index 0000000..c794fb1 --- /dev/null +++ b/docs/AuthOrganizationAssignment.md @@ -0,0 +1,34 @@ +# AuthOrganizationAssignment + +AuthOrganizationAssignment defines how users from this auth provider are assigned to organizations. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of organization assignment. | +**organization_name** | **str** | The name of the organization where all users will be assigned. | +**claim_path** | **List[str]** | The JSON path to the claim that contains the organization identifier (e.g., [\"groups\", \"0\"] or [\"custom\", \"org\"]). | +**organization_name_prefix** | **str** | The prefix for the user-specific organization name (e.g., \"user-org-\"). | [optional] [default to 'user-org-'] +**organization_name_suffix** | **str** | The suffix for the user-specific organization name (e.g., \"-org\"). | [optional] [default to ''] + +## Example + +```python +from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthOrganizationAssignment from a JSON string +auth_organization_assignment_instance = AuthOrganizationAssignment.from_json(json) +# print the JSON string representation of the object +print(AuthOrganizationAssignment.to_json()) + +# convert the object into a dict +auth_organization_assignment_dict = auth_organization_assignment_instance.to_dict() +# create an instance of AuthOrganizationAssignment from a dict +auth_organization_assignment_from_dict = AuthOrganizationAssignment.from_dict(auth_organization_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthPerUserOrganizationAssignment.md b/docs/AuthPerUserOrganizationAssignment.md new file mode 100644 index 0000000..9b630b4 --- /dev/null +++ b/docs/AuthPerUserOrganizationAssignment.md @@ -0,0 +1,32 @@ +# AuthPerUserOrganizationAssignment + +AuthPerUserOrganizationAssignment creates a separate organization for each user. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of organization assignment. | +**organization_name_prefix** | **str** | The prefix for the user-specific organization name (e.g., \"user-org-\"). | [optional] [default to 'user-org-'] +**organization_name_suffix** | **str** | The suffix for the user-specific organization name (e.g., \"-org\"). | [optional] [default to ''] + +## Example + +```python +from flightctl.models.auth_per_user_organization_assignment import AuthPerUserOrganizationAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthPerUserOrganizationAssignment from a JSON string +auth_per_user_organization_assignment_instance = AuthPerUserOrganizationAssignment.from_json(json) +# print the JSON string representation of the object +print(AuthPerUserOrganizationAssignment.to_json()) + +# convert the object into a dict +auth_per_user_organization_assignment_dict = auth_per_user_organization_assignment_instance.to_dict() +# create an instance of AuthPerUserOrganizationAssignment from a dict +auth_per_user_organization_assignment_from_dict = AuthPerUserOrganizationAssignment.from_dict(auth_per_user_organization_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthProvider.md b/docs/AuthProvider.md new file mode 100644 index 0000000..e8558fd --- /dev/null +++ b/docs/AuthProvider.md @@ -0,0 +1,33 @@ +# AuthProvider + +AuthProvider represents an authentication provider configuration supporting both OIDC and OAuth2. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | +**metadata** | [**ObjectMeta**](ObjectMeta.md) | | +**spec** | [**AuthProviderSpec**](AuthProviderSpec.md) | | + +## Example + +```python +from flightctl.models.auth_provider import AuthProvider + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProvider from a JSON string +auth_provider_instance = AuthProvider.from_json(json) +# print the JSON string representation of the object +print(AuthProvider.to_json()) + +# convert the object into a dict +auth_provider_dict = auth_provider_instance.to_dict() +# create an instance of AuthProvider from a dict +auth_provider_from_dict = AuthProvider.from_dict(auth_provider_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthProviderList.md b/docs/AuthProviderList.md new file mode 100644 index 0000000..c325096 --- /dev/null +++ b/docs/AuthProviderList.md @@ -0,0 +1,33 @@ +# AuthProviderList + +AuthProviderList is a list of auth providers. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | +**metadata** | [**ListMeta**](ListMeta.md) | | +**items** | [**List[AuthProvider]**](AuthProvider.md) | List of auth providers. | + +## Example + +```python +from flightctl.models.auth_provider_list import AuthProviderList + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProviderList from a JSON string +auth_provider_list_instance = AuthProviderList.from_json(json) +# print the JSON string representation of the object +print(AuthProviderList.to_json()) + +# convert the object into a dict +auth_provider_list_dict = auth_provider_list_instance.to_dict() +# create an instance of AuthProviderList from a dict +auth_provider_list_from_dict = AuthProviderList.from_dict(auth_provider_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthProviderSpec.md b/docs/AuthProviderSpec.md new file mode 100644 index 0000000..a82df82 --- /dev/null +++ b/docs/AuthProviderSpec.md @@ -0,0 +1,47 @@ +# AuthProviderSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | The type of authentication provider. | +**display_name** | **str** | Human-readable display name for the provider. | [optional] +**issuer** | **str** | The OAuth2 issuer identifier (used for issuer identification in tokens). | +**client_id** | **str** | The OAuth2 client ID. | +**client_secret** | **str** | The OAuth2 client secret. | +**enabled** | **bool** | Whether this K8s provider is enabled. | [optional] [default to True] +**scopes** | **List[str]** | List of OAuth2 scopes to request. | +**organization_assignment** | [**AuthOrganizationAssignment**](AuthOrganizationAssignment.md) | | +**username_claim** | **List[str]** | JSON path to the username claim in the userinfo response as an array of path segments (e.g., [\"preferred_username\"], [\"email\"], [\"sub\"]). | [optional] [default to [preferred_username]] +**role_assignment** | [**AuthRoleAssignment**](AuthRoleAssignment.md) | | +**authorization_url** | **str** | The OAuth2 authorization endpoint URL. | +**token_url** | **str** | The OAuth2 token endpoint URL. | +**userinfo_url** | **str** | The OAuth2 userinfo endpoint URL. | +**introspection** | [**OAuth2Introspection**](OAuth2Introspection.md) | | [optional] +**cluster_control_plane_url** | **str** | The OpenShift cluster control plane URL. | [optional] +**project_label_filter** | **str** | If specified, only projects with this label will be considered. The label selector should be in the format 'key' or 'key=value'. If only the key is provided, any project with that label (regardless of value) will be included. This enables server-side filtering for better performance. | [optional] +**role_suffix** | **str** | Optional suffix to strip from ClusterRole names when normalizing role names. Used for multi-release deployments where ClusterRoles have namespace-specific names (e.g., flightctl-admin-<namespace>). | [optional] +**api_url** | **str** | The internal Kubernetes API URL. | +**rbac_ns** | **str** | The RBAC namespace for permissions. | [optional] + +## Example + +```python +from flightctl.models.auth_provider_spec import AuthProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthProviderSpec from a JSON string +auth_provider_spec_instance = AuthProviderSpec.from_json(json) +# print the JSON string representation of the object +print(AuthProviderSpec.to_json()) + +# convert the object into a dict +auth_provider_spec_dict = auth_provider_spec_instance.to_dict() +# create an instance of AuthProviderSpec from a dict +auth_provider_spec_from_dict = AuthProviderSpec.from_dict(auth_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthRoleAssignment.md b/docs/AuthRoleAssignment.md new file mode 100644 index 0000000..98633d2 --- /dev/null +++ b/docs/AuthRoleAssignment.md @@ -0,0 +1,33 @@ +# AuthRoleAssignment + +AuthRoleAssignment defines how roles are assigned to users from this auth provider. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of role assignment. | +**roles** | **List[str]** | The list of role names to assign to all users. | +**claim_path** | **List[str]** | The JSON path to the role/group claim (e.g., [\"groups\"], [\"roles\"], [\"realm_access\", \"roles\"]). | +**separator** | **str** | Separator for org:role format (default ':'). Roles containing the separator are split into organization-scoped roles. Roles without separator are global and apply to all organizations. | [optional] [default to ':'] + +## Example + +```python +from flightctl.models.auth_role_assignment import AuthRoleAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthRoleAssignment from a JSON string +auth_role_assignment_instance = AuthRoleAssignment.from_json(json) +# print the JSON string representation of the object +print(AuthRoleAssignment.to_json()) + +# convert the object into a dict +auth_role_assignment_dict = auth_role_assignment_instance.to_dict() +# create an instance of AuthRoleAssignment from a dict +auth_role_assignment_from_dict = AuthRoleAssignment.from_dict(auth_role_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthStaticOrganizationAssignment.md b/docs/AuthStaticOrganizationAssignment.md new file mode 100644 index 0000000..7469795 --- /dev/null +++ b/docs/AuthStaticOrganizationAssignment.md @@ -0,0 +1,31 @@ +# AuthStaticOrganizationAssignment + +AuthStaticOrganizationAssignment assigns all users from this auth provider to a single static organization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of organization assignment. | +**organization_name** | **str** | The name of the organization where all users will be assigned. | + +## Example + +```python +from flightctl.models.auth_static_organization_assignment import AuthStaticOrganizationAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthStaticOrganizationAssignment from a JSON string +auth_static_organization_assignment_instance = AuthStaticOrganizationAssignment.from_json(json) +# print the JSON string representation of the object +print(AuthStaticOrganizationAssignment.to_json()) + +# convert the object into a dict +auth_static_organization_assignment_dict = auth_static_organization_assignment_instance.to_dict() +# create an instance of AuthStaticOrganizationAssignment from a dict +auth_static_organization_assignment_from_dict = AuthStaticOrganizationAssignment.from_dict(auth_static_organization_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthStaticRoleAssignment.md b/docs/AuthStaticRoleAssignment.md new file mode 100644 index 0000000..19da2e4 --- /dev/null +++ b/docs/AuthStaticRoleAssignment.md @@ -0,0 +1,31 @@ +# AuthStaticRoleAssignment + +AuthStaticRoleAssignment assigns a static set of roles to all users from this auth provider. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of role assignment. | +**roles** | **List[str]** | The list of role names to assign to all users. | + +## Example + +```python +from flightctl.models.auth_static_role_assignment import AuthStaticRoleAssignment + +# TODO update the JSON string below +json = "{}" +# create an instance of AuthStaticRoleAssignment from a JSON string +auth_static_role_assignment_instance = AuthStaticRoleAssignment.from_json(json) +# print the JSON string representation of the object +print(AuthStaticRoleAssignment.to_json()) + +# convert the object into a dict +auth_static_role_assignment_dict = auth_static_role_assignment_instance.to_dict() +# create an instance of AuthStaticRoleAssignment from a dict +auth_static_role_assignment_from_dict = AuthStaticRoleAssignment.from_dict(auth_static_role_assignment_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md index b1d2920..0041109 100644 --- a/docs/AuthenticationApi.md +++ b/docs/AuthenticationApi.md @@ -5,14 +5,15 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**auth_config**](AuthenticationApi.md#auth_config) | **GET** /api/v1/auth/config | +[**auth_get_permissions**](AuthenticationApi.md#auth_get_permissions) | **GET** /api/v1/auth/permissions | +[**auth_token**](AuthenticationApi.md#auth_token) | **POST** /api/v1/auth/{providername}/token | +[**auth_user_info**](AuthenticationApi.md#auth_user_info) | **GET** /api/v1/auth/userinfo | [**auth_validate**](AuthenticationApi.md#auth_validate) | **GET** /api/v1/auth/validate | # **auth_config** > AuthConfig auth_config() - - Get authentication configuration. ### Example @@ -69,13 +70,211 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **418** | Auth not configured | - | +**429** | Too Many Requests | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **auth_validate** -> Status auth_validate(authorization=authorization) +# **auth_get_permissions** +> PermissionList auth_get_permissions() + +Get the list of available permissions for the authenticated user. + +### Example + + +```python +import flightctl +from flightctl.models.permission_list import PermissionList +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthenticationApi(api_client) + + try: + api_response = api_instance.auth_get_permissions() + print("The response of AuthenticationApi->auth_get_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->auth_get_permissions: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**PermissionList**](PermissionList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | List of available permissions | - | +**401** | Unauthorized | - | +**418** | Auth not configured | - | +**429** | Too Many Requests | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_token** +> TokenResponse auth_token(providername, token_request) + +OAuth2 token exchange endpoint. Proxies token requests to the configured authentication provider (PAM issuer) for authorization code flow with PKCE support. + +### Example + + +```python +import flightctl +from flightctl.models.token_request import TokenRequest +from flightctl.models.token_response import TokenResponse +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthenticationApi(api_client) + providername = 'providername_example' # str | Name of the authentication provider to use. + token_request = flightctl.TokenRequest() # TokenRequest | + + try: + api_response = api_instance.auth_token(providername, token_request) + print("The response of AuthenticationApi->auth_token:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->auth_token: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **providername** | **str**| Name of the authentication provider to use. | + **token_request** | [**TokenRequest**](TokenRequest.md)| | + +### Return type + +[**TokenResponse**](TokenResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token response | - | +**400** | Bad Request | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_user_info** +> UserInfoResponse auth_user_info() + +OIDC UserInfo endpoint. Proxies the request to the configured authentication provider to retrieve user information. + +### Example +```python +import flightctl +from flightctl.models.user_info_response import UserInfoResponse +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthenticationApi(api_client) + + try: + api_response = api_instance.auth_user_info() + print("The response of AuthenticationApi->auth_user_info:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->auth_user_info: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**UserInfoResponse**](UserInfoResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | User information | - | +**401** | Unauthorized | - | +**418** | Auth not configured | - | +**429** | Too Many Requests | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_validate** +> Status auth_validate(authorization=authorization) Validate an authentication token. @@ -139,6 +338,7 @@ No authorization required **400** | Bad Request | - | **401** | Token invalid | - | **418** | Auth not configured | - | +**429** | Too Many Requests | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/AuthproviderApi.md b/docs/AuthproviderApi.md new file mode 100644 index 0000000..93c4b70 --- /dev/null +++ b/docs/AuthproviderApi.md @@ -0,0 +1,451 @@ +# flightctl.AuthproviderApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_auth_provider**](AuthproviderApi.md#create_auth_provider) | **POST** /api/v1/authproviders | +[**delete_auth_provider**](AuthproviderApi.md#delete_auth_provider) | **DELETE** /api/v1/authproviders/{name} | +[**get_auth_provider**](AuthproviderApi.md#get_auth_provider) | **GET** /api/v1/authproviders/{name} | +[**list_auth_providers**](AuthproviderApi.md#list_auth_providers) | **GET** /api/v1/authproviders | +[**patch_auth_provider**](AuthproviderApi.md#patch_auth_provider) | **PATCH** /api/v1/authproviders/{name} | +[**replace_auth_provider**](AuthproviderApi.md#replace_auth_provider) | **PUT** /api/v1/authproviders/{name} | + + +# **create_auth_provider** +> AuthProvider create_auth_provider(auth_provider) + +Create an AuthProvider resource. + +### Example + + +```python +import flightctl +from flightctl.models.auth_provider import AuthProvider +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthproviderApi(api_client) + auth_provider = flightctl.AuthProvider() # AuthProvider | + + try: + api_response = api_instance.create_auth_provider(auth_provider) + print("The response of AuthproviderApi->create_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthproviderApi->create_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **auth_provider** | [**AuthProvider**](AuthProvider.md)| | + +### Return type + +[**AuthProvider**](AuthProvider.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**409** | Conflict | - | +**429** | Too Many Requests | - | +**503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_auth_provider** +> Status delete_auth_provider(name) + +Delete an AuthProvider resource. + +### Example + + +```python +import flightctl +from flightctl.models.status import Status +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthproviderApi(api_client) + name = 'name_example' # str | The name of the AuthProvider resource to delete. + + try: + api_response = api_instance.delete_auth_provider(name) + print("The response of AuthproviderApi->delete_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthproviderApi->delete_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the AuthProvider resource to delete. | + +### Return type + +[**Status**](Status.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**429** | Too Many Requests | - | +**503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_auth_provider** +> AuthProvider get_auth_provider(name) + +Get an AuthProvider resource. + +### Example + + +```python +import flightctl +from flightctl.models.auth_provider import AuthProvider +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthproviderApi(api_client) + name = 'name_example' # str | The name of the AuthProvider resource to get. + + try: + api_response = api_instance.get_auth_provider(name) + print("The response of AuthproviderApi->get_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthproviderApi->get_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the AuthProvider resource to get. | + +### Return type + +[**AuthProvider**](AuthProvider.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**429** | Too Many Requests | - | +**503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_auth_providers** +> AuthProviderList list_auth_providers(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + +List AuthProvider resources. + +### Example + + +```python +import flightctl +from flightctl.models.auth_provider_list import AuthProviderList +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthproviderApi(api_client) + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + + try: + api_response = api_instance.list_auth_providers(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of AuthproviderApi->list_auth_providers:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthproviderApi->list_auth_providers: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + +### Return type + +[**AuthProviderList**](AuthProviderList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**429** | Too Many Requests | - | +**503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **patch_auth_provider** +> AuthProvider patch_auth_provider(name, patch_request_inner) + +Patch an AuthProvider resource. + +### Example + + +```python +import flightctl +from flightctl.models.auth_provider import AuthProvider +from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthproviderApi(api_client) + name = 'name_example' # str | The name of the AuthProvider resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + + try: + api_response = api_instance.patch_auth_provider(name, patch_request_inner) + print("The response of AuthproviderApi->patch_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthproviderApi->patch_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the AuthProvider resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + +### Return type + +[**AuthProvider**](AuthProvider.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json-patch+json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**429** | Too Many Requests | - | +**503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **replace_auth_provider** +> AuthProvider replace_auth_provider(name, auth_provider) + +Update an AuthProvider resource. + +### Example + + +```python +import flightctl +from flightctl.models.auth_provider import AuthProvider +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthproviderApi(api_client) + name = 'name_example' # str | The name of the AuthProvider resource to update. + auth_provider = flightctl.AuthProvider() # AuthProvider | + + try: + api_response = api_instance.replace_auth_provider(name, auth_provider) + print("The response of AuthproviderApi->replace_auth_provider:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthproviderApi->replace_auth_provider: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the AuthProvider resource to update. | + **auth_provider** | [**AuthProvider**](AuthProvider.md)| | + +### Return type + +[**AuthProvider**](AuthProvider.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**201** | Created | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**409** | Conflict | - | +**429** | Too Many Requests | - | +**503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CertificatesigningrequestApi.md b/docs/CertificatesigningrequestApi.md index 78fd36d..9162ae0 100644 --- a/docs/CertificatesigningrequestApi.md +++ b/docs/CertificatesigningrequestApi.md @@ -16,8 +16,6 @@ Method | HTTP request | Description # **create_certificate_signing_request** > CertificateSigningRequest create_certificate_signing_request(certificate_signing_request) - - Create a CertificateSigningRequest resource. ### Example @@ -89,8 +87,6 @@ No authorization required # **delete_certificate_signing_request** > Status delete_certificate_signing_request(name) - - delete a Certificate Signing Request ### Example @@ -161,8 +157,6 @@ No authorization required # **get_certificate_signing_request** > CertificateSigningRequest get_certificate_signing_request(name) - - read the specified certificateSigningRequest ### Example @@ -233,8 +227,6 @@ No authorization required # **list_certificate_signing_requests** > CertificateSigningRequestList list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - - List CertificateSigningRequest resources. ### Example @@ -311,8 +303,6 @@ No authorization required # **patch_certificate_signing_request** > CertificateSigningRequest patch_certificate_signing_request(name, patch_request_inner) - - Patch a CertificateSigningRequest resource. ### Example @@ -388,8 +378,6 @@ No authorization required # **replace_certificate_signing_request** > CertificateSigningRequest replace_certificate_signing_request(name, certificate_signing_request) - - replace the specified CertificateSigningRequest ### Example @@ -465,8 +453,6 @@ No authorization required # **update_certificate_signing_request_approval** > CertificateSigningRequest update_certificate_signing_request_approval(name, certificate_signing_request) - - Approve or deny a CertificateSigningRequest. ### Example diff --git a/docs/ConditionStatus.md b/docs/ConditionStatus.md index 118c906..2141bfb 100644 --- a/docs/ConditionStatus.md +++ b/docs/ConditionStatus.md @@ -4,11 +4,11 @@ Status of the condition, one of True, False, Unknown. ## Enum -* `TRUE` (value: `'True'`) +* `ConditionStatusTrue` (value: `'True'`) -* `FALSE` (value: `'False'`) +* `ConditionStatusFalse` (value: `'False'`) -* `UNKNOWN` (value: `'Unknown'`) +* `ConditionStatusUnknown` (value: `'Unknown'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConditionType.md b/docs/ConditionType.md index a310f66..c8b86ef 100644 --- a/docs/ConditionType.md +++ b/docs/ConditionType.md @@ -4,37 +4,37 @@ Type of condition in CamelCase. ## Enum -* `APPROVED` (value: `'Approved'`) +* `EnrollmentRequestApproved` (value: `'Approved'`) -* `TPMVERIFIED` (value: `'TPMVerified'`) +* `EnrollmentRequestTPMVerified` (value: `'TPMVerified'`) -* `APPROVED` (value: `'Approved'`) +* `CertificateSigningRequestApproved` (value: `'Approved'`) -* `DENIED` (value: `'Denied'`) +* `CertificateSigningRequestDenied` (value: `'Denied'`) -* `FAILED` (value: `'Failed'`) +* `CertificateSigningRequestFailed` (value: `'Failed'`) -* `TPMVERIFIED` (value: `'TPMVerified'`) +* `CertificateSigningRequestTPMVerified` (value: `'TPMVerified'`) -* `ACCESSIBLE` (value: `'Accessible'`) +* `RepositoryAccessible` (value: `'Accessible'`) -* `ACCESSIBLE` (value: `'Accessible'`) +* `ResourceSyncAccessible` (value: `'Accessible'`) -* `RESOURCEPARSED` (value: `'ResourceParsed'`) +* `ResourceSyncResourceParsed` (value: `'ResourceParsed'`) -* `SYNCED` (value: `'Synced'`) +* `ResourceSyncSynced` (value: `'Synced'`) -* `VALID` (value: `'Valid'`) +* `FleetValid` (value: `'Valid'`) -* `ROLLOUTINPROGRESS` (value: `'RolloutInProgress'`) +* `FleetRolloutInProgress` (value: `'RolloutInProgress'`) -* `UPDATING` (value: `'Updating'`) +* `DeviceUpdating` (value: `'Updating'`) -* `SPECVALID` (value: `'SpecValid'`) +* `DeviceSpecValid` (value: `'SpecValid'`) -* `MULTIPLEOWNERS` (value: `'MultipleOwners'`) +* `DeviceMultipleOwners` (value: `'MultipleOwners'`) -* `DEVICEDECOMMISSIONING` (value: `'DeviceDecommissioning'`) +* `DeviceDecommissioning` (value: `'DeviceDecommissioning'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceApi.md b/docs/DeviceApi.md index 44eb42d..625d3ce 100644 --- a/docs/DeviceApi.md +++ b/docs/DeviceApi.md @@ -21,8 +21,6 @@ Method | HTTP request | Description # **create_device** > Device create_device(device) - - Create a Device resource. ### Example @@ -94,8 +92,6 @@ No authorization required # **decommission_device** > Device decommission_device(name, device_decommission) - - schedule the device to decommission ### Example @@ -170,8 +166,6 @@ No authorization required # **delete_device** > Status delete_device(name) - - Delete a Device resource. ### Example @@ -242,8 +236,6 @@ No authorization required # **get_device** > Device get_device(name) - - Get a Device resource. ### Example @@ -314,8 +306,6 @@ No authorization required # **get_device_last_seen** > DeviceLastSeen get_device_last_seen(name) - - Get the last seen timestamp of the Device resource. ### Example @@ -387,8 +377,6 @@ No authorization required # **get_device_status** > Device get_device_status(name) - - Get the status of a Device resource. ### Example @@ -459,8 +447,6 @@ No authorization required # **get_rendered_device** > Device get_rendered_device(name, known_rendered_version=known_rendered_version) - - Get the rendered device. ### Example @@ -535,8 +521,6 @@ No authorization required # **list_devices** > DeviceList list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, summary_only=summary_only) - - List Device resources. ### Example @@ -615,8 +599,6 @@ No authorization required # **patch_device** > Device patch_device(name, patch_request_inner) - - Patch a Device resource. ### Example @@ -692,8 +674,6 @@ No authorization required # **patch_device_status** > Device patch_device_status(name, patch_request_inner) - - Patch the status of a Device resource. ### Example @@ -768,8 +748,6 @@ No authorization required # **replace_device** > Device replace_device(name, device) - - Update a Device resource. ### Example @@ -845,8 +823,6 @@ No authorization required # **replace_device_status** > Device replace_device_status(name, device) - - Update the status of a Device resource. ### Example diff --git a/docs/DeviceApplicationStatus.md b/docs/DeviceApplicationStatus.md index 78ed625..cea42cb 100644 --- a/docs/DeviceApplicationStatus.md +++ b/docs/DeviceApplicationStatus.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **ready** | **str** | The number of containers which are ready in the application. | **restarts** | **int** | Number of restarts observed for the application. | **status** | [**ApplicationStatusType**](ApplicationStatusType.md) | | +**embedded** | **bool** | Whether the application is embedded in the bootc image. | +**app_type** | [**AppType**](AppType.md) | | **volumes** | [**List[ApplicationVolumeStatus]**](ApplicationVolumeStatus.md) | Status of volumes used by this application. | [optional] ## Example diff --git a/docs/DeviceDecommissionTargetType.md b/docs/DeviceDecommissionTargetType.md index dba308d..4c4567b 100644 --- a/docs/DeviceDecommissionTargetType.md +++ b/docs/DeviceDecommissionTargetType.md @@ -4,9 +4,9 @@ Specifies the desired decommissioning method of the device. ## Enum -* `UNENROLL` (value: `'Unenroll'`) +* `DeviceDecommissionTargetTypeUnenroll` (value: `'Unenroll'`) -* `FACTORYRESET` (value: `'FactoryReset'`) +* `DeviceDecommissionTargetTypeFactoryReset` (value: `'FactoryReset'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceIntegrityCheckStatusType.md b/docs/DeviceIntegrityCheckStatusType.md index fd2b31d..67d714a 100644 --- a/docs/DeviceIntegrityCheckStatusType.md +++ b/docs/DeviceIntegrityCheckStatusType.md @@ -4,13 +4,13 @@ Status of the integrity check performed on the device. ## Enum -* `UNKNOWN` (value: `'Unknown'`) +* `DeviceIntegrityCheckStatusUnknown` (value: `'Unknown'`) -* `UNSUPPORTED` (value: `'Unsupported'`) +* `DeviceIntegrityCheckStatusUnsupported` (value: `'Unsupported'`) -* `FAILED` (value: `'Failed'`) +* `DeviceIntegrityCheckStatusFailed` (value: `'Failed'`) -* `VERIFIED` (value: `'Verified'`) +* `DeviceIntegrityCheckStatusVerified` (value: `'Verified'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceIntegrityStatusSummaryType.md b/docs/DeviceIntegrityStatusSummaryType.md index 3750118..0cb24ea 100644 --- a/docs/DeviceIntegrityStatusSummaryType.md +++ b/docs/DeviceIntegrityStatusSummaryType.md @@ -4,13 +4,13 @@ Status of the integrity of the device. ## Enum -* `VERIFIED` (value: `'Verified'`) +* `DeviceIntegrityStatusVerified` (value: `'Verified'`) -* `FAILED` (value: `'Failed'`) +* `DeviceIntegrityStatusFailed` (value: `'Failed'`) -* `UNKNOWN` (value: `'Unknown'`) +* `DeviceIntegrityStatusUnknown` (value: `'Unknown'`) -* `UNSUPPORTED` (value: `'Unsupported'`) +* `DeviceIntegrityStatusUnsupported` (value: `'Unsupported'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceLifecycleHookType.md b/docs/DeviceLifecycleHookType.md index f3e0c01..68a2cd6 100644 --- a/docs/DeviceLifecycleHookType.md +++ b/docs/DeviceLifecycleHookType.md @@ -3,13 +3,13 @@ ## Enum -* `BEFOREUPDATING` (value: `'BeforeUpdating'`) +* `DeviceLifecycleHookBeforeUpdating` (value: `'BeforeUpdating'`) -* `AFTERUPDATING` (value: `'AfterUpdating'`) +* `DeviceLifecycleHookAfterUpdating` (value: `'AfterUpdating'`) -* `BEFOREREBOOTING` (value: `'BeforeRebooting'`) +* `DeviceLifecycleHookBeforeRebooting` (value: `'BeforeRebooting'`) -* `AFTERREBOOTING` (value: `'AfterRebooting'`) +* `DeviceLifecycleHookAfterRebooting` (value: `'AfterRebooting'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceLifecycleStatusType.md b/docs/DeviceLifecycleStatusType.md index 707cef0..4b04b4b 100644 --- a/docs/DeviceLifecycleStatusType.md +++ b/docs/DeviceLifecycleStatusType.md @@ -4,13 +4,13 @@ Status type of the device lifecycle. ## Enum -* `UNKNOWN` (value: `'Unknown'`) +* `DeviceLifecycleStatusUnknown` (value: `'Unknown'`) -* `ENROLLED` (value: `'Enrolled'`) +* `DeviceLifecycleStatusEnrolled` (value: `'Enrolled'`) -* `DECOMMISSIONING` (value: `'Decommissioning'`) +* `DeviceLifecycleStatusDecommissioning` (value: `'Decommissioning'`) -* `DECOMMISSIONED` (value: `'Decommissioned'`) +* `DeviceLifecycleStatusDecommissioned` (value: `'Decommissioned'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceResourceStatusType.md b/docs/DeviceResourceStatusType.md index 213859d..a364914 100644 --- a/docs/DeviceResourceStatusType.md +++ b/docs/DeviceResourceStatusType.md @@ -4,15 +4,15 @@ The types of resource statuses. ## Enum -* `HEALTHY` (value: `'Healthy'`) +* `DeviceResourceStatusHealthy` (value: `'Healthy'`) -* `WARNING` (value: `'Warning'`) +* `DeviceResourceStatusWarning` (value: `'Warning'`) -* `CRITICAL` (value: `'Critical'`) +* `DeviceResourceStatusCritical` (value: `'Critical'`) -* `ERROR` (value: `'Error'`) +* `DeviceResourceStatusError` (value: `'Error'`) -* `UNKNOWN` (value: `'Unknown'`) +* `DeviceResourceStatusUnknown` (value: `'Unknown'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceStatus.md b/docs/DeviceStatus.md index feb0baf..1302d12 100644 --- a/docs/DeviceStatus.md +++ b/docs/DeviceStatus.md @@ -8,7 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **conditions** | [**List[Condition]**](Condition.md) | Conditions represent the observations of a the current state of a device. | **system_info** | [**DeviceSystemInfo**](DeviceSystemInfo.md) | | -**applications** | [**List[DeviceApplicationStatus]**](DeviceApplicationStatus.md) | List of device application status. | +**systemd** | [**List[SystemdUnitStatus]**](SystemdUnitStatus.md) | List of systemd unit statuses. | [optional] +**applications** | [**List[DeviceApplicationStatus]**](DeviceApplicationStatus.md) | List of device application statuses. | **applications_summary** | [**DeviceApplicationsSummaryStatus**](DeviceApplicationsSummaryStatus.md) | | **resources** | [**DeviceResourceStatus**](DeviceResourceStatus.md) | | **integrity** | [**DeviceIntegrityStatus**](DeviceIntegrityStatus.md) | | diff --git a/docs/DeviceSummaryStatusType.md b/docs/DeviceSummaryStatusType.md index 499e1d2..35aa770 100644 --- a/docs/DeviceSummaryStatusType.md +++ b/docs/DeviceSummaryStatusType.md @@ -4,21 +4,21 @@ Status of the device. ## Enum -* `ONLINE` (value: `'Online'`) +* `DeviceSummaryStatusOnline` (value: `'Online'`) -* `DEGRADED` (value: `'Degraded'`) +* `DeviceSummaryStatusDegraded` (value: `'Degraded'`) -* `ERROR` (value: `'Error'`) +* `DeviceSummaryStatusError` (value: `'Error'`) -* `REBOOTING` (value: `'Rebooting'`) +* `DeviceSummaryStatusRebooting` (value: `'Rebooting'`) -* `POWEREDOFF` (value: `'PoweredOff'`) +* `DeviceSummaryStatusPoweredOff` (value: `'PoweredOff'`) -* `UNKNOWN` (value: `'Unknown'`) +* `DeviceSummaryStatusUnknown` (value: `'Unknown'`) -* `AWAITINGRECONNECT` (value: `'AwaitingReconnect'`) +* `DeviceSummaryStatusAwaitingReconnect` (value: `'AwaitingReconnect'`) -* `CONFLICTPAUSED` (value: `'ConflictPaused'`) +* `DeviceSummaryStatusConflictPaused` (value: `'ConflictPaused'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceUpdatedStatusType.md b/docs/DeviceUpdatedStatusType.md index ea50570..0ffa50a 100644 --- a/docs/DeviceUpdatedStatusType.md +++ b/docs/DeviceUpdatedStatusType.md @@ -4,13 +4,13 @@ Status type of the device update. ## Enum -* `UPTODATE` (value: `'UpToDate'`) +* `DeviceUpdatedStatusUpToDate` (value: `'UpToDate'`) -* `OUTOFDATE` (value: `'OutOfDate'`) +* `DeviceUpdatedStatusOutOfDate` (value: `'OutOfDate'`) -* `UPDATING` (value: `'Updating'`) +* `DeviceUpdatedStatusUpdating` (value: `'Updating'`) -* `UNKNOWN` (value: `'Unknown'`) +* `DeviceUpdatedStatusUnknown` (value: `'Unknown'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeviceactionsApi.md b/docs/DeviceactionsApi.md index 427380c..c14fa39 100644 --- a/docs/DeviceactionsApi.md +++ b/docs/DeviceactionsApi.md @@ -10,8 +10,6 @@ Method | HTTP request | Description # **resume_devices** > DeviceResumeResponse resume_devices(device_resume_request) - - Resume devices based on label selector and/or field selector. ### Example diff --git a/docs/EncodingType.md b/docs/EncodingType.md index 2bc207f..1eb280e 100644 --- a/docs/EncodingType.md +++ b/docs/EncodingType.md @@ -4,9 +4,9 @@ Specifies the encoding type used for data representation. ## Enum -* `PLAIN` (value: `'plain'`) +* `EncodingPlain` (value: `'plain'`) -* `BASE64` (value: `'base64'`) +* `EncodingBase64` (value: `'base64'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EnrollmentRequestSpec.md b/docs/EnrollmentRequestSpec.md index eb3611d..38d80f5 100644 --- a/docs/EnrollmentRequestSpec.md +++ b/docs/EnrollmentRequestSpec.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **csr** | **str** | The PEM-encoded PKCS#10 certificate signing request. | **device_status** | [**DeviceStatus**](DeviceStatus.md) | | [optional] **labels** | **Dict[str, str]** | A set of labels that the service will apply to this device when its enrollment is approved. | [optional] +**known_rendered_version** | **str** | The rendered version of the device from desired.json (optional). | [optional] ## Example diff --git a/docs/EnrollmentrequestApi.md b/docs/EnrollmentrequestApi.md index 4365494..d11913e 100644 --- a/docs/EnrollmentrequestApi.md +++ b/docs/EnrollmentrequestApi.md @@ -20,8 +20,6 @@ Method | HTTP request | Description # **approve_enrollment_request** > EnrollmentRequestApprovalStatus approve_enrollment_request(name, enrollment_request_approval) - - Approve or deny an EnrollmentRequest. ### Example @@ -96,8 +94,6 @@ No authorization required # **create_enrollment_request** > EnrollmentRequest create_enrollment_request(enrollment_request) - - Create an EnrollmentRequest resource. ### Example @@ -169,8 +165,6 @@ No authorization required # **delete_enrollment_request** > Status delete_enrollment_request(name) - - Delete an EnrollmentRequest resource. ### Example @@ -242,8 +236,6 @@ No authorization required # **get_enrollment_config** > EnrollmentConfig get_enrollment_config(csr=csr) - - Get enrollment information. ### Example @@ -315,8 +307,6 @@ No authorization required # **get_enrollment_request** > EnrollmentRequest get_enrollment_request(name) - - Get an EnrollmentRequest resource. ### Example @@ -387,8 +377,6 @@ No authorization required # **get_enrollment_request_status** > EnrollmentRequest get_enrollment_request_status(name) - - Get the status of an EnrollmentRequest resource. ### Example @@ -459,8 +447,6 @@ No authorization required # **list_enrollment_requests** > EnrollmentRequestList list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - - List EnrollmentRequest resources. ### Example @@ -537,8 +523,6 @@ No authorization required # **patch_enrollment_request** > EnrollmentRequest patch_enrollment_request(name, patch_request_inner) - - Patch an EnrollmentRequest resource. ### Example @@ -614,8 +598,6 @@ No authorization required # **patch_enrollment_request_status** > EnrollmentRequest patch_enrollment_request_status(name, patch_request_inner) - - Patch the status of an EnrollmentRequest resource. ### Example @@ -691,8 +673,6 @@ No authorization required # **replace_enrollment_request** > EnrollmentRequest replace_enrollment_request(name, enrollment_request) - - Update an EnrollmentRequest resource. ### Example @@ -768,8 +748,6 @@ No authorization required # **replace_enrollment_request_status** > EnrollmentRequest replace_enrollment_request_status(name, enrollment_request) - - Update the status of an EnrollmentRequest resource. ### Example diff --git a/docs/EventApi.md b/docs/EventApi.md index 2fb945e..dabead2 100644 --- a/docs/EventApi.md +++ b/docs/EventApi.md @@ -10,10 +10,9 @@ Method | HTTP request | Description # **list_events** > EventList list_events(field_selector=field_selector, order=order, limit=limit, var_continue=var_continue) +Retrieves a list of events. -Retrieves a list of events. - ### Example diff --git a/docs/FileOperation.md b/docs/FileOperation.md index 22b04ce..0dfe80f 100644 --- a/docs/FileOperation.md +++ b/docs/FileOperation.md @@ -3,11 +3,11 @@ ## Enum -* `CREATED` (value: `'created'`) +* `FileOperationCreated` (value: `'created'`) -* `REMOVED` (value: `'removed'`) +* `FileOperationRemoved` (value: `'removed'`) -* `UPDATED` (value: `'updated'`) +* `FileOperationUpdated` (value: `'updated'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FleetApi.md b/docs/FleetApi.md index 68f3401..b6c0164 100644 --- a/docs/FleetApi.md +++ b/docs/FleetApi.md @@ -21,8 +21,6 @@ Method | HTTP request | Description # **create_fleet** > Fleet create_fleet(fleet) - - Create a Fleet resource. ### Example @@ -94,8 +92,6 @@ No authorization required # **delete_fleet** > Status delete_fleet(name) - - Delete a Fleet resource. ### Example @@ -166,8 +162,6 @@ No authorization required # **delete_template_version** > Status delete_template_version(fleet, name) - - delete a template version ### Example @@ -240,8 +234,6 @@ No authorization required # **get_fleet** > Fleet get_fleet(name, add_devices_summary=add_devices_summary) - - Get a Fleet resource. ### Example @@ -314,8 +306,6 @@ No authorization required # **get_fleet_status** > Fleet get_fleet_status(name) - - read status of the specified Fleet ### Example @@ -386,8 +376,6 @@ No authorization required # **get_template_version** > TemplateVersion get_template_version(fleet, name) - - read the specified template version ### Example @@ -460,8 +448,6 @@ No authorization required # **list_fleets** > FleetList list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, add_devices_summary=add_devices_summary) - - List Fleet resources. ### Example @@ -540,8 +526,6 @@ No authorization required # **list_template_versions** > TemplateVersionList list_template_versions(fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - - list template versions ### Example @@ -620,8 +604,6 @@ No authorization required # **patch_fleet** > Fleet patch_fleet(name, patch_request_inner) - - Patch a Fleet resource. ### Example @@ -697,8 +679,6 @@ No authorization required # **patch_fleet_status** > Fleet patch_fleet_status(name, patch_request_inner) - - Patch the status of a Fleet resource. ### Example @@ -773,8 +753,6 @@ No authorization required # **replace_fleet** > Fleet replace_fleet(name, fleet) - - Update a Fleet resource. ### Example @@ -850,8 +828,6 @@ No authorization required # **replace_fleet_status** > Fleet replace_fleet_status(name, fleet) - - replace status of the specified Fleet ### Example diff --git a/docs/GitHubIntrospectionSpec.md b/docs/GitHubIntrospectionSpec.md new file mode 100644 index 0000000..890abd2 --- /dev/null +++ b/docs/GitHubIntrospectionSpec.md @@ -0,0 +1,31 @@ +# GitHubIntrospectionSpec + +GitHubIntrospectionSpec defines token introspection using GitHub API (POST /applications/{client_id}/token). Uses the OAuth2ProviderSpec clientId and clientSecret for Basic Auth and URL path. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The introspection type. | +**url** | **str** | The GitHub API base URL. Defaults to https://api.github.com for GitHub.com, but can be customized for GitHub Enterprise Server. | [optional] [default to 'https://api.github.com'] + +## Example + +```python +from flightctl.models.git_hub_introspection_spec import GitHubIntrospectionSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of GitHubIntrospectionSpec from a JSON string +git_hub_introspection_spec_instance = GitHubIntrospectionSpec.from_json(json) +# print the JSON string representation of the object +print(GitHubIntrospectionSpec.to_json()) + +# convert the object into a dict +git_hub_introspection_spec_dict = git_hub_introspection_spec_instance.to_dict() +# create an instance of GitHubIntrospectionSpec from a dict +git_hub_introspection_spec_from_dict = GitHubIntrospectionSpec.from_dict(git_hub_introspection_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageApplicationProviderSpec.md b/docs/ImageApplicationProviderSpec.md index d5539f7..834f38a 100644 --- a/docs/ImageApplicationProviderSpec.md +++ b/docs/ImageApplicationProviderSpec.md @@ -6,7 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] -**image** | **str** | Reference to the container image for the application package. | +**image** | **str** | Reference to the OCI image or artifact for the application package. | +**ports** | **List[str]** | Port mappings. | [optional] +**resources** | [**ApplicationResources**](ApplicationResources.md) | | [optional] ## Example diff --git a/docs/ImageMountVolumeProviderSpec.md b/docs/ImageMountVolumeProviderSpec.md new file mode 100644 index 0000000..98625be --- /dev/null +++ b/docs/ImageMountVolumeProviderSpec.md @@ -0,0 +1,31 @@ +# ImageMountVolumeProviderSpec + +Volume from OCI image mounted at specified path. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | [**ImageVolumeSource**](ImageVolumeSource.md) | | +**mount** | [**VolumeMount**](VolumeMount.md) | | + +## Example + +```python +from flightctl.models.image_mount_volume_provider_spec import ImageMountVolumeProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageMountVolumeProviderSpec from a JSON string +image_mount_volume_provider_spec_instance = ImageMountVolumeProviderSpec.from_json(json) +# print the JSON string representation of the object +print(ImageMountVolumeProviderSpec.to_json()) + +# convert the object into a dict +image_mount_volume_provider_spec_dict = image_mount_volume_provider_spec_instance.to_dict() +# create an instance of ImageMountVolumeProviderSpec from a dict +image_mount_volume_provider_spec_from_dict = ImageMountVolumeProviderSpec.from_dict(image_mount_volume_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImagePullPolicy.md b/docs/ImagePullPolicy.md index f59f3fe..c0d415c 100644 --- a/docs/ImagePullPolicy.md +++ b/docs/ImagePullPolicy.md @@ -4,11 +4,11 @@ Optional. Defaults to 'IfNotPresent'. When set to 'Always', the image is pulled ## Enum -* `ALWAYS` (value: `'Always'`) +* `PullAlways` (value: `'Always'`) -* `IFNOTPRESENT` (value: `'IfNotPresent'`) +* `PullIfNotPresent` (value: `'IfNotPresent'`) -* `NEVER` (value: `'Never'`) +* `PullNever` (value: `'Never'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/JwtIntrospectionSpec.md b/docs/JwtIntrospectionSpec.md new file mode 100644 index 0000000..2228468 --- /dev/null +++ b/docs/JwtIntrospectionSpec.md @@ -0,0 +1,33 @@ +# JwtIntrospectionSpec + +JwtIntrospectionSpec defines token introspection using JWT validation with JWKS. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The introspection type. | +**jwks_url** | **str** | The JWKS (JSON Web Key Set) endpoint URL for fetching public keys to validate JWT signatures. | +**issuer** | **str** | Expected issuer claim value in the JWT. If not specified, uses the OAuth2ProviderSpec issuer. | [optional] +**audience** | **List[str]** | Expected audience claim values in the JWT. If not specified, uses the OAuth2ProviderSpec clientId. | [optional] + +## Example + +```python +from flightctl.models.jwt_introspection_spec import JwtIntrospectionSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of JwtIntrospectionSpec from a JSON string +jwt_introspection_spec_instance = JwtIntrospectionSpec.from_json(json) +# print the JSON string representation of the object +print(JwtIntrospectionSpec.to_json()) + +# convert the object into a dict +jwt_introspection_spec_dict = jwt_introspection_spec_instance.to_dict() +# create an instance of JwtIntrospectionSpec from a dict +jwt_introspection_spec_from_dict = JwtIntrospectionSpec.from_dict(jwt_introspection_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/K8sProviderSpec.md b/docs/K8sProviderSpec.md new file mode 100644 index 0000000..2683d3f --- /dev/null +++ b/docs/K8sProviderSpec.md @@ -0,0 +1,37 @@ +# K8sProviderSpec + +K8sProviderSpec describes a Kubernetes/OpenShift provider configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | The type of authentication provider. | +**display_name** | **str** | Human-readable display name for the provider. | [optional] +**api_url** | **str** | The internal Kubernetes API URL. | +**rbac_ns** | **str** | The RBAC namespace for permissions. | [optional] +**enabled** | **bool** | Whether this K8s provider is enabled. | [optional] [default to True] +**organization_assignment** | [**AuthOrganizationAssignment**](AuthOrganizationAssignment.md) | | +**role_assignment** | [**AuthRoleAssignment**](AuthRoleAssignment.md) | | +**role_suffix** | **str** | Optional suffix to strip from ClusterRole names when normalizing role names. Used for multi-release deployments where ClusterRoles have namespace-specific names (e.g., flightctl-admin-<namespace>). | [optional] + +## Example + +```python +from flightctl.models.k8s_provider_spec import K8sProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of K8sProviderSpec from a JSON string +k8s_provider_spec_instance = K8sProviderSpec.from_json(json) +# print the JSON string representation of the object +print(K8sProviderSpec.to_json()) + +# convert the object into a dict +k8s_provider_spec_dict = k8s_provider_spec_instance.to_dict() +# create an instance of K8sProviderSpec from a dict +k8s_provider_spec_from_dict = K8sProviderSpec.from_dict(k8s_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelApi.md b/docs/LabelApi.md index 4723b8f..e52aa58 100644 --- a/docs/LabelApi.md +++ b/docs/LabelApi.md @@ -10,10 +10,9 @@ Method | HTTP request | Description # **list_labels** > List[str] list_labels(kind, label_selector=label_selector, field_selector=field_selector, limit=limit) +Retrieves a distinct list of labels for the specified resource type. -Retrieves a distinct list of labels for the specified resource type. - ### Example diff --git a/docs/MountVolumeProviderSpec.md b/docs/MountVolumeProviderSpec.md new file mode 100644 index 0000000..bd2747f --- /dev/null +++ b/docs/MountVolumeProviderSpec.md @@ -0,0 +1,30 @@ +# MountVolumeProviderSpec + +Named volume mount configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mount** | [**VolumeMount**](VolumeMount.md) | | + +## Example + +```python +from flightctl.models.mount_volume_provider_spec import MountVolumeProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of MountVolumeProviderSpec from a JSON string +mount_volume_provider_spec_instance = MountVolumeProviderSpec.from_json(json) +# print the JSON string representation of the object +print(MountVolumeProviderSpec.to_json()) + +# convert the object into a dict +mount_volume_provider_spec_dict = mount_volume_provider_spec_instance.to_dict() +# create an instance of MountVolumeProviderSpec from a dict +mount_volume_provider_spec_from_dict = MountVolumeProviderSpec.from_dict(mount_volume_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OAuth2Introspection.md b/docs/OAuth2Introspection.md new file mode 100644 index 0000000..c0cb42a --- /dev/null +++ b/docs/OAuth2Introspection.md @@ -0,0 +1,34 @@ +# OAuth2Introspection + +OAuth2Introspection defines the token introspection configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The introspection type. | +**url** | **str** | The GitHub API base URL. Defaults to https://api.github.com for GitHub.com, but can be customized for GitHub Enterprise Server. | [default to 'https://api.github.com'] +**jwks_url** | **str** | The JWKS (JSON Web Key Set) endpoint URL for fetching public keys to validate JWT signatures. | +**issuer** | **str** | Expected issuer claim value in the JWT. If not specified, uses the OAuth2ProviderSpec issuer. | [optional] +**audience** | **List[str]** | Expected audience claim values in the JWT. If not specified, uses the OAuth2ProviderSpec clientId. | [optional] + +## Example + +```python +from flightctl.models.o_auth2_introspection import OAuth2Introspection + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2Introspection from a JSON string +o_auth2_introspection_instance = OAuth2Introspection.from_json(json) +# print the JSON string representation of the object +print(OAuth2Introspection.to_json()) + +# convert the object into a dict +o_auth2_introspection_dict = o_auth2_introspection_instance.to_dict() +# create an instance of OAuth2Introspection from a dict +o_auth2_introspection_from_dict = OAuth2Introspection.from_dict(o_auth2_introspection_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OAuth2ProviderSpec.md b/docs/OAuth2ProviderSpec.md new file mode 100644 index 0000000..c666f03 --- /dev/null +++ b/docs/OAuth2ProviderSpec.md @@ -0,0 +1,43 @@ +# OAuth2ProviderSpec + +OAuth2ProviderSpec describes an OAuth2 provider configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | The type of authentication provider. | +**display_name** | **str** | Human-readable display name for the provider. | [optional] +**issuer** | **str** | The OAuth2 issuer identifier (used for issuer identification in tokens). | [optional] +**authorization_url** | **str** | The OAuth2 authorization endpoint URL. | +**token_url** | **str** | The OAuth2 token endpoint URL. | +**userinfo_url** | **str** | The OAuth2 userinfo endpoint URL. | +**client_id** | **str** | The OAuth2 client ID. | +**client_secret** | **str** | The OAuth2 client secret. | +**enabled** | **bool** | Whether this OAuth2 provider is enabled. | [optional] [default to True] +**scopes** | **List[str]** | List of OAuth2 scopes to request. | [optional] +**organization_assignment** | [**AuthOrganizationAssignment**](AuthOrganizationAssignment.md) | | +**username_claim** | **List[str]** | JSON path to the username claim in the userinfo response as an array of path segments (e.g., [\"preferred_username\"], [\"email\"], [\"sub\"]). | [optional] [default to ["preferred_username"]] +**role_assignment** | [**AuthRoleAssignment**](AuthRoleAssignment.md) | | +**introspection** | [**OAuth2Introspection**](OAuth2Introspection.md) | | [optional] + +## Example + +```python +from flightctl.models.o_auth2_provider_spec import OAuth2ProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of OAuth2ProviderSpec from a JSON string +o_auth2_provider_spec_instance = OAuth2ProviderSpec.from_json(json) +# print the JSON string representation of the object +print(OAuth2ProviderSpec.to_json()) + +# convert the object into a dict +o_auth2_provider_spec_dict = o_auth2_provider_spec_instance.to_dict() +# create an instance of OAuth2ProviderSpec from a dict +o_auth2_provider_spec_from_dict = OAuth2ProviderSpec.from_dict(o_auth2_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OIDCProviderSpec.md b/docs/OIDCProviderSpec.md new file mode 100644 index 0000000..4e3d001 --- /dev/null +++ b/docs/OIDCProviderSpec.md @@ -0,0 +1,39 @@ +# OIDCProviderSpec + +OIDCProviderSpec describes an OIDC provider configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | The type of authentication provider. | +**display_name** | **str** | Human-readable display name for the provider. | [optional] +**issuer** | **str** | The OIDC issuer URL (e.g., https://accounts.google.com). | +**client_id** | **str** | The OIDC client ID. | +**client_secret** | **str** | The OIDC client secret. | +**enabled** | **bool** | Whether this OIDC provider is enabled. | [optional] [default to True] +**scopes** | **List[str]** | List of OIDC scopes to request. | [optional] +**organization_assignment** | [**AuthOrganizationAssignment**](AuthOrganizationAssignment.md) | | +**username_claim** | **List[str]** | JSON path to the username claim in the JWT token as an array of path segments (e.g., [\"preferred_username\"], [\"email\"], [\"sub\"]). | [optional] [default to ["preferred_username"]] +**role_assignment** | [**AuthRoleAssignment**](AuthRoleAssignment.md) | | + +## Example + +```python +from flightctl.models.oidc_provider_spec import OIDCProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of OIDCProviderSpec from a JSON string +oidc_provider_spec_instance = OIDCProviderSpec.from_json(json) +# print the JSON string representation of the object +print(OIDCProviderSpec.to_json()) + +# convert the object into a dict +oidc_provider_spec_dict = oidc_provider_spec_instance.to_dict() +# create an instance of OIDCProviderSpec from a dict +oidc_provider_spec_from_dict = OIDCProviderSpec.from_dict(oidc_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenShiftProviderSpec.md b/docs/OpenShiftProviderSpec.md new file mode 100644 index 0000000..a215e83 --- /dev/null +++ b/docs/OpenShiftProviderSpec.md @@ -0,0 +1,41 @@ +# OpenShiftProviderSpec + +OpenShiftProviderSpec describes an OpenShift OAuth provider configuration. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**provider_type** | **str** | The type of authentication provider. | +**display_name** | **str** | Human-readable display name for the provider. | [optional] +**issuer** | **str** | The OAuth2 issuer identifier (used for issuer identification in tokens). | [optional] +**authorization_url** | **str** | The OAuth2 authorization endpoint URL. | [optional] +**token_url** | **str** | The OAuth2 token endpoint URL. | [optional] +**client_id** | **str** | The OAuth2 client ID. | [optional] +**client_secret** | **str** | The OAuth2 client secret. | [optional] +**enabled** | **bool** | Whether this OpenShift provider is enabled. | [optional] [default to True] +**scopes** | **List[str]** | List of OAuth2 scopes to request. | [optional] +**cluster_control_plane_url** | **str** | The OpenShift cluster control plane URL. | [optional] +**project_label_filter** | **str** | If specified, only projects with this label will be considered. The label selector should be in the format 'key' or 'key=value'. If only the key is provided, any project with that label (regardless of value) will be included. This enables server-side filtering for better performance. | [optional] +**role_suffix** | **str** | Optional suffix to strip from ClusterRole names when normalizing role names. Used for multi-release deployments where ClusterRoles have namespace-specific names (e.g., flightctl-admin-<namespace>). | [optional] + +## Example + +```python +from flightctl.models.open_shift_provider_spec import OpenShiftProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenShiftProviderSpec from a JSON string +open_shift_provider_spec_instance = OpenShiftProviderSpec.from_json(json) +# print the JSON string representation of the object +print(OpenShiftProviderSpec.to_json()) + +# convert the object into a dict +open_shift_provider_spec_dict = open_shift_provider_spec_instance.to_dict() +# create an instance of OpenShiftProviderSpec from a dict +open_shift_provider_spec_from_dict = OpenShiftProviderSpec.from_dict(open_shift_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 2eec7b0..30a4928 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **list_organizations** -> OrganizationList list_organizations() +> OrganizationList list_organizations(field_selector=field_selector) List organizations @@ -34,10 +34,11 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.OrganizationApi(api_client) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) try: # List organizations - api_response = api_instance.list_organizations() + api_response = api_instance.list_organizations(field_selector=field_selector) print("The response of OrganizationApi->list_organizations:\n") pprint(api_response) except Exception as e: @@ -48,7 +49,10 @@ with flightctl.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] ### Return type diff --git a/docs/Permission.md b/docs/Permission.md new file mode 100644 index 0000000..8dce20e --- /dev/null +++ b/docs/Permission.md @@ -0,0 +1,31 @@ +# Permission + +A permission defining allowed operations on a resource. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource** | **str** | The resource (e.g., \"devices\", \"fleets\", \"*\" for all resources). | +**operations** | **List[str]** | List of allowed operations (e.g., \"get\", \"list\", \"create\", \"update\", \"patch\", \"delete\", \"*\" for all operations). | + +## Example + +```python +from flightctl.models.permission import Permission + +# TODO update the JSON string below +json = "{}" +# create an instance of Permission from a JSON string +permission_instance = Permission.from_json(json) +# print the JSON string representation of the object +print(Permission.to_json()) + +# convert the object into a dict +permission_dict = permission_instance.to_dict() +# create an instance of Permission from a dict +permission_from_dict = Permission.from_dict(permission_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PermissionList.md b/docs/PermissionList.md new file mode 100644 index 0000000..1c7bddf --- /dev/null +++ b/docs/PermissionList.md @@ -0,0 +1,30 @@ +# PermissionList + +List of available permissions for a user. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permissions** | [**List[Permission]**](Permission.md) | List of permissions available to the user. | + +## Example + +```python +from flightctl.models.permission_list import PermissionList + +# TODO update the JSON string below +json = "{}" +# create an instance of PermissionList from a JSON string +permission_list_instance = PermissionList.from_json(json) +# print the JSON string representation of the object +print(PermissionList.to_json()) + +# convert the object into a dict +permission_list_dict = permission_list_instance.to_dict() +# create an instance of PermissionList from a dict +permission_list_from_dict = PermissionList.from_dict(permission_list_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index ef35b6b..cd35e64 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -15,8 +15,6 @@ Method | HTTP request | Description # **create_repository** > Repository create_repository(repository) - - Create a Repository resource. ### Example @@ -88,8 +86,6 @@ No authorization required # **delete_repository** > Status delete_repository(name) - - Delete a Repository resource. ### Example @@ -160,8 +156,6 @@ No authorization required # **get_repository** > Repository get_repository(name) - - Get a Repository resource. ### Example @@ -232,8 +226,6 @@ No authorization required # **list_repositories** > RepositoryList list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - - List Repository resources. ### Example @@ -310,8 +302,6 @@ No authorization required # **patch_repository** > Repository patch_repository(name, patch_request_inner) - - Patch a Repository resource. ### Example @@ -387,8 +377,6 @@ No authorization required # **replace_repository** > Repository replace_repository(name, repository) - - Update a Repository resource. ### Example diff --git a/docs/ResourceAlertSeverityType.md b/docs/ResourceAlertSeverityType.md index 5a1e229..ed51b07 100644 --- a/docs/ResourceAlertSeverityType.md +++ b/docs/ResourceAlertSeverityType.md @@ -4,11 +4,11 @@ Severity of the alert. ## Enum -* `WARNING` (value: `'Warning'`) +* `ResourceAlertSeverityTypeWarning` (value: `'Warning'`) -* `CRITICAL` (value: `'Critical'`) +* `ResourceAlertSeverityTypeCritical` (value: `'Critical'`) -* `INFO` (value: `'Info'`) +* `ResourceAlertSeverityTypeInfo` (value: `'Info'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourceKind.md b/docs/ResourceKind.md index 75d3fbb..e9c6b3b 100644 --- a/docs/ResourceKind.md +++ b/docs/ResourceKind.md @@ -18,6 +18,8 @@ Resource types exposed via the API. * `TEMPLATEVERSION` (value: `'TemplateVersion'`) +* `AUTHPROVIDER` (value: `'AuthProvider'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ResourcesyncApi.md b/docs/ResourcesyncApi.md index 53442ef..e0af484 100644 --- a/docs/ResourcesyncApi.md +++ b/docs/ResourcesyncApi.md @@ -15,8 +15,6 @@ Method | HTTP request | Description # **create_resource_sync** > ResourceSync create_resource_sync(resource_sync) - - Create a ResourceSync resource. ### Example @@ -88,8 +86,6 @@ No authorization required # **delete_resource_sync** > Status delete_resource_sync(name) - - Delete a ResourceSync resource. ### Example @@ -160,8 +156,6 @@ No authorization required # **get_resource_sync** > ResourceSync get_resource_sync(name) - - Get a ResourceSync resource. ### Example @@ -232,8 +226,6 @@ No authorization required # **list_resource_syncs** > ResourceSyncList list_resource_syncs(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) - - List ResourceSync resources. ### Example @@ -310,8 +302,6 @@ No authorization required # **patch_resource_sync** > ResourceSync patch_resource_sync(name, patch_request_inner) - - Patch a ResourceSync resource. ### Example @@ -387,8 +377,6 @@ No authorization required # **replace_resource_sync** > ResourceSync replace_resource_sync(name, resource_sync) - - Update a ResourceSync resource. ### Example diff --git a/docs/Rfc7662IntrospectionSpec.md b/docs/Rfc7662IntrospectionSpec.md new file mode 100644 index 0000000..f99e168 --- /dev/null +++ b/docs/Rfc7662IntrospectionSpec.md @@ -0,0 +1,31 @@ +# Rfc7662IntrospectionSpec + +Rfc7662IntrospectionSpec defines token introspection using RFC 7662 standard. Uses the OAuth2ProviderSpec clientId and clientSecret for authentication. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The introspection type. | +**url** | **str** | The RFC 7662 token introspection endpoint URL. | + +## Example + +```python +from flightctl.models.rfc7662_introspection_spec import Rfc7662IntrospectionSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of Rfc7662IntrospectionSpec from a JSON string +rfc7662_introspection_spec_instance = Rfc7662IntrospectionSpec.from_json(json) +# print the JSON string representation of the object +print(Rfc7662IntrospectionSpec.to_json()) + +# convert the object into a dict +rfc7662_introspection_spec_dict = rfc7662_introspection_spec_instance.to_dict() +# create an instance of Rfc7662IntrospectionSpec from a dict +rfc7662_introspection_spec_from_dict = Rfc7662IntrospectionSpec.from_dict(rfc7662_introspection_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RolloutPolicy.md b/docs/RolloutPolicy.md index 3c82f71..e0cb446 100644 --- a/docs/RolloutPolicy.md +++ b/docs/RolloutPolicy.md @@ -7,9 +7,9 @@ RolloutPolicy is the rollout policy of the fleet. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **disruption_budget** | [**DisruptionBudget**](DisruptionBudget.md) | | [optional] -**device_selection** | [**RolloutDeviceSelection**](RolloutDeviceSelection.md) | | [optional] +**device_selection** | [**BatchSequence**](BatchSequence.md) | | [optional] **success_threshold** | **str** | Percentage is the string format representing percentage string. | [optional] -**default_update_timeout** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours. | [optional] [default to '0s'] +**default_update_timeout** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours. | [optional] ## Example diff --git a/docs/SystemdActiveStateType.md b/docs/SystemdActiveStateType.md new file mode 100644 index 0000000..4f8e89a --- /dev/null +++ b/docs/SystemdActiveStateType.md @@ -0,0 +1,27 @@ +# SystemdActiveStateType + +The high-level unit activation state. + +## Enum + +* `SystemdActiveStateActive` (value: `'active'`) + +* `SystemdActiveStateReloading` (value: `'reloading'`) + +* `SystemdActiveStateInactive` (value: `'inactive'`) + +* `SystemdActiveStateFailed` (value: `'failed'`) + +* `SystemdActiveStateActivating` (value: `'activating'`) + +* `SystemdActiveStateDeactivating` (value: `'deactivating'`) + +* `SystemdActiveStateMaintenance` (value: `'maintenance'`) + +* `SystemdActiveStateRefreshing` (value: `'refreshing'`) + +* `SystemdActiveStateUnknown` (value: `'unknown'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SystemdEnableStateType.md b/docs/SystemdEnableStateType.md new file mode 100644 index 0000000..8bfb2b9 --- /dev/null +++ b/docs/SystemdEnableStateType.md @@ -0,0 +1,39 @@ +# SystemdEnableStateType + +The enable state of the unit file. + +## Enum + +* `SystemdEnableStateEnabled` (value: `'enabled'`) + +* `SystemdEnableStateEnabledRuntime` (value: `'enabled-runtime'`) + +* `SystemdEnableStateLinked` (value: `'linked'`) + +* `SystemdEnableStateLinkedRuntime` (value: `'linked-runtime'`) + +* `SystemdEnableStateAlias` (value: `'alias'`) + +* `SystemdEnableStateMasked` (value: `'masked'`) + +* `SystemdEnableStateMaskedRuntime` (value: `'masked-runtime'`) + +* `SystemdEnableStateStatic` (value: `'static'`) + +* `SystemdEnableStateDisabled` (value: `'disabled'`) + +* `SystemdEnableStateIndirect` (value: `'indirect'`) + +* `SystemdEnableStateGenerated` (value: `'generated'`) + +* `SystemdEnableStateTransient` (value: `'transient'`) + +* `SystemdEnableStateBad` (value: `'bad'`) + +* `SystemdEnableStateUnknown` (value: `'unknown'`) + +* `SystemdEnableStateEmpty` (value: `''`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SystemdLoadStateType.md b/docs/SystemdLoadStateType.md new file mode 100644 index 0000000..eb44241 --- /dev/null +++ b/docs/SystemdLoadStateType.md @@ -0,0 +1,25 @@ +# SystemdLoadStateType + +The load state of the unit file. + +## Enum + +* `SystemdLoadStateStub` (value: `'stub'`) + +* `SystemdLoadStateLoaded` (value: `'loaded'`) + +* `SystemdLoadStateNotFound` (value: `'not-found'`) + +* `SystemdLoadStateBadSetting` (value: `'bad-setting'`) + +* `SystemdLoadStateError` (value: `'error'`) + +* `SystemdLoadStateMerged` (value: `'merged'`) + +* `SystemdLoadStateMasked` (value: `'masked'`) + +* `SystemdLoadStateUnknown` (value: `'unknown'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SystemdUnitStatus.md b/docs/SystemdUnitStatus.md new file mode 100644 index 0000000..e4c68cb --- /dev/null +++ b/docs/SystemdUnitStatus.md @@ -0,0 +1,34 @@ +# SystemdUnitStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**unit** | **str** | The unit name (e.g., \"sshd.service\"). | +**description** | **str** | The human-readable description for the unit. | +**enable_state** | [**SystemdEnableStateType**](SystemdEnableStateType.md) | | +**load_state** | [**SystemdLoadStateType**](SystemdLoadStateType.md) | | +**active_state** | [**SystemdActiveStateType**](SystemdActiveStateType.md) | | +**sub_state** | **str** | The low-level, unit-type-specific state. | + +## Example + +```python +from flightctl.models.systemd_unit_status import SystemdUnitStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of SystemdUnitStatus from a JSON string +systemd_unit_status_instance = SystemdUnitStatus.from_json(json) +# print the JSON string representation of the object +print(SystemdUnitStatus.to_json()) + +# convert the object into a dict +systemd_unit_status_dict = systemd_unit_status_instance.to_dict() +# create an instance of SystemdUnitStatus from a dict +systemd_unit_status_from_dict = SystemdUnitStatus.from_dict(systemd_unit_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenRequest.md b/docs/TokenRequest.md new file mode 100644 index 0000000..6619eab --- /dev/null +++ b/docs/TokenRequest.md @@ -0,0 +1,36 @@ +# TokenRequest + +OAuth2 token request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**grant_type** | **str** | OAuth2 grant type. | +**client_id** | **str** | OAuth2 client identifier. | +**refresh_token** | **str** | Refresh token for refresh_token grant. | [optional] +**code** | **str** | Authorization code for authorization_code grant. | [optional] +**scope** | **str** | OAuth2 scope. | [optional] +**code_verifier** | **str** | PKCE code verifier. | [optional] +**redirect_uri** | **str** | OAuth2 redirect URI (required for authorization_code grant if included in authorization request). | [optional] + +## Example + +```python +from flightctl.models.token_request import TokenRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenRequest from a JSON string +token_request_instance = TokenRequest.from_json(json) +# print the JSON string representation of the object +print(TokenRequest.to_json()) + +# convert the object into a dict +token_request_dict = token_request_instance.to_dict() +# create an instance of TokenRequest from a dict +token_request_from_dict = TokenRequest.from_dict(token_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenResponse.md b/docs/TokenResponse.md new file mode 100644 index 0000000..5ba08ca --- /dev/null +++ b/docs/TokenResponse.md @@ -0,0 +1,36 @@ +# TokenResponse + +OAuth2 token response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**access_token** | **str** | OAuth2 access token. | [optional] +**token_type** | **str** | Token type. | [optional] +**id_token** | **str** | OIDC ID token (JWT). Present when using OIDC with openid scope. | [optional] +**refresh_token** | **str** | OAuth2 refresh token. | [optional] +**expires_in** | **int** | Token expiration time in seconds. | [optional] +**error** | **str** | OAuth2 error code. | [optional] +**error_description** | **str** | OAuth2 error description. | [optional] + +## Example + +```python +from flightctl.models.token_response import TokenResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenResponse from a JSON string +token_response_instance = TokenResponse.from_json(json) +# print the JSON string representation of the object +print(TokenResponse.to_json()) + +# convert the object into a dict +token_response_dict = token_response_instance.to_dict() +# create an instance of TokenResponse from a dict +token_response_from_dict = TokenResponse.from_dict(token_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateSchedule.md b/docs/UpdateSchedule.md index 93d19e9..0b15e62 100644 --- a/docs/UpdateSchedule.md +++ b/docs/UpdateSchedule.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time_zone** | **str** | Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported (\"GMT\", \"UTC\"). | [optional] [default to 'Local'] **at** | **str** | Cron expression format for scheduling times. The format is `* * * * *`: - Minutes: `*` matches 0-59. - Hours: `*` matches 0-23. - Day of Month: `*` matches 1-31. - Month: `*` matches 1-12. - Day of Week: `*` matches 0-6. Supported operators: - `*`: Matches any value (e.g., `*` in hours matches every hour). - `-`: Range (e.g., `0-8` for 12 AM to 8 AM). - `,`: List (e.g., `1,12` for 1st and 12th minute). - `/`: Step (e.g., `*/12` for every 12th minute). - Single value (e.g., `8` matches the 8th minute). Example: `* 0-8,16-23 * * *`. | -**start_grace_duration** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours. | [optional] [default to '0s'] +**start_grace_duration** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours. | ## Example diff --git a/docs/UserInfoResponse.md b/docs/UserInfoResponse.md new file mode 100644 index 0000000..f426809 --- /dev/null +++ b/docs/UserInfoResponse.md @@ -0,0 +1,34 @@ +# UserInfoResponse + +OIDC UserInfo response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sub** | **str** | Subject identifier. | [optional] +**preferred_username** | **str** | Preferred username. | [optional] +**name** | **str** | Full name. | [optional] +**organizations** | [**List[Organization]**](Organization.md) | User organizations. | [optional] +**error** | **str** | Error code. | [optional] + +## Example + +```python +from flightctl.models.user_info_response import UserInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of UserInfoResponse from a JSON string +user_info_response_instance = UserInfoResponse.from_json(json) +# print the JSON string representation of the object +print(UserInfoResponse.to_json()) + +# convert the object into a dict +user_info_response_dict = user_info_response_instance.to_dict() +# create an instance of UserInfoResponse from a dict +user_info_response_from_dict = UserInfoResponse.from_dict(user_info_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VersionApi.md b/docs/VersionApi.md index 8e06250..7f460c4 100644 --- a/docs/VersionApi.md +++ b/docs/VersionApi.md @@ -10,8 +10,6 @@ Method | HTTP request | Description # **get_version** > Version get_version() - - Get service version. ### Example diff --git a/docs/VolumeMount.md b/docs/VolumeMount.md new file mode 100644 index 0000000..be1da3d --- /dev/null +++ b/docs/VolumeMount.md @@ -0,0 +1,30 @@ +# VolumeMount + +Mount configuration for a volume. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | Mount path in the container with support for options. | + +## Example + +```python +from flightctl.models.volume_mount import VolumeMount + +# TODO update the JSON string below +json = "{}" +# create an instance of VolumeMount from a JSON string +volume_mount_instance = VolumeMount.from_json(json) +# print the JSON string representation of the object +print(VolumeMount.to_json()) + +# convert the object into a dict +volume_mount_dict = volume_mount_instance.to_dict() +# create an instance of VolumeMount from a dict +volume_mount_from_dict = VolumeMount.from_dict(volume_mount_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/flightctl/__init__.py b/flightctl/__init__.py index b14bc65..9ff06a7 100644 --- a/flightctl/__init__.py +++ b/flightctl/__init__.py @@ -7,7 +7,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,182 +17,427 @@ __version__ = "1.0.0" +# Define package exports +__all__ = [ + "AuthenticationApi", + "AuthproviderApi", + "CertificatesigningrequestApi", + "DeviceApi", + "DeviceactionsApi", + "EnrollmentrequestApi", + "EventApi", + "FleetApi", + "LabelApi", + "OrganizationApi", + "RepositoryApi", + "ResourcesyncApi", + "VersionApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "AapProviderSpec", + "AbsolutePath", + "AppType", + "ApplicationContent", + "ApplicationEnvVars", + "ApplicationProviderSpec", + "ApplicationResourceLimits", + "ApplicationResources", + "ApplicationStatusType", + "ApplicationVolume", + "ApplicationVolumeProviderSpec", + "ApplicationVolumeReclaimPolicy", + "ApplicationVolumeStatus", + "ApplicationsSummaryStatusType", + "AuthConfig", + "AuthDynamicOrganizationAssignment", + "AuthDynamicRoleAssignment", + "AuthOrganizationAssignment", + "AuthPerUserOrganizationAssignment", + "AuthProvider", + "AuthProviderList", + "AuthProviderSpec", + "AuthRoleAssignment", + "AuthStaticOrganizationAssignment", + "AuthStaticRoleAssignment", + "Batch", + "BatchLimit", + "BatchSequence", + "CertificateSigningRequest", + "CertificateSigningRequestList", + "CertificateSigningRequestSpec", + "CertificateSigningRequestStatus", + "Condition", + "ConditionStatus", + "ConditionType", + "ConfigProviderSpec", + "CpuResourceMonitorSpec", + "Device", + "DeviceApplicationStatus", + "DeviceApplicationsSummaryStatus", + "DeviceConfigStatus", + "DeviceConsole", + "DeviceDecommission", + "DeviceDecommissionTargetType", + "DeviceIntegrityCheckStatus", + "DeviceIntegrityCheckStatusType", + "DeviceIntegrityStatus", + "DeviceIntegrityStatusSummaryType", + "DeviceLastSeen", + "DeviceLifecycleHookType", + "DeviceLifecycleStatus", + "DeviceLifecycleStatusType", + "DeviceList", + "DeviceMultipleOwnersDetectedDetails", + "DeviceMultipleOwnersResolvedDetails", + "DeviceOsSpec", + "DeviceOsStatus", + "DeviceOwnershipChangedDetails", + "DeviceResourceStatus", + "DeviceResourceStatusType", + "DeviceResumeRequest", + "DeviceResumeResponse", + "DeviceSpec", + "DeviceSpecSystemd", + "DeviceStatus", + "DeviceSummaryStatus", + "DeviceSummaryStatusType", + "DeviceSystemInfo", + "DeviceUpdatePolicySpec", + "DeviceUpdatedStatus", + "DeviceUpdatedStatusType", + "DevicesSummary", + "DiskResourceMonitorSpec", + "DisruptionBudget", + "EncodingType", + "EnrollmentConfig", + "EnrollmentRequest", + "EnrollmentRequestApproval", + "EnrollmentRequestApprovalStatus", + "EnrollmentRequestList", + "EnrollmentRequestSpec", + "EnrollmentRequestStatus", + "EnrollmentService", + "EnrollmentServiceAuth", + "EnrollmentServiceService", + "Event", + "EventDetails", + "EventList", + "EventSource", + "FileContent", + "FileMetadata", + "FileOperation", + "FileSpec", + "Fleet", + "FleetList", + "FleetRolloutBatchCompletedDetails", + "FleetRolloutBatchDispatchedDetails", + "FleetRolloutCompletedDetails", + "FleetRolloutDeviceSelectedDetails", + "FleetRolloutFailedDetails", + "FleetRolloutStartedDetails", + "FleetRolloutStatus", + "FleetSpec", + "FleetSpecTemplate", + "FleetStatus", + "GenericRepoSpec", + "GitConfigProviderSpec", + "GitConfigProviderSpecGitRef", + "GitHubIntrospectionSpec", + "HookAction", + "HookActionRun", + "HookCondition", + "HookConditionPathOp", + "HttpConfig", + "HttpConfigProviderSpec", + "HttpConfigProviderSpecHttpRef", + "HttpRepoSpec", + "ImageApplicationProviderSpec", + "ImageMountVolumeProviderSpec", + "ImagePullPolicy", + "ImageVolumeProviderSpec", + "ImageVolumeSource", + "InlineApplicationProviderSpec", + "InlineConfigProviderSpec", + "InternalTaskFailedDetails", + "InternalTaskPermanentlyFailedDetails", + "JwtIntrospectionSpec", + "K8sProviderSpec", + "KubernetesSecretProviderSpec", + "KubernetesSecretProviderSpecSecretRef", + "LabelSelector", + "ListMeta", + "MatchExpression", + "MemoryResourceMonitorSpec", + "MountVolumeProviderSpec", + "OAuth2Introspection", + "OAuth2ProviderSpec", + "OIDCProviderSpec", + "ObjectMeta", + "ObjectReference", + "OpenShiftProviderSpec", + "Organization", + "OrganizationList", + "OrganizationSpec", + "PatchRequestInner", + "Permission", + "PermissionList", + "ReferencedRepositoryUpdatedDetails", + "RelativePath", + "RepoSpecType", + "Repository", + "RepositoryList", + "RepositorySpec", + "RepositoryStatus", + "ResourceAlertRule", + "ResourceAlertSeverityType", + "ResourceKind", + "ResourceMonitor", + "ResourceMonitorSpec", + "ResourceSync", + "ResourceSyncCompletedDetails", + "ResourceSyncList", + "ResourceSyncSpec", + "ResourceSyncStatus", + "ResourceUpdatedDetails", + "Rfc7662IntrospectionSpec", + "RolloutPolicy", + "RolloutStrategy", + "SshConfig", + "SshRepoSpec", + "Status", + "SystemdActiveStateType", + "SystemdEnableStateType", + "SystemdLoadStateType", + "SystemdUnitStatus", + "TemplateVersion", + "TemplateVersionList", + "TemplateVersionSpec", + "TemplateVersionStatus", + "TokenRequest", + "TokenResponse", + "UpdateSchedule", + "UserInfoResponse", + "Version", + "VolumeMount", +] + # import apis into sdk package -from flightctl.api.authentication_api import AuthenticationApi -from flightctl.api.certificatesigningrequest_api import CertificatesigningrequestApi -from flightctl.api.device_api import DeviceApi -from flightctl.api.deviceactions_api import DeviceactionsApi -from flightctl.api.enrollmentrequest_api import EnrollmentrequestApi -from flightctl.api.event_api import EventApi -from flightctl.api.fleet_api import FleetApi -from flightctl.api.label_api import LabelApi -from flightctl.api.organization_api import OrganizationApi -from flightctl.api.repository_api import RepositoryApi -from flightctl.api.resourcesync_api import ResourcesyncApi -from flightctl.api.version_api import VersionApi +from flightctl.api.authentication_api import AuthenticationApi as AuthenticationApi +from flightctl.api.authprovider_api import AuthproviderApi as AuthproviderApi +from flightctl.api.certificatesigningrequest_api import CertificatesigningrequestApi as CertificatesigningrequestApi +from flightctl.api.device_api import DeviceApi as DeviceApi +from flightctl.api.deviceactions_api import DeviceactionsApi as DeviceactionsApi +from flightctl.api.enrollmentrequest_api import EnrollmentrequestApi as EnrollmentrequestApi +from flightctl.api.event_api import EventApi as EventApi +from flightctl.api.fleet_api import FleetApi as FleetApi +from flightctl.api.label_api import LabelApi as LabelApi +from flightctl.api.organization_api import OrganizationApi as OrganizationApi +from flightctl.api.repository_api import RepositoryApi as RepositoryApi +from flightctl.api.resourcesync_api import ResourcesyncApi as ResourcesyncApi +from flightctl.api.version_api import VersionApi as VersionApi # import ApiClient -from flightctl.api_response import ApiResponse -from flightctl.api_client import ApiClient -from flightctl.configuration import Configuration -from flightctl.exceptions import OpenApiException -from flightctl.exceptions import ApiTypeError -from flightctl.exceptions import ApiValueError -from flightctl.exceptions import ApiKeyError -from flightctl.exceptions import ApiAttributeError -from flightctl.exceptions import ApiException +from flightctl.api_response import ApiResponse as ApiResponse +from flightctl.api_client import ApiClient as ApiClient +from flightctl.configuration import Configuration as Configuration +from flightctl.exceptions import OpenApiException as OpenApiException +from flightctl.exceptions import ApiTypeError as ApiTypeError +from flightctl.exceptions import ApiValueError as ApiValueError +from flightctl.exceptions import ApiKeyError as ApiKeyError +from flightctl.exceptions import ApiAttributeError as ApiAttributeError +from flightctl.exceptions import ApiException as ApiException # import models into sdk package -from flightctl.models.absolute_path import AbsolutePath -from flightctl.models.app_type import AppType -from flightctl.models.application_content import ApplicationContent -from flightctl.models.application_env_vars import ApplicationEnvVars -from flightctl.models.application_provider_spec import ApplicationProviderSpec -from flightctl.models.application_status_type import ApplicationStatusType -from flightctl.models.application_volume import ApplicationVolume -from flightctl.models.application_volume_provider_spec import ApplicationVolumeProviderSpec -from flightctl.models.application_volume_status import ApplicationVolumeStatus -from flightctl.models.applications_summary_status_type import ApplicationsSummaryStatusType -from flightctl.models.auth_config import AuthConfig -from flightctl.models.auth_organizations_config import AuthOrganizationsConfig -from flightctl.models.batch import Batch -from flightctl.models.batch_limit import BatchLimit -from flightctl.models.batch_sequence import BatchSequence -from flightctl.models.certificate_signing_request import CertificateSigningRequest -from flightctl.models.certificate_signing_request_list import CertificateSigningRequestList -from flightctl.models.certificate_signing_request_spec import CertificateSigningRequestSpec -from flightctl.models.certificate_signing_request_status import CertificateSigningRequestStatus -from flightctl.models.condition import Condition -from flightctl.models.condition_status import ConditionStatus -from flightctl.models.condition_type import ConditionType -from flightctl.models.config_provider_spec import ConfigProviderSpec -from flightctl.models.cpu_resource_monitor_spec import CpuResourceMonitorSpec -from flightctl.models.device import Device -from flightctl.models.device_application_status import DeviceApplicationStatus -from flightctl.models.device_applications_summary_status import DeviceApplicationsSummaryStatus -from flightctl.models.device_config_status import DeviceConfigStatus -from flightctl.models.device_console import DeviceConsole -from flightctl.models.device_decommission import DeviceDecommission -from flightctl.models.device_decommission_target_type import DeviceDecommissionTargetType -from flightctl.models.device_integrity_check_status import DeviceIntegrityCheckStatus -from flightctl.models.device_integrity_check_status_type import DeviceIntegrityCheckStatusType -from flightctl.models.device_integrity_status import DeviceIntegrityStatus -from flightctl.models.device_integrity_status_summary_type import DeviceIntegrityStatusSummaryType -from flightctl.models.device_last_seen import DeviceLastSeen -from flightctl.models.device_lifecycle_hook_type import DeviceLifecycleHookType -from flightctl.models.device_lifecycle_status import DeviceLifecycleStatus -from flightctl.models.device_lifecycle_status_type import DeviceLifecycleStatusType -from flightctl.models.device_list import DeviceList -from flightctl.models.device_multiple_owners_detected_details import DeviceMultipleOwnersDetectedDetails -from flightctl.models.device_multiple_owners_resolved_details import DeviceMultipleOwnersResolvedDetails -from flightctl.models.device_os_spec import DeviceOsSpec -from flightctl.models.device_os_status import DeviceOsStatus -from flightctl.models.device_ownership_changed_details import DeviceOwnershipChangedDetails -from flightctl.models.device_resource_status import DeviceResourceStatus -from flightctl.models.device_resource_status_type import DeviceResourceStatusType -from flightctl.models.device_resume_request import DeviceResumeRequest -from flightctl.models.device_resume_response import DeviceResumeResponse -from flightctl.models.device_spec import DeviceSpec -from flightctl.models.device_spec_systemd import DeviceSpecSystemd -from flightctl.models.device_status import DeviceStatus -from flightctl.models.device_summary_status import DeviceSummaryStatus -from flightctl.models.device_summary_status_type import DeviceSummaryStatusType -from flightctl.models.device_system_info import DeviceSystemInfo -from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec -from flightctl.models.device_updated_status import DeviceUpdatedStatus -from flightctl.models.device_updated_status_type import DeviceUpdatedStatusType -from flightctl.models.devices_summary import DevicesSummary -from flightctl.models.disk_resource_monitor_spec import DiskResourceMonitorSpec -from flightctl.models.disruption_budget import DisruptionBudget -from flightctl.models.encoding_type import EncodingType -from flightctl.models.enrollment_config import EnrollmentConfig -from flightctl.models.enrollment_request import EnrollmentRequest -from flightctl.models.enrollment_request_approval import EnrollmentRequestApproval -from flightctl.models.enrollment_request_approval_status import EnrollmentRequestApprovalStatus -from flightctl.models.enrollment_request_list import EnrollmentRequestList -from flightctl.models.enrollment_request_spec import EnrollmentRequestSpec -from flightctl.models.enrollment_request_status import EnrollmentRequestStatus -from flightctl.models.enrollment_service import EnrollmentService -from flightctl.models.enrollment_service_auth import EnrollmentServiceAuth -from flightctl.models.enrollment_service_service import EnrollmentServiceService -from flightctl.models.event import Event -from flightctl.models.event_details import EventDetails -from flightctl.models.event_list import EventList -from flightctl.models.event_source import EventSource -from flightctl.models.file_content import FileContent -from flightctl.models.file_metadata import FileMetadata -from flightctl.models.file_operation import FileOperation -from flightctl.models.file_spec import FileSpec -from flightctl.models.fleet import Fleet -from flightctl.models.fleet_list import FleetList -from flightctl.models.fleet_rollout_batch_completed_details import FleetRolloutBatchCompletedDetails -from flightctl.models.fleet_rollout_batch_dispatched_details import FleetRolloutBatchDispatchedDetails -from flightctl.models.fleet_rollout_completed_details import FleetRolloutCompletedDetails -from flightctl.models.fleet_rollout_device_selected_details import FleetRolloutDeviceSelectedDetails -from flightctl.models.fleet_rollout_failed_details import FleetRolloutFailedDetails -from flightctl.models.fleet_rollout_started_details import FleetRolloutStartedDetails -from flightctl.models.fleet_rollout_status import FleetRolloutStatus -from flightctl.models.fleet_spec import FleetSpec -from flightctl.models.fleet_spec_template import FleetSpecTemplate -from flightctl.models.fleet_status import FleetStatus -from flightctl.models.generic_repo_spec import GenericRepoSpec -from flightctl.models.git_config_provider_spec import GitConfigProviderSpec -from flightctl.models.git_config_provider_spec_git_ref import GitConfigProviderSpecGitRef -from flightctl.models.hook_action import HookAction -from flightctl.models.hook_action_run import HookActionRun -from flightctl.models.hook_condition import HookCondition -from flightctl.models.hook_condition_path_op import HookConditionPathOp -from flightctl.models.http_config import HttpConfig -from flightctl.models.http_config_provider_spec import HttpConfigProviderSpec -from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef -from flightctl.models.http_repo_spec import HttpRepoSpec -from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec -from flightctl.models.image_pull_policy import ImagePullPolicy -from flightctl.models.image_volume_provider_spec import ImageVolumeProviderSpec -from flightctl.models.image_volume_source import ImageVolumeSource -from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec -from flightctl.models.inline_config_provider_spec import InlineConfigProviderSpec -from flightctl.models.internal_task_failed_details import InternalTaskFailedDetails -from flightctl.models.internal_task_permanently_failed_details import InternalTaskPermanentlyFailedDetails -from flightctl.models.kubernetes_secret_provider_spec import KubernetesSecretProviderSpec -from flightctl.models.kubernetes_secret_provider_spec_secret_ref import KubernetesSecretProviderSpecSecretRef -from flightctl.models.label_selector import LabelSelector -from flightctl.models.list_meta import ListMeta -from flightctl.models.match_expression import MatchExpression -from flightctl.models.memory_resource_monitor_spec import MemoryResourceMonitorSpec -from flightctl.models.object_meta import ObjectMeta -from flightctl.models.object_reference import ObjectReference -from flightctl.models.organization import Organization -from flightctl.models.organization_list import OrganizationList -from flightctl.models.organization_spec import OrganizationSpec -from flightctl.models.patch_request_inner import PatchRequestInner -from flightctl.models.referenced_repository_updated_details import ReferencedRepositoryUpdatedDetails -from flightctl.models.relative_path import RelativePath -from flightctl.models.repo_spec_type import RepoSpecType -from flightctl.models.repository import Repository -from flightctl.models.repository_list import RepositoryList -from flightctl.models.repository_spec import RepositorySpec -from flightctl.models.repository_status import RepositoryStatus -from flightctl.models.resource_alert_rule import ResourceAlertRule -from flightctl.models.resource_alert_severity_type import ResourceAlertSeverityType -from flightctl.models.resource_kind import ResourceKind -from flightctl.models.resource_monitor import ResourceMonitor -from flightctl.models.resource_monitor_spec import ResourceMonitorSpec -from flightctl.models.resource_sync import ResourceSync -from flightctl.models.resource_sync_completed_details import ResourceSyncCompletedDetails -from flightctl.models.resource_sync_list import ResourceSyncList -from flightctl.models.resource_sync_spec import ResourceSyncSpec -from flightctl.models.resource_sync_status import ResourceSyncStatus -from flightctl.models.resource_updated_details import ResourceUpdatedDetails -from flightctl.models.rollout_device_selection import RolloutDeviceSelection -from flightctl.models.rollout_policy import RolloutPolicy -from flightctl.models.rollout_strategy import RolloutStrategy -from flightctl.models.ssh_config import SshConfig -from flightctl.models.ssh_repo_spec import SshRepoSpec -from flightctl.models.status import Status -from flightctl.models.template_version import TemplateVersion -from flightctl.models.template_version_list import TemplateVersionList -from flightctl.models.template_version_spec import TemplateVersionSpec -from flightctl.models.template_version_status import TemplateVersionStatus -from flightctl.models.update_schedule import UpdateSchedule -from flightctl.models.version import Version +from flightctl.models.aap_provider_spec import AapProviderSpec as AapProviderSpec +from flightctl.models.absolute_path import AbsolutePath as AbsolutePath +from flightctl.models.app_type import AppType as AppType +from flightctl.models.application_content import ApplicationContent as ApplicationContent +from flightctl.models.application_env_vars import ApplicationEnvVars as ApplicationEnvVars +from flightctl.models.application_provider_spec import ApplicationProviderSpec as ApplicationProviderSpec +from flightctl.models.application_resource_limits import ApplicationResourceLimits as ApplicationResourceLimits +from flightctl.models.application_resources import ApplicationResources as ApplicationResources +from flightctl.models.application_status_type import ApplicationStatusType as ApplicationStatusType +from flightctl.models.application_volume import ApplicationVolume as ApplicationVolume +from flightctl.models.application_volume_provider_spec import ApplicationVolumeProviderSpec as ApplicationVolumeProviderSpec +from flightctl.models.application_volume_reclaim_policy import ApplicationVolumeReclaimPolicy as ApplicationVolumeReclaimPolicy +from flightctl.models.application_volume_status import ApplicationVolumeStatus as ApplicationVolumeStatus +from flightctl.models.applications_summary_status_type import ApplicationsSummaryStatusType as ApplicationsSummaryStatusType +from flightctl.models.auth_config import AuthConfig as AuthConfig +from flightctl.models.auth_dynamic_organization_assignment import AuthDynamicOrganizationAssignment as AuthDynamicOrganizationAssignment +from flightctl.models.auth_dynamic_role_assignment import AuthDynamicRoleAssignment as AuthDynamicRoleAssignment +from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment as AuthOrganizationAssignment +from flightctl.models.auth_per_user_organization_assignment import AuthPerUserOrganizationAssignment as AuthPerUserOrganizationAssignment +from flightctl.models.auth_provider import AuthProvider as AuthProvider +from flightctl.models.auth_provider_list import AuthProviderList as AuthProviderList +from flightctl.models.auth_provider_spec import AuthProviderSpec as AuthProviderSpec +from flightctl.models.auth_role_assignment import AuthRoleAssignment as AuthRoleAssignment +from flightctl.models.auth_static_organization_assignment import AuthStaticOrganizationAssignment as AuthStaticOrganizationAssignment +from flightctl.models.auth_static_role_assignment import AuthStaticRoleAssignment as AuthStaticRoleAssignment +from flightctl.models.batch import Batch as Batch +from flightctl.models.batch_limit import BatchLimit as BatchLimit +from flightctl.models.batch_sequence import BatchSequence as BatchSequence +from flightctl.models.certificate_signing_request import CertificateSigningRequest as CertificateSigningRequest +from flightctl.models.certificate_signing_request_list import CertificateSigningRequestList as CertificateSigningRequestList +from flightctl.models.certificate_signing_request_spec import CertificateSigningRequestSpec as CertificateSigningRequestSpec +from flightctl.models.certificate_signing_request_status import CertificateSigningRequestStatus as CertificateSigningRequestStatus +from flightctl.models.condition import Condition as Condition +from flightctl.models.condition_status import ConditionStatus as ConditionStatus +from flightctl.models.condition_type import ConditionType as ConditionType +from flightctl.models.config_provider_spec import ConfigProviderSpec as ConfigProviderSpec +from flightctl.models.cpu_resource_monitor_spec import CpuResourceMonitorSpec as CpuResourceMonitorSpec +from flightctl.models.device import Device as Device +from flightctl.models.device_application_status import DeviceApplicationStatus as DeviceApplicationStatus +from flightctl.models.device_applications_summary_status import DeviceApplicationsSummaryStatus as DeviceApplicationsSummaryStatus +from flightctl.models.device_config_status import DeviceConfigStatus as DeviceConfigStatus +from flightctl.models.device_console import DeviceConsole as DeviceConsole +from flightctl.models.device_decommission import DeviceDecommission as DeviceDecommission +from flightctl.models.device_decommission_target_type import DeviceDecommissionTargetType as DeviceDecommissionTargetType +from flightctl.models.device_integrity_check_status import DeviceIntegrityCheckStatus as DeviceIntegrityCheckStatus +from flightctl.models.device_integrity_check_status_type import DeviceIntegrityCheckStatusType as DeviceIntegrityCheckStatusType +from flightctl.models.device_integrity_status import DeviceIntegrityStatus as DeviceIntegrityStatus +from flightctl.models.device_integrity_status_summary_type import DeviceIntegrityStatusSummaryType as DeviceIntegrityStatusSummaryType +from flightctl.models.device_last_seen import DeviceLastSeen as DeviceLastSeen +from flightctl.models.device_lifecycle_hook_type import DeviceLifecycleHookType as DeviceLifecycleHookType +from flightctl.models.device_lifecycle_status import DeviceLifecycleStatus as DeviceLifecycleStatus +from flightctl.models.device_lifecycle_status_type import DeviceLifecycleStatusType as DeviceLifecycleStatusType +from flightctl.models.device_list import DeviceList as DeviceList +from flightctl.models.device_multiple_owners_detected_details import DeviceMultipleOwnersDetectedDetails as DeviceMultipleOwnersDetectedDetails +from flightctl.models.device_multiple_owners_resolved_details import DeviceMultipleOwnersResolvedDetails as DeviceMultipleOwnersResolvedDetails +from flightctl.models.device_os_spec import DeviceOsSpec as DeviceOsSpec +from flightctl.models.device_os_status import DeviceOsStatus as DeviceOsStatus +from flightctl.models.device_ownership_changed_details import DeviceOwnershipChangedDetails as DeviceOwnershipChangedDetails +from flightctl.models.device_resource_status import DeviceResourceStatus as DeviceResourceStatus +from flightctl.models.device_resource_status_type import DeviceResourceStatusType as DeviceResourceStatusType +from flightctl.models.device_resume_request import DeviceResumeRequest as DeviceResumeRequest +from flightctl.models.device_resume_response import DeviceResumeResponse as DeviceResumeResponse +from flightctl.models.device_spec import DeviceSpec as DeviceSpec +from flightctl.models.device_spec_systemd import DeviceSpecSystemd as DeviceSpecSystemd +from flightctl.models.device_status import DeviceStatus as DeviceStatus +from flightctl.models.device_summary_status import DeviceSummaryStatus as DeviceSummaryStatus +from flightctl.models.device_summary_status_type import DeviceSummaryStatusType as DeviceSummaryStatusType +from flightctl.models.device_system_info import DeviceSystemInfo as DeviceSystemInfo +from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec as DeviceUpdatePolicySpec +from flightctl.models.device_updated_status import DeviceUpdatedStatus as DeviceUpdatedStatus +from flightctl.models.device_updated_status_type import DeviceUpdatedStatusType as DeviceUpdatedStatusType +from flightctl.models.devices_summary import DevicesSummary as DevicesSummary +from flightctl.models.disk_resource_monitor_spec import DiskResourceMonitorSpec as DiskResourceMonitorSpec +from flightctl.models.disruption_budget import DisruptionBudget as DisruptionBudget +from flightctl.models.encoding_type import EncodingType as EncodingType +from flightctl.models.enrollment_config import EnrollmentConfig as EnrollmentConfig +from flightctl.models.enrollment_request import EnrollmentRequest as EnrollmentRequest +from flightctl.models.enrollment_request_approval import EnrollmentRequestApproval as EnrollmentRequestApproval +from flightctl.models.enrollment_request_approval_status import EnrollmentRequestApprovalStatus as EnrollmentRequestApprovalStatus +from flightctl.models.enrollment_request_list import EnrollmentRequestList as EnrollmentRequestList +from flightctl.models.enrollment_request_spec import EnrollmentRequestSpec as EnrollmentRequestSpec +from flightctl.models.enrollment_request_status import EnrollmentRequestStatus as EnrollmentRequestStatus +from flightctl.models.enrollment_service import EnrollmentService as EnrollmentService +from flightctl.models.enrollment_service_auth import EnrollmentServiceAuth as EnrollmentServiceAuth +from flightctl.models.enrollment_service_service import EnrollmentServiceService as EnrollmentServiceService +from flightctl.models.event import Event as Event +from flightctl.models.event_details import EventDetails as EventDetails +from flightctl.models.event_list import EventList as EventList +from flightctl.models.event_source import EventSource as EventSource +from flightctl.models.file_content import FileContent as FileContent +from flightctl.models.file_metadata import FileMetadata as FileMetadata +from flightctl.models.file_operation import FileOperation as FileOperation +from flightctl.models.file_spec import FileSpec as FileSpec +from flightctl.models.fleet import Fleet as Fleet +from flightctl.models.fleet_list import FleetList as FleetList +from flightctl.models.fleet_rollout_batch_completed_details import FleetRolloutBatchCompletedDetails as FleetRolloutBatchCompletedDetails +from flightctl.models.fleet_rollout_batch_dispatched_details import FleetRolloutBatchDispatchedDetails as FleetRolloutBatchDispatchedDetails +from flightctl.models.fleet_rollout_completed_details import FleetRolloutCompletedDetails as FleetRolloutCompletedDetails +from flightctl.models.fleet_rollout_device_selected_details import FleetRolloutDeviceSelectedDetails as FleetRolloutDeviceSelectedDetails +from flightctl.models.fleet_rollout_failed_details import FleetRolloutFailedDetails as FleetRolloutFailedDetails +from flightctl.models.fleet_rollout_started_details import FleetRolloutStartedDetails as FleetRolloutStartedDetails +from flightctl.models.fleet_rollout_status import FleetRolloutStatus as FleetRolloutStatus +from flightctl.models.fleet_spec import FleetSpec as FleetSpec +from flightctl.models.fleet_spec_template import FleetSpecTemplate as FleetSpecTemplate +from flightctl.models.fleet_status import FleetStatus as FleetStatus +from flightctl.models.generic_repo_spec import GenericRepoSpec as GenericRepoSpec +from flightctl.models.git_config_provider_spec import GitConfigProviderSpec as GitConfigProviderSpec +from flightctl.models.git_config_provider_spec_git_ref import GitConfigProviderSpecGitRef as GitConfigProviderSpecGitRef +from flightctl.models.git_hub_introspection_spec import GitHubIntrospectionSpec as GitHubIntrospectionSpec +from flightctl.models.hook_action import HookAction as HookAction +from flightctl.models.hook_action_run import HookActionRun as HookActionRun +from flightctl.models.hook_condition import HookCondition as HookCondition +from flightctl.models.hook_condition_path_op import HookConditionPathOp as HookConditionPathOp +from flightctl.models.http_config import HttpConfig as HttpConfig +from flightctl.models.http_config_provider_spec import HttpConfigProviderSpec as HttpConfigProviderSpec +from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef as HttpConfigProviderSpecHttpRef +from flightctl.models.http_repo_spec import HttpRepoSpec as HttpRepoSpec +from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec as ImageApplicationProviderSpec +from flightctl.models.image_mount_volume_provider_spec import ImageMountVolumeProviderSpec as ImageMountVolumeProviderSpec +from flightctl.models.image_pull_policy import ImagePullPolicy as ImagePullPolicy +from flightctl.models.image_volume_provider_spec import ImageVolumeProviderSpec as ImageVolumeProviderSpec +from flightctl.models.image_volume_source import ImageVolumeSource as ImageVolumeSource +from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec as InlineApplicationProviderSpec +from flightctl.models.inline_config_provider_spec import InlineConfigProviderSpec as InlineConfigProviderSpec +from flightctl.models.internal_task_failed_details import InternalTaskFailedDetails as InternalTaskFailedDetails +from flightctl.models.internal_task_permanently_failed_details import InternalTaskPermanentlyFailedDetails as InternalTaskPermanentlyFailedDetails +from flightctl.models.jwt_introspection_spec import JwtIntrospectionSpec as JwtIntrospectionSpec +from flightctl.models.k8s_provider_spec import K8sProviderSpec as K8sProviderSpec +from flightctl.models.kubernetes_secret_provider_spec import KubernetesSecretProviderSpec as KubernetesSecretProviderSpec +from flightctl.models.kubernetes_secret_provider_spec_secret_ref import KubernetesSecretProviderSpecSecretRef as KubernetesSecretProviderSpecSecretRef +from flightctl.models.label_selector import LabelSelector as LabelSelector +from flightctl.models.list_meta import ListMeta as ListMeta +from flightctl.models.match_expression import MatchExpression as MatchExpression +from flightctl.models.memory_resource_monitor_spec import MemoryResourceMonitorSpec as MemoryResourceMonitorSpec +from flightctl.models.mount_volume_provider_spec import MountVolumeProviderSpec as MountVolumeProviderSpec +from flightctl.models.o_auth2_introspection import OAuth2Introspection as OAuth2Introspection +from flightctl.models.o_auth2_provider_spec import OAuth2ProviderSpec as OAuth2ProviderSpec +from flightctl.models.oidc_provider_spec import OIDCProviderSpec as OIDCProviderSpec +from flightctl.models.object_meta import ObjectMeta as ObjectMeta +from flightctl.models.object_reference import ObjectReference as ObjectReference +from flightctl.models.open_shift_provider_spec import OpenShiftProviderSpec as OpenShiftProviderSpec +from flightctl.models.organization import Organization as Organization +from flightctl.models.organization_list import OrganizationList as OrganizationList +from flightctl.models.organization_spec import OrganizationSpec as OrganizationSpec +from flightctl.models.patch_request_inner import PatchRequestInner as PatchRequestInner +from flightctl.models.permission import Permission as Permission +from flightctl.models.permission_list import PermissionList as PermissionList +from flightctl.models.referenced_repository_updated_details import ReferencedRepositoryUpdatedDetails as ReferencedRepositoryUpdatedDetails +from flightctl.models.relative_path import RelativePath as RelativePath +from flightctl.models.repo_spec_type import RepoSpecType as RepoSpecType +from flightctl.models.repository import Repository as Repository +from flightctl.models.repository_list import RepositoryList as RepositoryList +from flightctl.models.repository_spec import RepositorySpec as RepositorySpec +from flightctl.models.repository_status import RepositoryStatus as RepositoryStatus +from flightctl.models.resource_alert_rule import ResourceAlertRule as ResourceAlertRule +from flightctl.models.resource_alert_severity_type import ResourceAlertSeverityType as ResourceAlertSeverityType +from flightctl.models.resource_kind import ResourceKind as ResourceKind +from flightctl.models.resource_monitor import ResourceMonitor as ResourceMonitor +from flightctl.models.resource_monitor_spec import ResourceMonitorSpec as ResourceMonitorSpec +from flightctl.models.resource_sync import ResourceSync as ResourceSync +from flightctl.models.resource_sync_completed_details import ResourceSyncCompletedDetails as ResourceSyncCompletedDetails +from flightctl.models.resource_sync_list import ResourceSyncList as ResourceSyncList +from flightctl.models.resource_sync_spec import ResourceSyncSpec as ResourceSyncSpec +from flightctl.models.resource_sync_status import ResourceSyncStatus as ResourceSyncStatus +from flightctl.models.resource_updated_details import ResourceUpdatedDetails as ResourceUpdatedDetails +from flightctl.models.rfc7662_introspection_spec import Rfc7662IntrospectionSpec as Rfc7662IntrospectionSpec +from flightctl.models.rollout_policy import RolloutPolicy as RolloutPolicy +from flightctl.models.rollout_strategy import RolloutStrategy as RolloutStrategy +from flightctl.models.ssh_config import SshConfig as SshConfig +from flightctl.models.ssh_repo_spec import SshRepoSpec as SshRepoSpec +from flightctl.models.status import Status as Status +from flightctl.models.systemd_active_state_type import SystemdActiveStateType as SystemdActiveStateType +from flightctl.models.systemd_enable_state_type import SystemdEnableStateType as SystemdEnableStateType +from flightctl.models.systemd_load_state_type import SystemdLoadStateType as SystemdLoadStateType +from flightctl.models.systemd_unit_status import SystemdUnitStatus as SystemdUnitStatus +from flightctl.models.template_version import TemplateVersion as TemplateVersion +from flightctl.models.template_version_list import TemplateVersionList as TemplateVersionList +from flightctl.models.template_version_spec import TemplateVersionSpec as TemplateVersionSpec +from flightctl.models.template_version_status import TemplateVersionStatus as TemplateVersionStatus +from flightctl.models.token_request import TokenRequest as TokenRequest +from flightctl.models.token_response import TokenResponse as TokenResponse +from flightctl.models.update_schedule import UpdateSchedule as UpdateSchedule +from flightctl.models.user_info_response import UserInfoResponse as UserInfoResponse +from flightctl.models.version import Version as Version +from flightctl.models.volume_mount import VolumeMount as VolumeMount + diff --git a/flightctl/api/__init__.py b/flightctl/api/__init__.py index 683cb1e..475a6ae 100644 --- a/flightctl/api/__init__.py +++ b/flightctl/api/__init__.py @@ -2,6 +2,7 @@ # import apis into api package from flightctl.api.authentication_api import AuthenticationApi +from flightctl.api.authprovider_api import AuthproviderApi from flightctl.api.certificatesigningrequest_api import CertificatesigningrequestApi from flightctl.api.device_api import DeviceApi from flightctl.api.deviceactions_api import DeviceactionsApi diff --git a/flightctl/api/authentication_api.py b/flightctl/api/authentication_api.py index b68bb95..9895482 100644 --- a/flightctl/api/authentication_api.py +++ b/flightctl/api/authentication_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,7 +21,11 @@ from typing import Optional from typing_extensions import Annotated from flightctl.models.auth_config import AuthConfig +from flightctl.models.permission_list import PermissionList from flightctl.models.status import Status +from flightctl.models.token_request import TokenRequest +from flightctl.models.token_response import TokenResponse +from flightctl.models.user_info_response import UserInfoResponse from flightctl.api_client import ApiClient, RequestSerialized from flightctl.api_response import ApiResponse @@ -93,6 +97,7 @@ def auth_config( _response_types_map: Dict[str, Optional[str]] = { '200': "AuthConfig", '418': "Status", + '429': "Status", } response_data = self.api_client.call_api( *_param, @@ -157,6 +162,7 @@ def auth_config_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "AuthConfig", '418': "Status", + '429': "Status", } response_data = self.api_client.call_api( *_param, @@ -221,6 +227,7 @@ def auth_config_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "AuthConfig", '418': "Status", + '429': "Status", } response_data = self.api_client.call_api( *_param, @@ -289,6 +296,812 @@ def _auth_config_serialize( + @validate_call + def auth_get_permissions( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PermissionList: + """auth_get_permissions + + Get the list of available permissions for the authenticated user. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_get_permissions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PermissionList", + '401': "Status", + '418': "Status", + '429': "Status", + '500': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def auth_get_permissions_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PermissionList]: + """auth_get_permissions + + Get the list of available permissions for the authenticated user. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_get_permissions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PermissionList", + '401': "Status", + '418': "Status", + '429': "Status", + '500': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def auth_get_permissions_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """auth_get_permissions + + Get the list of available permissions for the authenticated user. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_get_permissions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PermissionList", + '401': "Status", + '418': "Status", + '429': "Status", + '500': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _auth_get_permissions_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/auth/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def auth_token( + self, + providername: Annotated[StrictStr, Field(description="Name of the authentication provider to use.")], + token_request: TokenRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TokenResponse: + """auth_token + + OAuth2 token exchange endpoint. Proxies token requests to the configured authentication provider (PAM issuer) for authorization code flow with PKCE support. + + :param providername: Name of the authentication provider to use. (required) + :type providername: str + :param token_request: (required) + :type token_request: TokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_token_serialize( + providername=providername, + token_request=token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenResponse", + '400': "TokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def auth_token_with_http_info( + self, + providername: Annotated[StrictStr, Field(description="Name of the authentication provider to use.")], + token_request: TokenRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[TokenResponse]: + """auth_token + + OAuth2 token exchange endpoint. Proxies token requests to the configured authentication provider (PAM issuer) for authorization code flow with PKCE support. + + :param providername: Name of the authentication provider to use. (required) + :type providername: str + :param token_request: (required) + :type token_request: TokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_token_serialize( + providername=providername, + token_request=token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenResponse", + '400': "TokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def auth_token_without_preload_content( + self, + providername: Annotated[StrictStr, Field(description="Name of the authentication provider to use.")], + token_request: TokenRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """auth_token + + OAuth2 token exchange endpoint. Proxies token requests to the configured authentication provider (PAM issuer) for authorization code flow with PKCE support. + + :param providername: Name of the authentication provider to use. (required) + :type providername: str + :param token_request: (required) + :type token_request: TokenRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_token_serialize( + providername=providername, + token_request=token_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenResponse", + '400': "TokenResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _auth_token_serialize( + self, + providername, + token_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if providername is not None: + _path_params['providername'] = providername + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if token_request is not None: + _body_params = token_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json', + 'application/x-www-form-urlencoded' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v1/auth/{providername}/token', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def auth_user_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> UserInfoResponse: + """auth_user_info + + OIDC UserInfo endpoint. Proxies the request to the configured authentication provider to retrieve user information. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_user_info_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserInfoResponse", + '401': "Status", + '418': "Status", + '429': "Status", + '500': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def auth_user_info_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[UserInfoResponse]: + """auth_user_info + + OIDC UserInfo endpoint. Proxies the request to the configured authentication provider to retrieve user information. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_user_info_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserInfoResponse", + '401': "Status", + '418': "Status", + '429': "Status", + '500': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def auth_user_info_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """auth_user_info + + OIDC UserInfo endpoint. Proxies the request to the configured authentication provider to retrieve user information. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_user_info_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserInfoResponse", + '401': "Status", + '418': "Status", + '429': "Status", + '500': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _auth_user_info_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/auth/userinfo', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def auth_validate( self, @@ -347,6 +1160,7 @@ def auth_validate( '400': "Status", '401': "Status", '418': "Status", + '429': "Status", '500': "Status", } response_data = self.api_client.call_api( @@ -418,6 +1232,7 @@ def auth_validate_with_http_info( '400': "Status", '401': "Status", '418': "Status", + '429': "Status", '500': "Status", } response_data = self.api_client.call_api( @@ -489,6 +1304,7 @@ def auth_validate_without_preload_content( '400': "Status", '401': "Status", '418': "Status", + '429': "Status", '500': "Status", } response_data = self.api_client.call_api( diff --git a/flightctl/api/authprovider_api.py b/flightctl/api/authprovider_api.py new file mode 100644 index 0000000..9f1e935 --- /dev/null +++ b/flightctl/api/authprovider_api.py @@ -0,0 +1,1834 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from flightctl.models.auth_provider import AuthProvider +from flightctl.models.auth_provider_list import AuthProviderList +from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.status import Status + +from flightctl.api_client import ApiClient, RequestSerialized +from flightctl.api_response import ApiResponse +from flightctl.rest import RESTResponseType + + +class AuthproviderApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_auth_provider( + self, + auth_provider: AuthProvider, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AuthProvider: + """create_auth_provider + + Create an AuthProvider resource. + + :param auth_provider: (required) + :type auth_provider: AuthProvider + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_auth_provider_serialize( + auth_provider=auth_provider, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_auth_provider_with_http_info( + self, + auth_provider: AuthProvider, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AuthProvider]: + """create_auth_provider + + Create an AuthProvider resource. + + :param auth_provider: (required) + :type auth_provider: AuthProvider + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_auth_provider_serialize( + auth_provider=auth_provider, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_auth_provider_without_preload_content( + self, + auth_provider: AuthProvider, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """create_auth_provider + + Create an AuthProvider resource. + + :param auth_provider: (required) + :type auth_provider: AuthProvider + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_auth_provider_serialize( + auth_provider=auth_provider, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_auth_provider_serialize( + self, + auth_provider, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if auth_provider is not None: + _body_params = auth_provider + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v1/authproviders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_auth_provider( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Status: + """delete_auth_provider + + Delete an AuthProvider resource. + + :param name: The name of the AuthProvider resource to delete. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_auth_provider_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_auth_provider_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Status]: + """delete_auth_provider + + Delete an AuthProvider resource. + + :param name: The name of the AuthProvider resource to delete. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_auth_provider_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_auth_provider_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """delete_auth_provider + + Delete an AuthProvider resource. + + :param name: The name of the AuthProvider resource to delete. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_auth_provider_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_auth_provider_serialize( + self, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v1/authproviders/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_auth_provider( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to get.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AuthProvider: + """get_auth_provider + + Get an AuthProvider resource. + + :param name: The name of the AuthProvider resource to get. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_provider_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '401': "Status", + '403': "Status", + '404': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_auth_provider_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to get.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AuthProvider]: + """get_auth_provider + + Get an AuthProvider resource. + + :param name: The name of the AuthProvider resource to get. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_provider_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '401': "Status", + '403': "Status", + '404': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_auth_provider_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to get.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_auth_provider + + Get an AuthProvider resource. + + :param name: The name of the AuthProvider resource to get. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_auth_provider_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '401': "Status", + '403': "Status", + '404': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_auth_provider_serialize( + self, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/authproviders/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_auth_providers( + self, + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AuthProviderList: + """list_auth_providers + + List AuthProvider resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_auth_providers_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProviderList", + '400': "Status", + '401': "Status", + '403': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_auth_providers_with_http_info( + self, + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AuthProviderList]: + """list_auth_providers + + List AuthProvider resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_auth_providers_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProviderList", + '400': "Status", + '401': "Status", + '403': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_auth_providers_without_preload_content( + self, + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_auth_providers + + List AuthProvider resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_auth_providers_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProviderList", + '400': "Status", + '401': "Status", + '403': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_auth_providers_serialize( + self, + var_continue, + label_selector, + field_selector, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/authproviders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def patch_auth_provider( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to patch.")], + patch_request_inner: List[PatchRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AuthProvider: + """patch_auth_provider + + Patch an AuthProvider resource. + + :param name: The name of the AuthProvider resource to patch. (required) + :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_auth_provider_serialize( + name=name, + patch_request_inner=patch_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def patch_auth_provider_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to patch.")], + patch_request_inner: List[PatchRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AuthProvider]: + """patch_auth_provider + + Patch an AuthProvider resource. + + :param name: The name of the AuthProvider resource to patch. (required) + :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_auth_provider_serialize( + name=name, + patch_request_inner=patch_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def patch_auth_provider_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to patch.")], + patch_request_inner: List[PatchRequestInner], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """patch_auth_provider + + Patch an AuthProvider resource. + + :param name: The name of the AuthProvider resource to patch. (required) + :type name: str + :param patch_request_inner: (required) + :type patch_request_inner: List[PatchRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_auth_provider_serialize( + name=name, + patch_request_inner=patch_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _patch_auth_provider_serialize( + self, + name, + patch_request_inner, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/api/v1/authproviders/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def replace_auth_provider( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to update.")], + auth_provider: AuthProvider, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AuthProvider: + """replace_auth_provider + + Update an AuthProvider resource. + + :param name: The name of the AuthProvider resource to update. (required) + :type name: str + :param auth_provider: (required) + :type auth_provider: AuthProvider + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replace_auth_provider_serialize( + name=name, + auth_provider=auth_provider, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '201': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def replace_auth_provider_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to update.")], + auth_provider: AuthProvider, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AuthProvider]: + """replace_auth_provider + + Update an AuthProvider resource. + + :param name: The name of the AuthProvider resource to update. (required) + :type name: str + :param auth_provider: (required) + :type auth_provider: AuthProvider + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replace_auth_provider_serialize( + name=name, + auth_provider=auth_provider, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '201': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def replace_auth_provider_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the AuthProvider resource to update.")], + auth_provider: AuthProvider, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """replace_auth_provider + + Update an AuthProvider resource. + + :param name: The name of the AuthProvider resource to update. (required) + :type name: str + :param auth_provider: (required) + :type auth_provider: AuthProvider + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._replace_auth_provider_serialize( + name=name, + auth_provider=auth_provider, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthProvider", + '201': "AuthProvider", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _replace_auth_provider_serialize( + self, + name, + auth_provider, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if auth_provider is not None: + _body_params = auth_provider + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/v1/authproviders/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flightctl/api/certificatesigningrequest_api.py b/flightctl/api/certificatesigningrequest_api.py index 9325b4f..31607f9 100644 --- a/flightctl/api/certificatesigningrequest_api.py +++ b/flightctl/api/certificatesigningrequest_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/device_api.py b/flightctl/api/device_api.py index 63887ec..8111ed2 100644 --- a/flightctl/api/device_api.py +++ b/flightctl/api/device_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/deviceactions_api.py b/flightctl/api/deviceactions_api.py index 9a7e5cc..61fd87a 100644 --- a/flightctl/api/deviceactions_api.py +++ b/flightctl/api/deviceactions_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/enrollmentrequest_api.py b/flightctl/api/enrollmentrequest_api.py index 2e013f9..ad224ef 100644 --- a/flightctl/api/enrollmentrequest_api.py +++ b/flightctl/api/enrollmentrequest_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/event_api.py b/flightctl/api/event_api.py index 2355ccc..21026d4 100644 --- a/flightctl/api/event_api.py +++ b/flightctl/api/event_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/fleet_api.py b/flightctl/api/fleet_api.py index 2e0af9f..16ba58a 100644 --- a/flightctl/api/fleet_api.py +++ b/flightctl/api/fleet_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/label_api.py b/flightctl/api/label_api.py index 70552b2..1962a37 100644 --- a/flightctl/api/label_api.py +++ b/flightctl/api/label_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/organization_api.py b/flightctl/api/organization_api.py index decf97d..c3cbce7 100644 --- a/flightctl/api/organization_api.py +++ b/flightctl/api/organization_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,6 +17,9 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated from flightctl.models.organization_list import OrganizationList from flightctl.api_client import ApiClient, RequestSerialized @@ -40,6 +43,7 @@ def __init__(self, api_client=None) -> None: @validate_call def list_organizations( self, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -57,6 +61,8 @@ def list_organizations( Retrieves a list of organizations. Only returns organizations that the user has access to. + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -80,6 +86,7 @@ def list_organizations( """ # noqa: E501 _param = self._list_organizations_serialize( + field_selector=field_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -108,6 +115,7 @@ def list_organizations( @validate_call def list_organizations_with_http_info( self, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -125,6 +133,8 @@ def list_organizations_with_http_info( Retrieves a list of organizations. Only returns organizations that the user has access to. + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -148,6 +158,7 @@ def list_organizations_with_http_info( """ # noqa: E501 _param = self._list_organizations_serialize( + field_selector=field_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -176,6 +187,7 @@ def list_organizations_with_http_info( @validate_call def list_organizations_without_preload_content( self, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -193,6 +205,8 @@ def list_organizations_without_preload_content( Retrieves a list of organizations. Only returns organizations that the user has access to. + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -216,6 +230,7 @@ def list_organizations_without_preload_content( """ # noqa: E501 _param = self._list_organizations_serialize( + field_selector=field_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -239,6 +254,7 @@ def list_organizations_without_preload_content( def _list_organizations_serialize( self, + field_selector, _request_auth, _content_type, _headers, @@ -261,6 +277,10 @@ def _list_organizations_serialize( # process the path parameters # process the query parameters + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/flightctl/api/repository_api.py b/flightctl/api/repository_api.py index e929a53..4195c1c 100644 --- a/flightctl/api/repository_api.py +++ b/flightctl/api/repository_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/resourcesync_api.py b/flightctl/api/resourcesync_api.py index ff1a6b6..d360412 100644 --- a/flightctl/api/resourcesync_api.py +++ b/flightctl/api/resourcesync_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api/version_api.py b/flightctl/api/version_api.py index b421096..29af5ab 100644 --- a/flightctl/api/version_api.py +++ b/flightctl/api/version_api.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/api_client.py b/flightctl/api_client.py index e3adac8..0e98997 100644 --- a/flightctl/api_client.py +++ b/flightctl/api_client.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,6 +22,7 @@ import os import re import tempfile +import uuid from urllib.parse import quote from typing import Tuple, Optional, List, Dict, Union @@ -357,6 +358,8 @@ def sanitize_for_serialization(self, obj): return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj + elif isinstance(obj, uuid.UUID): + return str(obj) elif isinstance(obj, list): return [ self.sanitize_for_serialization(sub_obj) for sub_obj in obj @@ -383,6 +386,10 @@ def sanitize_for_serialization(self, obj): else: obj_dict = obj.__dict__ + if isinstance(obj_dict, list): + # here we handle instances that can either be a list or something else, and only became a real list by calling to_dict() + return self.sanitize_for_serialization(obj_dict) + return { key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() @@ -405,7 +412,7 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = json.loads(response_text) except ValueError: data = response_text - elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): if response_text == "": data = "" else: @@ -454,13 +461,13 @@ def __deserialize(self, data, klass): if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) - elif klass == object: + elif klass is object: return self.__deserialize_object(data) - elif klass == datetime.date: + elif klass is datetime.date: return self.__deserialize_date(data) - elif klass == datetime.datetime: + elif klass is datetime.datetime: return self.__deserialize_datetime(data) - elif klass == decimal.Decimal: + elif klass is decimal.Decimal: return decimal.Decimal(data) elif issubclass(klass, Enum): return self.__deserialize_enum(data, klass) diff --git a/flightctl/configuration.py b/flightctl/configuration.py index 7a37c2a..c086df8 100644 --- a/flightctl/configuration.py +++ b/flightctl/configuration.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,7 +19,7 @@ from logging import FileHandler import multiprocessing import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union from typing_extensions import NotRequired, Self import urllib3 @@ -163,6 +163,10 @@ class Configuration: :param ssl_ca_cert: str - the path to a file of concatenated CA certificates in PEM format. :param retries: Number of retries for API requests. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: the path to a client certificate file, for mTLS. + :param key_file: the path to a client key file, for mTLS. :Example: @@ -196,13 +200,16 @@ def __init__( username: Optional[str]=None, password: Optional[str]=None, access_token: Optional[str]=None, - server_index: Optional[int]=None, + server_index: Optional[int]=None, server_variables: Optional[ServerVariablesT]=None, server_operation_index: Optional[Dict[int, int]]=None, server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, ignore_operation_servers: bool=False, ssl_ca_cert: Optional[str]=None, retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + cert_file: Optional[str]=None, + key_file: Optional[str]=None, *, debug: Optional[bool] = None, ) -> None: @@ -280,10 +287,14 @@ def __init__( self.ssl_ca_cert = ssl_ca_cert """Set this to customize the certificate file to verify the peer. """ - self.cert_file = None + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = cert_file """client certificate file """ - self.key_file = None + self.key_file = key_file """client key file """ self.assert_hostname = None @@ -533,7 +544,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v1alpha1\n"\ + "Version of the API: v1beta1\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/flightctl/exceptions.py b/flightctl/exceptions.py index 44904a1..bc95bc6 100644 --- a/flightctl/exceptions.py +++ b/flightctl/exceptions.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/__init__.py b/flightctl/models/__init__.py index e67ce39..b83ba40 100644 --- a/flightctl/models/__init__.py +++ b/flightctl/models/__init__.py @@ -6,27 +6,39 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - # import models into model package +from flightctl.models.aap_provider_spec import AapProviderSpec from flightctl.models.absolute_path import AbsolutePath from flightctl.models.app_type import AppType from flightctl.models.application_content import ApplicationContent from flightctl.models.application_env_vars import ApplicationEnvVars from flightctl.models.application_provider_spec import ApplicationProviderSpec +from flightctl.models.application_resource_limits import ApplicationResourceLimits +from flightctl.models.application_resources import ApplicationResources from flightctl.models.application_status_type import ApplicationStatusType from flightctl.models.application_volume import ApplicationVolume from flightctl.models.application_volume_provider_spec import ApplicationVolumeProviderSpec +from flightctl.models.application_volume_reclaim_policy import ApplicationVolumeReclaimPolicy from flightctl.models.application_volume_status import ApplicationVolumeStatus from flightctl.models.applications_summary_status_type import ApplicationsSummaryStatusType from flightctl.models.auth_config import AuthConfig -from flightctl.models.auth_organizations_config import AuthOrganizationsConfig +from flightctl.models.auth_dynamic_organization_assignment import AuthDynamicOrganizationAssignment +from flightctl.models.auth_dynamic_role_assignment import AuthDynamicRoleAssignment +from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment +from flightctl.models.auth_per_user_organization_assignment import AuthPerUserOrganizationAssignment +from flightctl.models.auth_provider import AuthProvider +from flightctl.models.auth_provider_list import AuthProviderList +from flightctl.models.auth_provider_spec import AuthProviderSpec +from flightctl.models.auth_role_assignment import AuthRoleAssignment +from flightctl.models.auth_static_organization_assignment import AuthStaticOrganizationAssignment +from flightctl.models.auth_static_role_assignment import AuthStaticRoleAssignment from flightctl.models.batch import Batch from flightctl.models.batch_limit import BatchLimit from flightctl.models.batch_sequence import BatchSequence @@ -110,6 +122,7 @@ from flightctl.models.generic_repo_spec import GenericRepoSpec from flightctl.models.git_config_provider_spec import GitConfigProviderSpec from flightctl.models.git_config_provider_spec_git_ref import GitConfigProviderSpecGitRef +from flightctl.models.git_hub_introspection_spec import GitHubIntrospectionSpec from flightctl.models.hook_action import HookAction from flightctl.models.hook_action_run import HookActionRun from flightctl.models.hook_condition import HookCondition @@ -119,6 +132,7 @@ from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef from flightctl.models.http_repo_spec import HttpRepoSpec from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec +from flightctl.models.image_mount_volume_provider_spec import ImageMountVolumeProviderSpec from flightctl.models.image_pull_policy import ImagePullPolicy from flightctl.models.image_volume_provider_spec import ImageVolumeProviderSpec from flightctl.models.image_volume_source import ImageVolumeSource @@ -126,18 +140,27 @@ from flightctl.models.inline_config_provider_spec import InlineConfigProviderSpec from flightctl.models.internal_task_failed_details import InternalTaskFailedDetails from flightctl.models.internal_task_permanently_failed_details import InternalTaskPermanentlyFailedDetails +from flightctl.models.jwt_introspection_spec import JwtIntrospectionSpec +from flightctl.models.k8s_provider_spec import K8sProviderSpec from flightctl.models.kubernetes_secret_provider_spec import KubernetesSecretProviderSpec from flightctl.models.kubernetes_secret_provider_spec_secret_ref import KubernetesSecretProviderSpecSecretRef from flightctl.models.label_selector import LabelSelector from flightctl.models.list_meta import ListMeta from flightctl.models.match_expression import MatchExpression from flightctl.models.memory_resource_monitor_spec import MemoryResourceMonitorSpec +from flightctl.models.mount_volume_provider_spec import MountVolumeProviderSpec +from flightctl.models.o_auth2_introspection import OAuth2Introspection +from flightctl.models.o_auth2_provider_spec import OAuth2ProviderSpec +from flightctl.models.oidc_provider_spec import OIDCProviderSpec from flightctl.models.object_meta import ObjectMeta from flightctl.models.object_reference import ObjectReference +from flightctl.models.open_shift_provider_spec import OpenShiftProviderSpec from flightctl.models.organization import Organization from flightctl.models.organization_list import OrganizationList from flightctl.models.organization_spec import OrganizationSpec from flightctl.models.patch_request_inner import PatchRequestInner +from flightctl.models.permission import Permission +from flightctl.models.permission_list import PermissionList from flightctl.models.referenced_repository_updated_details import ReferencedRepositoryUpdatedDetails from flightctl.models.relative_path import RelativePath from flightctl.models.repo_spec_type import RepoSpecType @@ -156,15 +179,24 @@ from flightctl.models.resource_sync_spec import ResourceSyncSpec from flightctl.models.resource_sync_status import ResourceSyncStatus from flightctl.models.resource_updated_details import ResourceUpdatedDetails -from flightctl.models.rollout_device_selection import RolloutDeviceSelection +from flightctl.models.rfc7662_introspection_spec import Rfc7662IntrospectionSpec from flightctl.models.rollout_policy import RolloutPolicy from flightctl.models.rollout_strategy import RolloutStrategy from flightctl.models.ssh_config import SshConfig from flightctl.models.ssh_repo_spec import SshRepoSpec from flightctl.models.status import Status +from flightctl.models.systemd_active_state_type import SystemdActiveStateType +from flightctl.models.systemd_enable_state_type import SystemdEnableStateType +from flightctl.models.systemd_load_state_type import SystemdLoadStateType +from flightctl.models.systemd_unit_status import SystemdUnitStatus from flightctl.models.template_version import TemplateVersion from flightctl.models.template_version_list import TemplateVersionList from flightctl.models.template_version_spec import TemplateVersionSpec from flightctl.models.template_version_status import TemplateVersionStatus +from flightctl.models.token_request import TokenRequest +from flightctl.models.token_response import TokenResponse from flightctl.models.update_schedule import UpdateSchedule +from flightctl.models.user_info_response import UserInfoResponse from flightctl.models.version import Version +from flightctl.models.volume_mount import VolumeMount + diff --git a/flightctl/models/aap_provider_spec.py b/flightctl/models/aap_provider_spec.py new file mode 100644 index 0000000..d5c6b0d --- /dev/null +++ b/flightctl/models/aap_provider_spec.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AapProviderSpec(BaseModel): + """ + AapProviderSpec describes an Ansible Automation Platform (AAP) provider configuration. + """ # noqa: E501 + provider_type: StrictStr = Field(description="The type of authentication provider.", alias="providerType") + display_name: Optional[StrictStr] = Field(default=None, description="Human-readable display name for the provider.", alias="displayName") + api_url: StrictStr = Field(description="The internal AAP API URL.", alias="apiUrl") + authorization_url: StrictStr = Field(description="The OAuth2 authorization endpoint URL.", alias="authorizationUrl") + token_url: StrictStr = Field(description="The OAuth2 token endpoint URL.", alias="tokenUrl") + client_id: StrictStr = Field(description="The OAuth2 client ID.", alias="clientId") + client_secret: StrictStr = Field(description="The OAuth2 client secret.", alias="clientSecret") + enabled: Optional[StrictBool] = Field(default=True, description="Whether this AAP provider is enabled.") + scopes: List[StrictStr] = Field(description="List of OAuth2 scopes to request.") + __properties: ClassVar[List[str]] = ["providerType", "displayName", "apiUrl", "authorizationUrl", "tokenUrl", "clientId", "clientSecret", "enabled", "scopes"] + + @field_validator('provider_type') + def provider_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['aap']): + raise ValueError("must be one of enum values ('aap')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AapProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AapProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "displayName": obj.get("displayName"), + "apiUrl": obj.get("apiUrl"), + "authorizationUrl": obj.get("authorizationUrl"), + "tokenUrl": obj.get("tokenUrl"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "scopes": obj.get("scopes") + }) + return _obj + + diff --git a/flightctl/models/absolute_path.py b/flightctl/models/absolute_path.py index e3366d0..5792397 100644 --- a/flightctl/models/absolute_path.py +++ b/flightctl/models/absolute_path.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/app_type.py b/flightctl/models/app_type.py index bdafba4..e6fe7c7 100644 --- a/flightctl/models/app_type.py +++ b/flightctl/models/app_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,7 +27,9 @@ class AppType(str, Enum): """ allowed enum values """ - COMPOSE = 'compose' + AppTypeCompose = 'compose' + AppTypeQuadlet = 'quadlet' + AppTypeContainer = 'container' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/application_content.py b/flightctl/models/application_content.py index 28eab69..b3f84c5 100644 --- a/flightctl/models/application_content.py +++ b/flightctl/models/application_content.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/application_env_vars.py b/flightctl/models/application_env_vars.py index 2f90ad9..1db06cc 100644 --- a/flightctl/models/application_env_vars.py +++ b/flightctl/models/application_env_vars.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/application_provider_spec.py b/flightctl/models/application_provider_spec.py index 35a85d8..f76f319 100644 --- a/flightctl/models/application_provider_spec.py +++ b/flightctl/models/application_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,10 +18,12 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from flightctl.models.app_type import AppType from flightctl.models.application_content import ApplicationContent +from flightctl.models.application_resources import ApplicationResources from flightctl.models.application_volume import ApplicationVolume from typing import Optional, Set from typing_extensions import Self @@ -32,11 +34,13 @@ class ApplicationProviderSpec(BaseModel): """ # noqa: E501 env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters.", alias="envVars") name: Optional[StrictStr] = Field(default=None, description="The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace.") - app_type: Optional[AppType] = Field(default=None, alias="appType") + app_type: AppType = Field(alias="appType") volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") - image: StrictStr = Field(description="Reference to the container image for the application package.") + image: StrictStr = Field(description="Reference to the OCI image or artifact for the application package.") + ports: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="Port mappings.") + resources: Optional[ApplicationResources] = None inline: List[ApplicationContent] = Field(description="A list of application content.") - __properties: ClassVar[List[str]] = ["envVars", "name", "appType", "volumes", "image", "inline"] + __properties: ClassVar[List[str]] = ["envVars", "name", "appType", "volumes", "image", "ports", "resources", "inline"] model_config = ConfigDict( populate_by_name=True, @@ -84,6 +88,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_volumes: _items.append(_item_volumes.to_dict()) _dict['volumes'] = _items + # override the default output from pydantic by calling `to_dict()` of resources + if self.resources: + _dict['resources'] = self.resources.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in inline (list) _items = [] if self.inline: @@ -108,6 +115,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "appType": obj.get("appType"), "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, "image": obj.get("image"), + "ports": obj.get("ports"), + "resources": ApplicationResources.from_dict(obj["resources"]) if obj.get("resources") is not None else None, "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None }) return _obj diff --git a/flightctl/models/application_resource_limits.py b/flightctl/models/application_resource_limits.py new file mode 100644 index 0000000..192a9fe --- /dev/null +++ b/flightctl/models/application_resource_limits.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationResourceLimits(BaseModel): + """ + Resource limits for the application. + """ # noqa: E501 + cpu: Optional[StrictStr] = Field(default=None, description="CPU limit in cores. Format restricted based on application type.") + memory: Optional[StrictStr] = Field(default=None, description="Memory limit with optional unit. Format restricted based on application type.") + __properties: ClassVar[List[str]] = ["cpu", "memory"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationResourceLimits from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationResourceLimits from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cpu": obj.get("cpu"), + "memory": obj.get("memory") + }) + return _obj + + diff --git a/flightctl/models/application_resources.py b/flightctl/models/application_resources.py new file mode 100644 index 0000000..772ac6c --- /dev/null +++ b/flightctl/models/application_resources.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.application_resource_limits import ApplicationResourceLimits +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationResources(BaseModel): + """ + Resource constraints for the application. + """ # noqa: E501 + limits: Optional[ApplicationResourceLimits] = None + __properties: ClassVar[List[str]] = ["limits"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicationResources from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of limits + if self.limits: + _dict['limits'] = self.limits.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationResources from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "limits": ApplicationResourceLimits.from_dict(obj["limits"]) if obj.get("limits") is not None else None + }) + return _obj + + diff --git a/flightctl/models/application_status_type.py b/flightctl/models/application_status_type.py index a93903b..9e0b0fb 100644 --- a/flightctl/models/application_status_type.py +++ b/flightctl/models/application_status_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,12 +27,12 @@ class ApplicationStatusType(str, Enum): """ allowed enum values """ - PREPARING = 'Preparing' - STARTING = 'Starting' - RUNNING = 'Running' - ERROR = 'Error' - UNKNOWN = 'Unknown' - COMPLETED = 'Completed' + ApplicationStatusPreparing = 'Preparing' + ApplicationStatusStarting = 'Starting' + ApplicationStatusRunning = 'Running' + ApplicationStatusError = 'Error' + ApplicationStatusUnknown = 'Unknown' + ApplicationStatusCompleted = 'Completed' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/application_volume.py b/flightctl/models/application_volume.py index 3d23dc3..740fade 100644 --- a/flightctl/models/application_volume.py +++ b/flightctl/models/application_volume.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,8 +19,10 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.application_volume_reclaim_policy import ApplicationVolumeReclaimPolicy from flightctl.models.image_volume_source import ImageVolumeSource +from flightctl.models.volume_mount import VolumeMount from typing import Optional, Set from typing_extensions import Self @@ -29,8 +31,10 @@ class ApplicationVolume(BaseModel): ApplicationVolume """ # noqa: E501 name: StrictStr = Field(description="Unique name of the volume used within the application.") + reclaim_policy: Optional[ApplicationVolumeReclaimPolicy] = Field(default=ApplicationVolumeReclaimPolicy.RETAIN, alias="reclaimPolicy") image: ImageVolumeSource - __properties: ClassVar[List[str]] = ["name", "image"] + mount: VolumeMount + __properties: ClassVar[List[str]] = ["name", "reclaimPolicy", "image", "mount"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +78,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of image if self.image: _dict['image'] = self.image.to_dict() + # override the default output from pydantic by calling `to_dict()` of mount + if self.mount: + _dict['mount'] = self.mount.to_dict() return _dict @classmethod @@ -87,7 +94,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name"), - "image": ImageVolumeSource.from_dict(obj["image"]) if obj.get("image") is not None else None + "reclaimPolicy": obj.get("reclaimPolicy") if obj.get("reclaimPolicy") is not None else ApplicationVolumeReclaimPolicy.RETAIN, + "image": ImageVolumeSource.from_dict(obj["image"]) if obj.get("image") is not None else None, + "mount": VolumeMount.from_dict(obj["mount"]) if obj.get("mount") is not None else None }) return _obj diff --git a/flightctl/models/application_volume_provider_spec.py b/flightctl/models/application_volume_provider_spec.py index e1c8f2d..faafe76 100644 --- a/flightctl/models/application_volume_provider_spec.py +++ b/flightctl/models/application_volume_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/application_volume_reclaim_policy.py b/flightctl/models/application_volume_reclaim_policy.py new file mode 100644 index 0000000..506dd57 --- /dev/null +++ b/flightctl/models/application_volume_reclaim_policy.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ApplicationVolumeReclaimPolicy(str, Enum): + """ + Defines how the agent handles a volume when the owning application is removed. + """ + + """ + allowed enum values + """ + RETAIN = 'Retain' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ApplicationVolumeReclaimPolicy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/application_volume_status.py b/flightctl/models/application_volume_status.py index e1d4474..d5d74df 100644 --- a/flightctl/models/application_volume_status.py +++ b/flightctl/models/application_volume_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/applications_summary_status_type.py b/flightctl/models/applications_summary_status_type.py index 53f03c8..fec1196 100644 --- a/flightctl/models/applications_summary_status_type.py +++ b/flightctl/models/applications_summary_status_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,10 +27,11 @@ class ApplicationsSummaryStatusType(str, Enum): """ allowed enum values """ - HEALTHY = 'Healthy' - DEGRADED = 'Degraded' - ERROR = 'Error' - UNKNOWN = 'Unknown' + ApplicationsSummaryStatusHealthy = 'Healthy' + ApplicationsSummaryStatusDegraded = 'Degraded' + ApplicationsSummaryStatusError = 'Error' + ApplicationsSummaryStatusUnknown = 'Unknown' + ApplicationsSummaryStatusNoApplications = 'NoApplications' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/auth_config.py b/flightctl/models/auth_config.py index 67c6cde..12fae25 100644 --- a/flightctl/models/auth_config.py +++ b/flightctl/models/auth_config.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,20 +18,21 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from flightctl.models.auth_organizations_config import AuthOrganizationsConfig +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.auth_provider import AuthProvider from typing import Optional, Set from typing_extensions import Self class AuthConfig(BaseModel): """ - Auth config. + AuthConfig """ # noqa: E501 - auth_type: StrictStr = Field(description="Auth type.", alias="authType") - auth_url: StrictStr = Field(description="Auth URL.", alias="authURL") - auth_organizations_config: AuthOrganizationsConfig = Field(alias="authOrganizationsConfig") - __properties: ClassVar[List[str]] = ["authType", "authURL", "authOrganizationsConfig"] + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + providers: Optional[List[AuthProvider]] = Field(default=None, description="List of all available authentication providers.") + default_provider: Optional[StrictStr] = Field(default=None, description="Name of the default authentication provider.", alias="defaultProvider") + organizations_enabled: Optional[StrictBool] = Field(default=None, description="Whether organizations are enabled for authentication.", alias="organizationsEnabled") + __properties: ClassVar[List[str]] = ["apiVersion", "providers", "defaultProvider", "organizationsEnabled"] model_config = ConfigDict( populate_by_name=True, @@ -72,9 +73,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of auth_organizations_config - if self.auth_organizations_config: - _dict['authOrganizationsConfig'] = self.auth_organizations_config.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in providers (list) + _items = [] + if self.providers: + for _item_providers in self.providers: + if _item_providers: + _items.append(_item_providers.to_dict()) + _dict['providers'] = _items return _dict @classmethod @@ -87,9 +92,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "authType": obj.get("authType"), - "authURL": obj.get("authURL"), - "authOrganizationsConfig": AuthOrganizationsConfig.from_dict(obj["authOrganizationsConfig"]) if obj.get("authOrganizationsConfig") is not None else None + "apiVersion": obj.get("apiVersion"), + "providers": [AuthProvider.from_dict(_item) for _item in obj["providers"]] if obj.get("providers") is not None else None, + "defaultProvider": obj.get("defaultProvider"), + "organizationsEnabled": obj.get("organizationsEnabled") }) return _obj diff --git a/flightctl/models/auth_dynamic_organization_assignment.py b/flightctl/models/auth_dynamic_organization_assignment.py new file mode 100644 index 0000000..c45d1c3 --- /dev/null +++ b/flightctl/models/auth_dynamic_organization_assignment.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuthDynamicOrganizationAssignment(BaseModel): + """ + AuthDynamicOrganizationAssignment assigns users to organizations based on auth provider claims. + """ # noqa: E501 + type: StrictStr = Field(description="The type of organization assignment.") + claim_path: List[StrictStr] = Field(description="The JSON path to the claim that contains the organization identifier (e.g., [\"groups\", \"0\"] or [\"custom\", \"org\"]).", alias="claimPath") + organization_name_prefix: Optional[StrictStr] = Field(default='', description="The prefix for the organization name (e.g., \"org-\").", alias="organizationNamePrefix") + organization_name_suffix: Optional[StrictStr] = Field(default='', description="The suffix for the organization name (e.g., \"-org\").", alias="organizationNameSuffix") + __properties: ClassVar[List[str]] = ["type", "claimPath", "organizationNamePrefix", "organizationNameSuffix"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dynamic']): + raise ValueError("must be one of enum values ('dynamic')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthDynamicOrganizationAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthDynamicOrganizationAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "claimPath": obj.get("claimPath"), + "organizationNamePrefix": obj.get("organizationNamePrefix") if obj.get("organizationNamePrefix") is not None else '', + "organizationNameSuffix": obj.get("organizationNameSuffix") if obj.get("organizationNameSuffix") is not None else '' + }) + return _obj + + diff --git a/flightctl/models/auth_dynamic_role_assignment.py b/flightctl/models/auth_dynamic_role_assignment.py new file mode 100644 index 0000000..5e5ab08 --- /dev/null +++ b/flightctl/models/auth_dynamic_role_assignment.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuthDynamicRoleAssignment(BaseModel): + """ + AuthDynamicRoleAssignment extracts roles from auth provider claims using a JSON path. + """ # noqa: E501 + type: StrictStr = Field(description="The type of role assignment.") + claim_path: List[StrictStr] = Field(description="The JSON path to the role/group claim (e.g., [\"groups\"], [\"roles\"], [\"realm_access\", \"roles\"]).", alias="claimPath") + separator: Optional[StrictStr] = Field(default=':', description="Separator for org:role format (default ':'). Roles containing the separator are split into organization-scoped roles. Roles without separator are global and apply to all organizations.") + __properties: ClassVar[List[str]] = ["type", "claimPath", "separator"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dynamic']): + raise ValueError("must be one of enum values ('dynamic')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthDynamicRoleAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthDynamicRoleAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "claimPath": obj.get("claimPath"), + "separator": obj.get("separator") if obj.get("separator") is not None else ':' + }) + return _obj + + diff --git a/flightctl/models/auth_organization_assignment.py b/flightctl/models/auth_organization_assignment.py new file mode 100644 index 0000000..b6ee302 --- /dev/null +++ b/flightctl/models/auth_organization_assignment.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flightctl.models.auth_dynamic_organization_assignment import AuthDynamicOrganizationAssignment +from flightctl.models.auth_per_user_organization_assignment import AuthPerUserOrganizationAssignment +from flightctl.models.auth_static_organization_assignment import AuthStaticOrganizationAssignment +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AUTHORGANIZATIONASSIGNMENT_ONE_OF_SCHEMAS = ["AuthDynamicOrganizationAssignment", "AuthPerUserOrganizationAssignment", "AuthStaticOrganizationAssignment"] + +class AuthOrganizationAssignment(BaseModel): + """ + AuthOrganizationAssignment defines how users from this auth provider are assigned to organizations. + """ + # data type: AuthStaticOrganizationAssignment + oneof_schema_1_validator: Optional[AuthStaticOrganizationAssignment] = None + # data type: AuthDynamicOrganizationAssignment + oneof_schema_2_validator: Optional[AuthDynamicOrganizationAssignment] = None + # data type: AuthPerUserOrganizationAssignment + oneof_schema_3_validator: Optional[AuthPerUserOrganizationAssignment] = None + actual_instance: Optional[Union[AuthDynamicOrganizationAssignment, AuthPerUserOrganizationAssignment, AuthStaticOrganizationAssignment]] = None + one_of_schemas: Set[str] = { "AuthDynamicOrganizationAssignment", "AuthPerUserOrganizationAssignment", "AuthStaticOrganizationAssignment" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AuthOrganizationAssignment.model_construct() + error_messages = [] + match = 0 + # validate data type: AuthStaticOrganizationAssignment + if not isinstance(v, AuthStaticOrganizationAssignment): + error_messages.append(f"Error! Input type `{type(v)}` is not `AuthStaticOrganizationAssignment`") + else: + match += 1 + # validate data type: AuthDynamicOrganizationAssignment + if not isinstance(v, AuthDynamicOrganizationAssignment): + error_messages.append(f"Error! Input type `{type(v)}` is not `AuthDynamicOrganizationAssignment`") + else: + match += 1 + # validate data type: AuthPerUserOrganizationAssignment + if not isinstance(v, AuthPerUserOrganizationAssignment): + error_messages.append(f"Error! Input type `{type(v)}` is not `AuthPerUserOrganizationAssignment`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AuthOrganizationAssignment with oneOf schemas: AuthDynamicOrganizationAssignment, AuthPerUserOrganizationAssignment, AuthStaticOrganizationAssignment. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AuthOrganizationAssignment with oneOf schemas: AuthDynamicOrganizationAssignment, AuthPerUserOrganizationAssignment, AuthStaticOrganizationAssignment. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `AuthDynamicOrganizationAssignment` + if _data_type == "dynamic": + instance.actual_instance = AuthDynamicOrganizationAssignment.from_json(json_str) + return instance + + # check if data type is `AuthPerUserOrganizationAssignment` + if _data_type == "perUser": + instance.actual_instance = AuthPerUserOrganizationAssignment.from_json(json_str) + return instance + + # check if data type is `AuthStaticOrganizationAssignment` + if _data_type == "static": + instance.actual_instance = AuthStaticOrganizationAssignment.from_json(json_str) + return instance + + # deserialize data into AuthStaticOrganizationAssignment + try: + instance.actual_instance = AuthStaticOrganizationAssignment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AuthDynamicOrganizationAssignment + try: + instance.actual_instance = AuthDynamicOrganizationAssignment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AuthPerUserOrganizationAssignment + try: + instance.actual_instance = AuthPerUserOrganizationAssignment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AuthOrganizationAssignment with oneOf schemas: AuthDynamicOrganizationAssignment, AuthPerUserOrganizationAssignment, AuthStaticOrganizationAssignment. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AuthOrganizationAssignment with oneOf schemas: AuthDynamicOrganizationAssignment, AuthPerUserOrganizationAssignment, AuthStaticOrganizationAssignment. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AuthDynamicOrganizationAssignment, AuthPerUserOrganizationAssignment, AuthStaticOrganizationAssignment]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flightctl/models/auth_per_user_organization_assignment.py b/flightctl/models/auth_per_user_organization_assignment.py new file mode 100644 index 0000000..6f2cb87 --- /dev/null +++ b/flightctl/models/auth_per_user_organization_assignment.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AuthPerUserOrganizationAssignment(BaseModel): + """ + AuthPerUserOrganizationAssignment creates a separate organization for each user. + """ # noqa: E501 + type: StrictStr = Field(description="The type of organization assignment.") + organization_name_prefix: Optional[StrictStr] = Field(default='user-org-', description="The prefix for the user-specific organization name (e.g., \"user-org-\").", alias="organizationNamePrefix") + organization_name_suffix: Optional[StrictStr] = Field(default='', description="The suffix for the user-specific organization name (e.g., \"-org\").", alias="organizationNameSuffix") + __properties: ClassVar[List[str]] = ["type", "organizationNamePrefix", "organizationNameSuffix"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['perUser']): + raise ValueError("must be one of enum values ('perUser')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthPerUserOrganizationAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthPerUserOrganizationAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "organizationNamePrefix": obj.get("organizationNamePrefix") if obj.get("organizationNamePrefix") is not None else 'user-org-', + "organizationNameSuffix": obj.get("organizationNameSuffix") if obj.get("organizationNameSuffix") is not None else '' + }) + return _obj + + diff --git a/flightctl/models/auth_provider.py b/flightctl/models/auth_provider.py new file mode 100644 index 0000000..679b01b --- /dev/null +++ b/flightctl/models/auth_provider.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from flightctl.models.auth_provider_spec import AuthProviderSpec +from flightctl.models.object_meta import ObjectMeta +from typing import Optional, Set +from typing_extensions import Self + +class AuthProvider(BaseModel): + """ + AuthProvider represents an authentication provider configuration supporting both OIDC and OAuth2. + """ # noqa: E501 + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") + metadata: ObjectMeta + spec: AuthProviderSpec + __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "spec"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthProvider from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of spec + if self.spec: + _dict['spec'] = self.spec.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthProvider from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiVersion": obj.get("apiVersion"), + "kind": obj.get("kind"), + "metadata": ObjectMeta.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "spec": AuthProviderSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None + }) + return _obj + + diff --git a/flightctl/models/auth_provider_list.py b/flightctl/models/auth_provider_list.py new file mode 100644 index 0000000..d6d307d --- /dev/null +++ b/flightctl/models/auth_provider_list.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from flightctl.models.auth_provider import AuthProvider +from flightctl.models.list_meta import ListMeta +from typing import Optional, Set +from typing_extensions import Self + +class AuthProviderList(BaseModel): + """ + AuthProviderList is a list of auth providers. + """ # noqa: E501 + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") + metadata: ListMeta + items: List[AuthProvider] = Field(description="List of auth providers.") + __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthProviderList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of metadata + if self.metadata: + _dict['metadata'] = self.metadata.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthProviderList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "apiVersion": obj.get("apiVersion"), + "kind": obj.get("kind"), + "metadata": ListMeta.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "items": [AuthProvider.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj + + diff --git a/flightctl/models/auth_provider_spec.py b/flightctl/models/auth_provider_spec.py new file mode 100644 index 0000000..70fbf57 --- /dev/null +++ b/flightctl/models/auth_provider_spec.py @@ -0,0 +1,213 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flightctl.models.aap_provider_spec import AapProviderSpec +from flightctl.models.k8s_provider_spec import K8sProviderSpec +from flightctl.models.o_auth2_provider_spec import OAuth2ProviderSpec +from flightctl.models.oidc_provider_spec import OIDCProviderSpec +from flightctl.models.open_shift_provider_spec import OpenShiftProviderSpec +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AUTHPROVIDERSPEC_ONE_OF_SCHEMAS = ["AapProviderSpec", "K8sProviderSpec", "OAuth2ProviderSpec", "OIDCProviderSpec", "OpenShiftProviderSpec"] + +class AuthProviderSpec(BaseModel): + """ + AuthProviderSpec + """ + # data type: OIDCProviderSpec + oneof_schema_1_validator: Optional[OIDCProviderSpec] = None + # data type: OAuth2ProviderSpec + oneof_schema_2_validator: Optional[OAuth2ProviderSpec] = None + # data type: OpenShiftProviderSpec + oneof_schema_3_validator: Optional[OpenShiftProviderSpec] = None + # data type: AapProviderSpec + oneof_schema_4_validator: Optional[AapProviderSpec] = None + # data type: K8sProviderSpec + oneof_schema_5_validator: Optional[K8sProviderSpec] = None + actual_instance: Optional[Union[AapProviderSpec, K8sProviderSpec, OAuth2ProviderSpec, OIDCProviderSpec, OpenShiftProviderSpec]] = None + one_of_schemas: Set[str] = { "AapProviderSpec", "K8sProviderSpec", "OAuth2ProviderSpec", "OIDCProviderSpec", "OpenShiftProviderSpec" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AuthProviderSpec.model_construct() + error_messages = [] + match = 0 + # validate data type: OIDCProviderSpec + if not isinstance(v, OIDCProviderSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `OIDCProviderSpec`") + else: + match += 1 + # validate data type: OAuth2ProviderSpec + if not isinstance(v, OAuth2ProviderSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `OAuth2ProviderSpec`") + else: + match += 1 + # validate data type: OpenShiftProviderSpec + if not isinstance(v, OpenShiftProviderSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `OpenShiftProviderSpec`") + else: + match += 1 + # validate data type: AapProviderSpec + if not isinstance(v, AapProviderSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `AapProviderSpec`") + else: + match += 1 + # validate data type: K8sProviderSpec + if not isinstance(v, K8sProviderSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `K8sProviderSpec`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AuthProviderSpec with oneOf schemas: AapProviderSpec, K8sProviderSpec, OAuth2ProviderSpec, OIDCProviderSpec, OpenShiftProviderSpec. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AuthProviderSpec with oneOf schemas: AapProviderSpec, K8sProviderSpec, OAuth2ProviderSpec, OIDCProviderSpec, OpenShiftProviderSpec. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("providerType") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `providerType` in the input.") + + # check if data type is `AapProviderSpec` + if _data_type == "aap": + instance.actual_instance = AapProviderSpec.from_json(json_str) + return instance + + # check if data type is `K8sProviderSpec` + if _data_type == "k8s": + instance.actual_instance = K8sProviderSpec.from_json(json_str) + return instance + + # check if data type is `OAuth2ProviderSpec` + if _data_type == "oauth2": + instance.actual_instance = OAuth2ProviderSpec.from_json(json_str) + return instance + + # check if data type is `OIDCProviderSpec` + if _data_type == "oidc": + instance.actual_instance = OIDCProviderSpec.from_json(json_str) + return instance + + # check if data type is `OpenShiftProviderSpec` + if _data_type == "openshift": + instance.actual_instance = OpenShiftProviderSpec.from_json(json_str) + return instance + + # deserialize data into OIDCProviderSpec + try: + instance.actual_instance = OIDCProviderSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OAuth2ProviderSpec + try: + instance.actual_instance = OAuth2ProviderSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into OpenShiftProviderSpec + try: + instance.actual_instance = OpenShiftProviderSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AapProviderSpec + try: + instance.actual_instance = AapProviderSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into K8sProviderSpec + try: + instance.actual_instance = K8sProviderSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AuthProviderSpec with oneOf schemas: AapProviderSpec, K8sProviderSpec, OAuth2ProviderSpec, OIDCProviderSpec, OpenShiftProviderSpec. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AuthProviderSpec with oneOf schemas: AapProviderSpec, K8sProviderSpec, OAuth2ProviderSpec, OIDCProviderSpec, OpenShiftProviderSpec. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AapProviderSpec, K8sProviderSpec, OAuth2ProviderSpec, OIDCProviderSpec, OpenShiftProviderSpec]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flightctl/models/auth_role_assignment.py b/flightctl/models/auth_role_assignment.py new file mode 100644 index 0000000..b78fb95 --- /dev/null +++ b/flightctl/models/auth_role_assignment.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flightctl.models.auth_dynamic_role_assignment import AuthDynamicRoleAssignment +from flightctl.models.auth_static_role_assignment import AuthStaticRoleAssignment +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +AUTHROLEASSIGNMENT_ONE_OF_SCHEMAS = ["AuthDynamicRoleAssignment", "AuthStaticRoleAssignment"] + +class AuthRoleAssignment(BaseModel): + """ + AuthRoleAssignment defines how roles are assigned to users from this auth provider. + """ + # data type: AuthStaticRoleAssignment + oneof_schema_1_validator: Optional[AuthStaticRoleAssignment] = None + # data type: AuthDynamicRoleAssignment + oneof_schema_2_validator: Optional[AuthDynamicRoleAssignment] = None + actual_instance: Optional[Union[AuthDynamicRoleAssignment, AuthStaticRoleAssignment]] = None + one_of_schemas: Set[str] = { "AuthDynamicRoleAssignment", "AuthStaticRoleAssignment" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = AuthRoleAssignment.model_construct() + error_messages = [] + match = 0 + # validate data type: AuthStaticRoleAssignment + if not isinstance(v, AuthStaticRoleAssignment): + error_messages.append(f"Error! Input type `{type(v)}` is not `AuthStaticRoleAssignment`") + else: + match += 1 + # validate data type: AuthDynamicRoleAssignment + if not isinstance(v, AuthDynamicRoleAssignment): + error_messages.append(f"Error! Input type `{type(v)}` is not `AuthDynamicRoleAssignment`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in AuthRoleAssignment with oneOf schemas: AuthDynamicRoleAssignment, AuthStaticRoleAssignment. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in AuthRoleAssignment with oneOf schemas: AuthDynamicRoleAssignment, AuthStaticRoleAssignment. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `AuthDynamicRoleAssignment` + if _data_type == "dynamic": + instance.actual_instance = AuthDynamicRoleAssignment.from_json(json_str) + return instance + + # check if data type is `AuthStaticRoleAssignment` + if _data_type == "static": + instance.actual_instance = AuthStaticRoleAssignment.from_json(json_str) + return instance + + # deserialize data into AuthStaticRoleAssignment + try: + instance.actual_instance = AuthStaticRoleAssignment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into AuthDynamicRoleAssignment + try: + instance.actual_instance = AuthDynamicRoleAssignment.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into AuthRoleAssignment with oneOf schemas: AuthDynamicRoleAssignment, AuthStaticRoleAssignment. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into AuthRoleAssignment with oneOf schemas: AuthDynamicRoleAssignment, AuthStaticRoleAssignment. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], AuthDynamicRoleAssignment, AuthStaticRoleAssignment]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flightctl/models/auth_static_organization_assignment.py b/flightctl/models/auth_static_organization_assignment.py new file mode 100644 index 0000000..9105dd4 --- /dev/null +++ b/flightctl/models/auth_static_organization_assignment.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AuthStaticOrganizationAssignment(BaseModel): + """ + AuthStaticOrganizationAssignment assigns all users from this auth provider to a single static organization. + """ # noqa: E501 + type: StrictStr = Field(description="The type of organization assignment.") + organization_name: StrictStr = Field(description="The name of the organization where all users will be assigned.", alias="organizationName") + __properties: ClassVar[List[str]] = ["type", "organizationName"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['static']): + raise ValueError("must be one of enum values ('static')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthStaticOrganizationAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthStaticOrganizationAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "organizationName": obj.get("organizationName") + }) + return _obj + + diff --git a/flightctl/models/auth_static_role_assignment.py b/flightctl/models/auth_static_role_assignment.py new file mode 100644 index 0000000..65d2b95 --- /dev/null +++ b/flightctl/models/auth_static_role_assignment.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AuthStaticRoleAssignment(BaseModel): + """ + AuthStaticRoleAssignment assigns a static set of roles to all users from this auth provider. + """ # noqa: E501 + type: StrictStr = Field(description="The type of role assignment.") + roles: List[StrictStr] = Field(description="The list of role names to assign to all users.") + __properties: ClassVar[List[str]] = ["type", "roles"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['static']): + raise ValueError("must be one of enum values ('static')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AuthStaticRoleAssignment from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AuthStaticRoleAssignment from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "roles": obj.get("roles") + }) + return _obj + + diff --git a/flightctl/models/batch.py b/flightctl/models/batch.py index 86f26d7..0af7825 100644 --- a/flightctl/models/batch.py +++ b/flightctl/models/batch.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/batch_limit.py b/flightctl/models/batch_limit.py index 517a2d8..0dbf086 100644 --- a/flightctl/models/batch_limit.py +++ b/flightctl/models/batch_limit.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/batch_sequence.py b/flightctl/models/batch_sequence.py index 4ca81ed..f5721c1 100644 --- a/flightctl/models/batch_sequence.py +++ b/flightctl/models/batch_sequence.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/certificate_signing_request.py b/flightctl/models/certificate_signing_request.py index c3ece1c..2e3aa6e 100644 --- a/flightctl/models/certificate_signing_request.py +++ b/flightctl/models/certificate_signing_request.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/certificate_signing_request_list.py b/flightctl/models/certificate_signing_request_list.py index 08c53df..e07e9bd 100644 --- a/flightctl/models/certificate_signing_request_list.py +++ b/flightctl/models/certificate_signing_request_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/certificate_signing_request_spec.py b/flightctl/models/certificate_signing_request_spec.py index 6ee2c70..ec20bcc 100644 --- a/flightctl/models/certificate_signing_request_spec.py +++ b/flightctl/models/certificate_signing_request_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/certificate_signing_request_status.py b/flightctl/models/certificate_signing_request_status.py index cbc02d8..55f795d 100644 --- a/flightctl/models/certificate_signing_request_status.py +++ b/flightctl/models/certificate_signing_request_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/condition.py b/flightctl/models/condition.py index 9765470..0c9b6d6 100644 --- a/flightctl/models/condition.py +++ b/flightctl/models/condition.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/condition_status.py b/flightctl/models/condition_status.py index 56119c4..4761ef3 100644 --- a/flightctl/models/condition_status.py +++ b/flightctl/models/condition_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,9 +27,9 @@ class ConditionStatus(str, Enum): """ allowed enum values """ - TRUE = 'True' - FALSE = 'False' - UNKNOWN = 'Unknown' + ConditionStatusTrue = 'True' + ConditionStatusFalse = 'False' + ConditionStatusUnknown = 'Unknown' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/condition_type.py b/flightctl/models/condition_type.py index 5be5093..c49b4d7 100644 --- a/flightctl/models/condition_type.py +++ b/flightctl/models/condition_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,19 +27,22 @@ class ConditionType(str, Enum): """ allowed enum values """ - APPROVED = 'Approved' - TPMVERIFIED = 'TPMVerified' - DENIED = 'Denied' - FAILED = 'Failed' - ACCESSIBLE = 'Accessible' - RESOURCEPARSED = 'ResourceParsed' - SYNCED = 'Synced' - VALID = 'Valid' - ROLLOUTINPROGRESS = 'RolloutInProgress' - UPDATING = 'Updating' - SPECVALID = 'SpecValid' - MULTIPLEOWNERS = 'MultipleOwners' - DEVICEDECOMMISSIONING = 'DeviceDecommissioning' + EnrollmentRequestApproved = 'Approved' + EnrollmentRequestTPMVerified = 'TPMVerified' + CertificateSigningRequestApproved = 'Approved' + CertificateSigningRequestDenied = 'Denied' + CertificateSigningRequestFailed = 'Failed' + CertificateSigningRequestTPMVerified = 'TPMVerified' + RepositoryAccessible = 'Accessible' + ResourceSyncAccessible = 'Accessible' + ResourceSyncResourceParsed = 'ResourceParsed' + ResourceSyncSynced = 'Synced' + FleetValid = 'Valid' + FleetRolloutInProgress = 'RolloutInProgress' + DeviceUpdating = 'Updating' + DeviceSpecValid = 'SpecValid' + DeviceMultipleOwners = 'MultipleOwners' + DeviceDecommissioning = 'DeviceDecommissioning' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/config_provider_spec.py b/flightctl/models/config_provider_spec.py index b8deaae..dc69de7 100644 --- a/flightctl/models/config_provider_spec.py +++ b/flightctl/models/config_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/cpu_resource_monitor_spec.py b/flightctl/models/cpu_resource_monitor_spec.py index 0d2348b..cd322d7 100644 --- a/flightctl/models/cpu_resource_monitor_spec.py +++ b/flightctl/models/cpu_resource_monitor_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device.py b/flightctl/models/device.py index faefe38..045de82 100644 --- a/flightctl/models/device.py +++ b/flightctl/models/device.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_application_status.py b/flightctl/models/device_application_status.py index 71ef477..7af81b3 100644 --- a/flightctl/models/device_application_status.py +++ b/flightctl/models/device_application_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,8 +18,9 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.app_type import AppType from flightctl.models.application_status_type import ApplicationStatusType from flightctl.models.application_volume_status import ApplicationVolumeStatus from typing import Optional, Set @@ -33,8 +34,10 @@ class DeviceApplicationStatus(BaseModel): ready: StrictStr = Field(description="The number of containers which are ready in the application.") restarts: StrictInt = Field(description="Number of restarts observed for the application.") status: ApplicationStatusType + embedded: StrictBool = Field(description="Whether the application is embedded in the bootc image.") + app_type: AppType = Field(alias="appType") volumes: Optional[List[ApplicationVolumeStatus]] = Field(default=None, description="Status of volumes used by this application.") - __properties: ClassVar[List[str]] = ["name", "ready", "restarts", "status", "volumes"] + __properties: ClassVar[List[str]] = ["name", "ready", "restarts", "status", "embedded", "appType", "volumes"] model_config = ConfigDict( populate_by_name=True, @@ -98,6 +101,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ready": obj.get("ready"), "restarts": obj.get("restarts"), "status": obj.get("status"), + "embedded": obj.get("embedded"), + "appType": obj.get("appType"), "volumes": [ApplicationVolumeStatus.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None }) return _obj diff --git a/flightctl/models/device_applications_summary_status.py b/flightctl/models/device_applications_summary_status.py index c33f013..ed6548c 100644 --- a/flightctl/models/device_applications_summary_status.py +++ b/flightctl/models/device_applications_summary_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_config_status.py b/flightctl/models/device_config_status.py index c21a3a5..7f2a5f5 100644 --- a/flightctl/models/device_config_status.py +++ b/flightctl/models/device_config_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_console.py b/flightctl/models/device_console.py index 959d9d2..8a7b413 100644 --- a/flightctl/models/device_console.py +++ b/flightctl/models/device_console.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_decommission.py b/flightctl/models/device_decommission.py index e280a1e..aadbcb4 100644 --- a/flightctl/models/device_decommission.py +++ b/flightctl/models/device_decommission.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_decommission_target_type.py b/flightctl/models/device_decommission_target_type.py index 18df809..d91ea33 100644 --- a/flightctl/models/device_decommission_target_type.py +++ b/flightctl/models/device_decommission_target_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,8 +27,8 @@ class DeviceDecommissionTargetType(str, Enum): """ allowed enum values """ - UNENROLL = 'Unenroll' - FACTORYRESET = 'FactoryReset' + DeviceDecommissionTargetTypeUnenroll = 'Unenroll' + DeviceDecommissionTargetTypeFactoryReset = 'FactoryReset' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_integrity_check_status.py b/flightctl/models/device_integrity_check_status.py index 350a814..1c2a7bb 100644 --- a/flightctl/models/device_integrity_check_status.py +++ b/flightctl/models/device_integrity_check_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_integrity_check_status_type.py b/flightctl/models/device_integrity_check_status_type.py index ce19005..7691c84 100644 --- a/flightctl/models/device_integrity_check_status_type.py +++ b/flightctl/models/device_integrity_check_status_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,10 +27,10 @@ class DeviceIntegrityCheckStatusType(str, Enum): """ allowed enum values """ - UNKNOWN = 'Unknown' - UNSUPPORTED = 'Unsupported' - FAILED = 'Failed' - VERIFIED = 'Verified' + DeviceIntegrityCheckStatusUnknown = 'Unknown' + DeviceIntegrityCheckStatusUnsupported = 'Unsupported' + DeviceIntegrityCheckStatusFailed = 'Failed' + DeviceIntegrityCheckStatusVerified = 'Verified' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_integrity_status.py b/flightctl/models/device_integrity_status.py index 6dbfa57..2e8d1c3 100644 --- a/flightctl/models/device_integrity_status.py +++ b/flightctl/models/device_integrity_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_integrity_status_summary_type.py b/flightctl/models/device_integrity_status_summary_type.py index ccd7ac1..92f1c74 100644 --- a/flightctl/models/device_integrity_status_summary_type.py +++ b/flightctl/models/device_integrity_status_summary_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,10 +27,10 @@ class DeviceIntegrityStatusSummaryType(str, Enum): """ allowed enum values """ - VERIFIED = 'Verified' - FAILED = 'Failed' - UNKNOWN = 'Unknown' - UNSUPPORTED = 'Unsupported' + DeviceIntegrityStatusVerified = 'Verified' + DeviceIntegrityStatusFailed = 'Failed' + DeviceIntegrityStatusUnknown = 'Unknown' + DeviceIntegrityStatusUnsupported = 'Unsupported' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_last_seen.py b/flightctl/models/device_last_seen.py index b9fce2a..9f1c6ad 100644 --- a/flightctl/models/device_last_seen.py +++ b/flightctl/models/device_last_seen.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_lifecycle_hook_type.py b/flightctl/models/device_lifecycle_hook_type.py index 37bd847..d514534 100644 --- a/flightctl/models/device_lifecycle_hook_type.py +++ b/flightctl/models/device_lifecycle_hook_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,10 +27,10 @@ class DeviceLifecycleHookType(str, Enum): """ allowed enum values """ - BEFOREUPDATING = 'BeforeUpdating' - AFTERUPDATING = 'AfterUpdating' - BEFOREREBOOTING = 'BeforeRebooting' - AFTERREBOOTING = 'AfterRebooting' + DeviceLifecycleHookBeforeUpdating = 'BeforeUpdating' + DeviceLifecycleHookAfterUpdating = 'AfterUpdating' + DeviceLifecycleHookBeforeRebooting = 'BeforeRebooting' + DeviceLifecycleHookAfterRebooting = 'AfterRebooting' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_lifecycle_status.py b/flightctl/models/device_lifecycle_status.py index 276013c..34ec8dd 100644 --- a/flightctl/models/device_lifecycle_status.py +++ b/flightctl/models/device_lifecycle_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_lifecycle_status_type.py b/flightctl/models/device_lifecycle_status_type.py index f5292be..01e0dce 100644 --- a/flightctl/models/device_lifecycle_status_type.py +++ b/flightctl/models/device_lifecycle_status_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,10 +27,10 @@ class DeviceLifecycleStatusType(str, Enum): """ allowed enum values """ - UNKNOWN = 'Unknown' - ENROLLED = 'Enrolled' - DECOMMISSIONING = 'Decommissioning' - DECOMMISSIONED = 'Decommissioned' + DeviceLifecycleStatusUnknown = 'Unknown' + DeviceLifecycleStatusEnrolled = 'Enrolled' + DeviceLifecycleStatusDecommissioning = 'Decommissioning' + DeviceLifecycleStatusDecommissioned = 'Decommissioned' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_list.py b/flightctl/models/device_list.py index e1deeb1..fc38e2e 100644 --- a/flightctl/models/device_list.py +++ b/flightctl/models/device_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_multiple_owners_detected_details.py b/flightctl/models/device_multiple_owners_detected_details.py index 006995c..c22993f 100644 --- a/flightctl/models/device_multiple_owners_detected_details.py +++ b/flightctl/models/device_multiple_owners_detected_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_multiple_owners_resolved_details.py b/flightctl/models/device_multiple_owners_resolved_details.py index cbb5aad..86c68ea 100644 --- a/flightctl/models/device_multiple_owners_resolved_details.py +++ b/flightctl/models/device_multiple_owners_resolved_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_os_spec.py b/flightctl/models/device_os_spec.py index be58a2e..f509ef6 100644 --- a/flightctl/models/device_os_spec.py +++ b/flightctl/models/device_os_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_os_status.py b/flightctl/models/device_os_status.py index 80f18dd..5721d1e 100644 --- a/flightctl/models/device_os_status.py +++ b/flightctl/models/device_os_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_ownership_changed_details.py b/flightctl/models/device_ownership_changed_details.py index 5e6b890..ac1fdaa 100644 --- a/flightctl/models/device_ownership_changed_details.py +++ b/flightctl/models/device_ownership_changed_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_resource_status.py b/flightctl/models/device_resource_status.py index ea1ad97..8721690 100644 --- a/flightctl/models/device_resource_status.py +++ b/flightctl/models/device_resource_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_resource_status_type.py b/flightctl/models/device_resource_status_type.py index 23f5ee2..d13cf99 100644 --- a/flightctl/models/device_resource_status_type.py +++ b/flightctl/models/device_resource_status_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,11 +27,11 @@ class DeviceResourceStatusType(str, Enum): """ allowed enum values """ - HEALTHY = 'Healthy' - WARNING = 'Warning' - CRITICAL = 'Critical' - ERROR = 'Error' - UNKNOWN = 'Unknown' + DeviceResourceStatusHealthy = 'Healthy' + DeviceResourceStatusWarning = 'Warning' + DeviceResourceStatusCritical = 'Critical' + DeviceResourceStatusError = 'Error' + DeviceResourceStatusUnknown = 'Unknown' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_resume_request.py b/flightctl/models/device_resume_request.py index cfe822a..1fdbf89 100644 --- a/flightctl/models/device_resume_request.py +++ b/flightctl/models/device_resume_request.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_resume_response.py b/flightctl/models/device_resume_response.py index d27a3c5..1f7494f 100644 --- a/flightctl/models/device_resume_response.py +++ b/flightctl/models/device_resume_response.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_spec.py b/flightctl/models/device_spec.py index e3c99b3..3e27a39 100644 --- a/flightctl/models/device_spec.py +++ b/flightctl/models/device_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_spec_systemd.py b/flightctl/models/device_spec_systemd.py index 3ec97f0..10c24f6 100644 --- a/flightctl/models/device_spec_systemd.py +++ b/flightctl/models/device_spec_systemd.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_status.py b/flightctl/models/device_status.py index 34dfe32..9d23dd5 100644 --- a/flightctl/models/device_status.py +++ b/flightctl/models/device_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,6 +32,7 @@ from flightctl.models.device_summary_status import DeviceSummaryStatus from flightctl.models.device_system_info import DeviceSystemInfo from flightctl.models.device_updated_status import DeviceUpdatedStatus +from flightctl.models.systemd_unit_status import SystemdUnitStatus from typing import Optional, Set from typing_extensions import Self @@ -41,7 +42,8 @@ class DeviceStatus(BaseModel): """ # noqa: E501 conditions: List[Condition] = Field(description="Conditions represent the observations of a the current state of a device.") system_info: DeviceSystemInfo = Field(alias="systemInfo") - applications: List[DeviceApplicationStatus] = Field(description="List of device application status.") + systemd: Optional[List[SystemdUnitStatus]] = Field(default=None, description="List of systemd unit statuses.") + applications: List[DeviceApplicationStatus] = Field(description="List of device application statuses.") applications_summary: DeviceApplicationsSummaryStatus = Field(alias="applicationsSummary") resources: DeviceResourceStatus integrity: DeviceIntegrityStatus @@ -51,7 +53,7 @@ class DeviceStatus(BaseModel): summary: DeviceSummaryStatus last_seen: Optional[datetime] = Field(default=None, description="The last time the device was seen by the service (NOTE: this property is not returned by the API).", alias="lastSeen") lifecycle: DeviceLifecycleStatus - __properties: ClassVar[List[str]] = ["conditions", "systemInfo", "applications", "applicationsSummary", "resources", "integrity", "config", "os", "updated", "summary", "lastSeen", "lifecycle"] + __properties: ClassVar[List[str]] = ["conditions", "systemInfo", "systemd", "applications", "applicationsSummary", "resources", "integrity", "config", "os", "updated", "summary", "lastSeen", "lifecycle"] model_config = ConfigDict( populate_by_name=True, @@ -102,6 +104,13 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of system_info if self.system_info: _dict['systemInfo'] = self.system_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in systemd (list) + _items = [] + if self.systemd: + for _item_systemd in self.systemd: + if _item_systemd: + _items.append(_item_systemd.to_dict()) + _dict['systemd'] = _items # override the default output from pydantic by calling `to_dict()` of each item in applications (list) _items = [] if self.applications: @@ -147,6 +156,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, "systemInfo": DeviceSystemInfo.from_dict(obj["systemInfo"]) if obj.get("systemInfo") is not None else None, + "systemd": [SystemdUnitStatus.from_dict(_item) for _item in obj["systemd"]] if obj.get("systemd") is not None else None, "applications": [DeviceApplicationStatus.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None, "applicationsSummary": DeviceApplicationsSummaryStatus.from_dict(obj["applicationsSummary"]) if obj.get("applicationsSummary") is not None else None, "resources": DeviceResourceStatus.from_dict(obj["resources"]) if obj.get("resources") is not None else None, diff --git a/flightctl/models/device_summary_status.py b/flightctl/models/device_summary_status.py index 7215744..bf1b7d0 100644 --- a/flightctl/models/device_summary_status.py +++ b/flightctl/models/device_summary_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_summary_status_type.py b/flightctl/models/device_summary_status_type.py index afb2d2f..69ade6d 100644 --- a/flightctl/models/device_summary_status_type.py +++ b/flightctl/models/device_summary_status_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,14 +27,14 @@ class DeviceSummaryStatusType(str, Enum): """ allowed enum values """ - ONLINE = 'Online' - DEGRADED = 'Degraded' - ERROR = 'Error' - REBOOTING = 'Rebooting' - POWEREDOFF = 'PoweredOff' - UNKNOWN = 'Unknown' - AWAITINGRECONNECT = 'AwaitingReconnect' - CONFLICTPAUSED = 'ConflictPaused' + DeviceSummaryStatusOnline = 'Online' + DeviceSummaryStatusDegraded = 'Degraded' + DeviceSummaryStatusError = 'Error' + DeviceSummaryStatusRebooting = 'Rebooting' + DeviceSummaryStatusPoweredOff = 'PoweredOff' + DeviceSummaryStatusUnknown = 'Unknown' + DeviceSummaryStatusAwaitingReconnect = 'AwaitingReconnect' + DeviceSummaryStatusConflictPaused = 'ConflictPaused' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_system_info.py b/flightctl/models/device_system_info.py index 1abb827..46b03f3 100644 --- a/flightctl/models/device_system_info.py +++ b/flightctl/models/device_system_info.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_update_policy_spec.py b/flightctl/models/device_update_policy_spec.py index 3255bd5..02593bf 100644 --- a/flightctl/models/device_update_policy_spec.py +++ b/flightctl/models/device_update_policy_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_updated_status.py b/flightctl/models/device_updated_status.py index 78895b0..d1e8aec 100644 --- a/flightctl/models/device_updated_status.py +++ b/flightctl/models/device_updated_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/device_updated_status_type.py b/flightctl/models/device_updated_status_type.py index 9bb5cab..811a403 100644 --- a/flightctl/models/device_updated_status_type.py +++ b/flightctl/models/device_updated_status_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,10 +27,10 @@ class DeviceUpdatedStatusType(str, Enum): """ allowed enum values """ - UPTODATE = 'UpToDate' - OUTOFDATE = 'OutOfDate' - UPDATING = 'Updating' - UNKNOWN = 'Unknown' + DeviceUpdatedStatusUpToDate = 'UpToDate' + DeviceUpdatedStatusOutOfDate = 'OutOfDate' + DeviceUpdatedStatusUpdating = 'Updating' + DeviceUpdatedStatusUnknown = 'Unknown' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/devices_summary.py b/flightctl/models/devices_summary.py index eb5098d..f29f1ec 100644 --- a/flightctl/models/devices_summary.py +++ b/flightctl/models/devices_summary.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/disk_resource_monitor_spec.py b/flightctl/models/disk_resource_monitor_spec.py index 61ebc5c..47edf14 100644 --- a/flightctl/models/disk_resource_monitor_spec.py +++ b/flightctl/models/disk_resource_monitor_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/disruption_budget.py b/flightctl/models/disruption_budget.py index 494a375..82d5c9a 100644 --- a/flightctl/models/disruption_budget.py +++ b/flightctl/models/disruption_budget.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/encoding_type.py b/flightctl/models/encoding_type.py index d8fe351..1cdc2e2 100644 --- a/flightctl/models/encoding_type.py +++ b/flightctl/models/encoding_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,8 +27,8 @@ class EncodingType(str, Enum): """ allowed enum values """ - PLAIN = 'plain' - BASE64 = 'base64' + EncodingPlain = 'plain' + EncodingBase64 = 'base64' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/enrollment_config.py b/flightctl/models/enrollment_config.py index aa7687f..f15e329 100644 --- a/flightctl/models/enrollment_config.py +++ b/flightctl/models/enrollment_config.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_request.py b/flightctl/models/enrollment_request.py index f4daf60..b6f4c4f 100644 --- a/flightctl/models/enrollment_request.py +++ b/flightctl/models/enrollment_request.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_request_approval.py b/flightctl/models/enrollment_request_approval.py index 2a62d08..c8759db 100644 --- a/flightctl/models/enrollment_request_approval.py +++ b/flightctl/models/enrollment_request_approval.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_request_approval_status.py b/flightctl/models/enrollment_request_approval_status.py index 5ac4484..432db68 100644 --- a/flightctl/models/enrollment_request_approval_status.py +++ b/flightctl/models/enrollment_request_approval_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_request_list.py b/flightctl/models/enrollment_request_list.py index 0ee0d76..76bcb9a 100644 --- a/flightctl/models/enrollment_request_list.py +++ b/flightctl/models/enrollment_request_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_request_spec.py b/flightctl/models/enrollment_request_spec.py index 3ad2f2d..cb36e69 100644 --- a/flightctl/models/enrollment_request_spec.py +++ b/flightctl/models/enrollment_request_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -31,7 +31,8 @@ class EnrollmentRequestSpec(BaseModel): csr: StrictStr = Field(description="The PEM-encoded PKCS#10 certificate signing request.") device_status: Optional[DeviceStatus] = Field(default=None, alias="deviceStatus") labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A set of labels that the service will apply to this device when its enrollment is approved.") - __properties: ClassVar[List[str]] = ["csr", "deviceStatus", "labels"] + known_rendered_version: Optional[StrictStr] = Field(default=None, description="The rendered version of the device from desired.json (optional).", alias="knownRenderedVersion") + __properties: ClassVar[List[str]] = ["csr", "deviceStatus", "labels", "knownRenderedVersion"] model_config = ConfigDict( populate_by_name=True, @@ -89,7 +90,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "csr": obj.get("csr"), "deviceStatus": DeviceStatus.from_dict(obj["deviceStatus"]) if obj.get("deviceStatus") is not None else None, - "labels": obj.get("labels") + "labels": obj.get("labels"), + "knownRenderedVersion": obj.get("knownRenderedVersion") }) return _obj diff --git a/flightctl/models/enrollment_request_status.py b/flightctl/models/enrollment_request_status.py index 6a1f73f..ec503e2 100644 --- a/flightctl/models/enrollment_request_status.py +++ b/flightctl/models/enrollment_request_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_service.py b/flightctl/models/enrollment_service.py index 8b9dd93..df53031 100644 --- a/flightctl/models/enrollment_service.py +++ b/flightctl/models/enrollment_service.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_service_auth.py b/flightctl/models/enrollment_service_auth.py index 0f83b21..788a5a8 100644 --- a/flightctl/models/enrollment_service_auth.py +++ b/flightctl/models/enrollment_service_auth.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/enrollment_service_service.py b/flightctl/models/enrollment_service_service.py index 2b34fe6..7e9921b 100644 --- a/flightctl/models/enrollment_service_service.py +++ b/flightctl/models/enrollment_service_service.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/event.py b/flightctl/models/event.py index ca014f1..88ec25b 100644 --- a/flightctl/models/event.py +++ b/flightctl/models/event.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/event_details.py b/flightctl/models/event_details.py index c74dc2f..afdf9c1 100644 --- a/flightctl/models/event_details.py +++ b/flightctl/models/event_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -260,76 +260,6 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = ResourceUpdatedDetails.from_json(json_str) return instance - # check if data type is `DeviceMultipleOwnersDetectedDetails` - if _data_type == "DeviceMultipleOwnersDetectedDetails": - instance.actual_instance = DeviceMultipleOwnersDetectedDetails.from_json(json_str) - return instance - - # check if data type is `DeviceMultipleOwnersResolvedDetails` - if _data_type == "DeviceMultipleOwnersResolvedDetails": - instance.actual_instance = DeviceMultipleOwnersResolvedDetails.from_json(json_str) - return instance - - # check if data type is `DeviceOwnershipChangedDetails` - if _data_type == "DeviceOwnershipChangedDetails": - instance.actual_instance = DeviceOwnershipChangedDetails.from_json(json_str) - return instance - - # check if data type is `FleetRolloutBatchCompletedDetails` - if _data_type == "FleetRolloutBatchCompletedDetails": - instance.actual_instance = FleetRolloutBatchCompletedDetails.from_json(json_str) - return instance - - # check if data type is `FleetRolloutBatchDispatchedDetails` - if _data_type == "FleetRolloutBatchDispatchedDetails": - instance.actual_instance = FleetRolloutBatchDispatchedDetails.from_json(json_str) - return instance - - # check if data type is `FleetRolloutCompletedDetails` - if _data_type == "FleetRolloutCompletedDetails": - instance.actual_instance = FleetRolloutCompletedDetails.from_json(json_str) - return instance - - # check if data type is `FleetRolloutDeviceSelectedDetails` - if _data_type == "FleetRolloutDeviceSelectedDetails": - instance.actual_instance = FleetRolloutDeviceSelectedDetails.from_json(json_str) - return instance - - # check if data type is `FleetRolloutFailedDetails` - if _data_type == "FleetRolloutFailedDetails": - instance.actual_instance = FleetRolloutFailedDetails.from_json(json_str) - return instance - - # check if data type is `FleetRolloutStartedDetails` - if _data_type == "FleetRolloutStartedDetails": - instance.actual_instance = FleetRolloutStartedDetails.from_json(json_str) - return instance - - # check if data type is `InternalTaskFailedDetails` - if _data_type == "InternalTaskFailedDetails": - instance.actual_instance = InternalTaskFailedDetails.from_json(json_str) - return instance - - # check if data type is `InternalTaskPermanentlyFailedDetails` - if _data_type == "InternalTaskPermanentlyFailedDetails": - instance.actual_instance = InternalTaskPermanentlyFailedDetails.from_json(json_str) - return instance - - # check if data type is `ReferencedRepositoryUpdatedDetails` - if _data_type == "ReferencedRepositoryUpdatedDetails": - instance.actual_instance = ReferencedRepositoryUpdatedDetails.from_json(json_str) - return instance - - # check if data type is `ResourceSyncCompletedDetails` - if _data_type == "ResourceSyncCompletedDetails": - instance.actual_instance = ResourceSyncCompletedDetails.from_json(json_str) - return instance - - # check if data type is `ResourceUpdatedDetails` - if _data_type == "ResourceUpdatedDetails": - instance.actual_instance = ResourceUpdatedDetails.from_json(json_str) - return instance - # deserialize data into ResourceUpdatedDetails try: instance.actual_instance = ResourceUpdatedDetails.from_json(json_str) diff --git a/flightctl/models/event_list.py b/flightctl/models/event_list.py index 8b0b892..8f9c516 100644 --- a/flightctl/models/event_list.py +++ b/flightctl/models/event_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/event_source.py b/flightctl/models/event_source.py index d19056f..b891535 100644 --- a/flightctl/models/event_source.py +++ b/flightctl/models/event_source.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/file_content.py b/flightctl/models/file_content.py index 848590c..abdfbf5 100644 --- a/flightctl/models/file_content.py +++ b/flightctl/models/file_content.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/file_metadata.py b/flightctl/models/file_metadata.py index 62893f6..9de262a 100644 --- a/flightctl/models/file_metadata.py +++ b/flightctl/models/file_metadata.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/file_operation.py b/flightctl/models/file_operation.py index 8bf5333..0bf122d 100644 --- a/flightctl/models/file_operation.py +++ b/flightctl/models/file_operation.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,9 +27,9 @@ class FileOperation(str, Enum): """ allowed enum values """ - CREATED = 'created' - REMOVED = 'removed' - UPDATED = 'updated' + FileOperationCreated = 'created' + FileOperationRemoved = 'removed' + FileOperationUpdated = 'updated' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/file_spec.py b/flightctl/models/file_spec.py index 61827e0..74bad9e 100644 --- a/flightctl/models/file_spec.py +++ b/flightctl/models/file_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet.py b/flightctl/models/fleet.py index ad0ab26..6dd6c32 100644 --- a/flightctl/models/fleet.py +++ b/flightctl/models/fleet.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_list.py b/flightctl/models/fleet_list.py index 435d65f..70f837b 100644 --- a/flightctl/models/fleet_list.py +++ b/flightctl/models/fleet_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_rollout_batch_completed_details.py b/flightctl/models/fleet_rollout_batch_completed_details.py index 446c95a..e0b9f7d 100644 --- a/flightctl/models/fleet_rollout_batch_completed_details.py +++ b/flightctl/models/fleet_rollout_batch_completed_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_rollout_batch_dispatched_details.py b/flightctl/models/fleet_rollout_batch_dispatched_details.py index 1d68846..bc8b45f 100644 --- a/flightctl/models/fleet_rollout_batch_dispatched_details.py +++ b/flightctl/models/fleet_rollout_batch_dispatched_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_rollout_completed_details.py b/flightctl/models/fleet_rollout_completed_details.py index 7560530..869e98c 100644 --- a/flightctl/models/fleet_rollout_completed_details.py +++ b/flightctl/models/fleet_rollout_completed_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_rollout_device_selected_details.py b/flightctl/models/fleet_rollout_device_selected_details.py index eb95b6a..06daf9a 100644 --- a/flightctl/models/fleet_rollout_device_selected_details.py +++ b/flightctl/models/fleet_rollout_device_selected_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_rollout_failed_details.py b/flightctl/models/fleet_rollout_failed_details.py index 615bd63..064c08c 100644 --- a/flightctl/models/fleet_rollout_failed_details.py +++ b/flightctl/models/fleet_rollout_failed_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_rollout_started_details.py b/flightctl/models/fleet_rollout_started_details.py index b5d4a31..47aeeb5 100644 --- a/flightctl/models/fleet_rollout_started_details.py +++ b/flightctl/models/fleet_rollout_started_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_rollout_status.py b/flightctl/models/fleet_rollout_status.py index baf59ae..4b09936 100644 --- a/flightctl/models/fleet_rollout_status.py +++ b/flightctl/models/fleet_rollout_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_spec.py b/flightctl/models/fleet_spec.py index 28d1cf1..0ac393e 100644 --- a/flightctl/models/fleet_spec.py +++ b/flightctl/models/fleet_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_spec_template.py b/flightctl/models/fleet_spec_template.py index 2ebeb9e..7128780 100644 --- a/flightctl/models/fleet_spec_template.py +++ b/flightctl/models/fleet_spec_template.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/fleet_status.py b/flightctl/models/fleet_status.py index 02a1a4e..bd9d989 100644 --- a/flightctl/models/fleet_status.py +++ b/flightctl/models/fleet_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/generic_repo_spec.py b/flightctl/models/generic_repo_spec.py index e1b12fd..280af21 100644 --- a/flightctl/models/generic_repo_spec.py +++ b/flightctl/models/generic_repo_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/git_config_provider_spec.py b/flightctl/models/git_config_provider_spec.py index 791814d..ffbf95e 100644 --- a/flightctl/models/git_config_provider_spec.py +++ b/flightctl/models/git_config_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/git_config_provider_spec_git_ref.py b/flightctl/models/git_config_provider_spec_git_ref.py index f73ccc3..5bcaee8 100644 --- a/flightctl/models/git_config_provider_spec_git_ref.py +++ b/flightctl/models/git_config_provider_spec_git_ref.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/git_hub_introspection_spec.py b/flightctl/models/git_hub_introspection_spec.py new file mode 100644 index 0000000..5cb4721 --- /dev/null +++ b/flightctl/models/git_hub_introspection_spec.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class GitHubIntrospectionSpec(BaseModel): + """ + GitHubIntrospectionSpec defines token introspection using GitHub API (POST /applications/{client_id}/token). Uses the OAuth2ProviderSpec clientId and clientSecret for Basic Auth and URL path. + """ # noqa: E501 + type: StrictStr = Field(description="The introspection type.") + url: Optional[StrictStr] = Field(default='https://api.github.com', description="The GitHub API base URL. Defaults to https://api.github.com for GitHub.com, but can be customized for GitHub Enterprise Server.") + __properties: ClassVar[List[str]] = ["type", "url"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['github']): + raise ValueError("must be one of enum values ('github')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GitHubIntrospectionSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GitHubIntrospectionSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "url": obj.get("url") if obj.get("url") is not None else 'https://api.github.com' + }) + return _obj + + diff --git a/flightctl/models/hook_action.py b/flightctl/models/hook_action.py index 834c999..dd932b1 100644 --- a/flightctl/models/hook_action.py +++ b/flightctl/models/hook_action.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/hook_action_run.py b/flightctl/models/hook_action_run.py index 3273543..354d6ea 100644 --- a/flightctl/models/hook_action_run.py +++ b/flightctl/models/hook_action_run.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/hook_condition.py b/flightctl/models/hook_condition.py index 936151c..1f0ced6 100644 --- a/flightctl/models/hook_condition.py +++ b/flightctl/models/hook_condition.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/hook_condition_path_op.py b/flightctl/models/hook_condition_path_op.py index f33c623..9a0d4d1 100644 --- a/flightctl/models/hook_condition_path_op.py +++ b/flightctl/models/hook_condition_path_op.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/http_config.py b/flightctl/models/http_config.py index 878444f..a7ee3a2 100644 --- a/flightctl/models/http_config.py +++ b/flightctl/models/http_config.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/http_config_provider_spec.py b/flightctl/models/http_config_provider_spec.py index 7166043..8ebd656 100644 --- a/flightctl/models/http_config_provider_spec.py +++ b/flightctl/models/http_config_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/http_config_provider_spec_http_ref.py b/flightctl/models/http_config_provider_spec_http_ref.py index 51111e7..8e316b1 100644 --- a/flightctl/models/http_config_provider_spec_http_ref.py +++ b/flightctl/models/http_config_provider_spec_http_ref.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/http_repo_spec.py b/flightctl/models/http_repo_spec.py index a471af7..0055bd6 100644 --- a/flightctl/models/http_repo_spec.py +++ b/flightctl/models/http_repo_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/image_application_provider_spec.py b/flightctl/models/image_application_provider_spec.py index 9c94281..f492e15 100644 --- a/flightctl/models/image_application_provider_spec.py +++ b/flightctl/models/image_application_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,8 +18,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flightctl.models.application_resources import ApplicationResources from flightctl.models.application_volume import ApplicationVolume from typing import Optional, Set from typing_extensions import Self @@ -29,8 +31,10 @@ class ImageApplicationProviderSpec(BaseModel): ImageApplicationProviderSpec """ # noqa: E501 volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") - image: StrictStr = Field(description="Reference to the container image for the application package.") - __properties: ClassVar[List[str]] = ["volumes", "image"] + image: StrictStr = Field(description="Reference to the OCI image or artifact for the application package.") + ports: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="Port mappings.") + resources: Optional[ApplicationResources] = None + __properties: ClassVar[List[str]] = ["volumes", "image", "ports", "resources"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +82,9 @@ def to_dict(self) -> Dict[str, Any]: if _item_volumes: _items.append(_item_volumes.to_dict()) _dict['volumes'] = _items + # override the default output from pydantic by calling `to_dict()` of resources + if self.resources: + _dict['resources'] = self.resources.to_dict() return _dict @classmethod @@ -91,7 +98,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, - "image": obj.get("image") + "image": obj.get("image"), + "ports": obj.get("ports"), + "resources": ApplicationResources.from_dict(obj["resources"]) if obj.get("resources") is not None else None }) return _obj diff --git a/flightctl/models/image_mount_volume_provider_spec.py b/flightctl/models/image_mount_volume_provider_spec.py new file mode 100644 index 0000000..fa88876 --- /dev/null +++ b/flightctl/models/image_mount_volume_provider_spec.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from flightctl.models.image_volume_source import ImageVolumeSource +from flightctl.models.volume_mount import VolumeMount +from typing import Optional, Set +from typing_extensions import Self + +class ImageMountVolumeProviderSpec(BaseModel): + """ + Volume from OCI image mounted at specified path. + """ # noqa: E501 + image: ImageVolumeSource + mount: VolumeMount + __properties: ClassVar[List[str]] = ["image", "mount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImageMountVolumeProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of image + if self.image: + _dict['image'] = self.image.to_dict() + # override the default output from pydantic by calling `to_dict()` of mount + if self.mount: + _dict['mount'] = self.mount.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageMountVolumeProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "image": ImageVolumeSource.from_dict(obj["image"]) if obj.get("image") is not None else None, + "mount": VolumeMount.from_dict(obj["mount"]) if obj.get("mount") is not None else None + }) + return _obj + + diff --git a/flightctl/models/image_pull_policy.py b/flightctl/models/image_pull_policy.py index 19c1de9..3ea52fd 100644 --- a/flightctl/models/image_pull_policy.py +++ b/flightctl/models/image_pull_policy.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,9 +27,9 @@ class ImagePullPolicy(str, Enum): """ allowed enum values """ - ALWAYS = 'Always' - IFNOTPRESENT = 'IfNotPresent' - NEVER = 'Never' + PullAlways = 'Always' + PullIfNotPresent = 'IfNotPresent' + PullNever = 'Never' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/image_volume_provider_spec.py b/flightctl/models/image_volume_provider_spec.py index 0234de0..1d70c89 100644 --- a/flightctl/models/image_volume_provider_spec.py +++ b/flightctl/models/image_volume_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/image_volume_source.py b/flightctl/models/image_volume_source.py index ca59e21..63590ae 100644 --- a/flightctl/models/image_volume_source.py +++ b/flightctl/models/image_volume_source.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class ImageVolumeSource(BaseModel): Describes the source of an OCI-compliant image or artifact. """ # noqa: E501 reference: StrictStr = Field(description="Reference to an OCI-compliant image or artifact in a registry. This may be a container image or another type of OCI artifact, as long as it conforms to the OCI image specification.") - pull_policy: Optional[ImagePullPolicy] = Field(default=ImagePullPolicy.IFNOTPRESENT, alias="pullPolicy") + pull_policy: Optional[ImagePullPolicy] = Field(default=ImagePullPolicy.PullIfNotPresent, alias="pullPolicy") __properties: ClassVar[List[str]] = ["reference", "pullPolicy"] model_config = ConfigDict( @@ -84,7 +84,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "reference": obj.get("reference"), - "pullPolicy": obj.get("pullPolicy") if obj.get("pullPolicy") is not None else ImagePullPolicy.IFNOTPRESENT + "pullPolicy": obj.get("pullPolicy") if obj.get("pullPolicy") is not None else ImagePullPolicy.PullIfNotPresent }) return _obj diff --git a/flightctl/models/inline_application_provider_spec.py b/flightctl/models/inline_application_provider_spec.py index c4209d4..90d650b 100644 --- a/flightctl/models/inline_application_provider_spec.py +++ b/flightctl/models/inline_application_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/inline_config_provider_spec.py b/flightctl/models/inline_config_provider_spec.py index 7504c27..6561316 100644 --- a/flightctl/models/inline_config_provider_spec.py +++ b/flightctl/models/inline_config_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/internal_task_failed_details.py b/flightctl/models/internal_task_failed_details.py index 962ab59..3bd7bd4 100644 --- a/flightctl/models/internal_task_failed_details.py +++ b/flightctl/models/internal_task_failed_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/internal_task_permanently_failed_details.py b/flightctl/models/internal_task_permanently_failed_details.py index efd093a..6f5c2e3 100644 --- a/flightctl/models/internal_task_permanently_failed_details.py +++ b/flightctl/models/internal_task_permanently_failed_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/jwt_introspection_spec.py b/flightctl/models/jwt_introspection_spec.py new file mode 100644 index 0000000..bc1fb49 --- /dev/null +++ b/flightctl/models/jwt_introspection_spec.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class JwtIntrospectionSpec(BaseModel): + """ + JwtIntrospectionSpec defines token introspection using JWT validation with JWKS. + """ # noqa: E501 + type: StrictStr = Field(description="The introspection type.") + jwks_url: StrictStr = Field(description="The JWKS (JSON Web Key Set) endpoint URL for fetching public keys to validate JWT signatures.", alias="jwksUrl") + issuer: Optional[StrictStr] = Field(default=None, description="Expected issuer claim value in the JWT. If not specified, uses the OAuth2ProviderSpec issuer.") + audience: Optional[List[StrictStr]] = Field(default=None, description="Expected audience claim values in the JWT. If not specified, uses the OAuth2ProviderSpec clientId.") + __properties: ClassVar[List[str]] = ["type", "jwksUrl", "issuer", "audience"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['jwt']): + raise ValueError("must be one of enum values ('jwt')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of JwtIntrospectionSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of JwtIntrospectionSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "jwksUrl": obj.get("jwksUrl"), + "issuer": obj.get("issuer"), + "audience": obj.get("audience") + }) + return _obj + + diff --git a/flightctl/models/k8s_provider_spec.py b/flightctl/models/k8s_provider_spec.py new file mode 100644 index 0000000..ae086ee --- /dev/null +++ b/flightctl/models/k8s_provider_spec.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment +from flightctl.models.auth_role_assignment import AuthRoleAssignment +from typing import Optional, Set +from typing_extensions import Self + +class K8sProviderSpec(BaseModel): + """ + K8sProviderSpec describes a Kubernetes/OpenShift provider configuration. + """ # noqa: E501 + provider_type: StrictStr = Field(description="The type of authentication provider.", alias="providerType") + display_name: Optional[StrictStr] = Field(default=None, description="Human-readable display name for the provider.", alias="displayName") + api_url: StrictStr = Field(description="The internal Kubernetes API URL.", alias="apiUrl") + rbac_ns: Optional[StrictStr] = Field(default=None, description="The RBAC namespace for permissions.", alias="rbacNs") + enabled: Optional[StrictBool] = Field(default=True, description="Whether this K8s provider is enabled.") + organization_assignment: AuthOrganizationAssignment = Field(alias="organizationAssignment") + role_assignment: AuthRoleAssignment = Field(alias="roleAssignment") + role_suffix: Optional[StrictStr] = Field(default=None, description="Optional suffix to strip from ClusterRole names when normalizing role names. Used for multi-release deployments where ClusterRoles have namespace-specific names (e.g., flightctl-admin-).", alias="roleSuffix") + __properties: ClassVar[List[str]] = ["providerType", "displayName", "apiUrl", "rbacNs", "enabled", "organizationAssignment", "roleAssignment", "roleSuffix"] + + @field_validator('provider_type') + def provider_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['k8s']): + raise ValueError("must be one of enum values ('k8s')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of K8sProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization_assignment + if self.organization_assignment: + _dict['organizationAssignment'] = self.organization_assignment.to_dict() + # override the default output from pydantic by calling `to_dict()` of role_assignment + if self.role_assignment: + _dict['roleAssignment'] = self.role_assignment.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of K8sProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "displayName": obj.get("displayName"), + "apiUrl": obj.get("apiUrl"), + "rbacNs": obj.get("rbacNs"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "organizationAssignment": AuthOrganizationAssignment.from_dict(obj["organizationAssignment"]) if obj.get("organizationAssignment") is not None else None, + "roleAssignment": AuthRoleAssignment.from_dict(obj["roleAssignment"]) if obj.get("roleAssignment") is not None else None, + "roleSuffix": obj.get("roleSuffix") + }) + return _obj + + diff --git a/flightctl/models/kubernetes_secret_provider_spec.py b/flightctl/models/kubernetes_secret_provider_spec.py index 20052e2..534b0ac 100644 --- a/flightctl/models/kubernetes_secret_provider_spec.py +++ b/flightctl/models/kubernetes_secret_provider_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py b/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py index 63252f2..bbc7fcc 100644 --- a/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py +++ b/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/label_selector.py b/flightctl/models/label_selector.py index b81f9bc..4e0150a 100644 --- a/flightctl/models/label_selector.py +++ b/flightctl/models/label_selector.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/list_meta.py b/flightctl/models/list_meta.py index fb22356..36ccf59 100644 --- a/flightctl/models/list_meta.py +++ b/flightctl/models/list_meta.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/match_expression.py b/flightctl/models/match_expression.py index 9113ca0..b9e330a 100644 --- a/flightctl/models/match_expression.py +++ b/flightctl/models/match_expression.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/memory_resource_monitor_spec.py b/flightctl/models/memory_resource_monitor_spec.py index ddb1ace..8116f38 100644 --- a/flightctl/models/memory_resource_monitor_spec.py +++ b/flightctl/models/memory_resource_monitor_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/mount_volume_provider_spec.py b/flightctl/models/mount_volume_provider_spec.py new file mode 100644 index 0000000..2005a8e --- /dev/null +++ b/flightctl/models/mount_volume_provider_spec.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from flightctl.models.volume_mount import VolumeMount +from typing import Optional, Set +from typing_extensions import Self + +class MountVolumeProviderSpec(BaseModel): + """ + Named volume mount configuration. + """ # noqa: E501 + mount: VolumeMount + __properties: ClassVar[List[str]] = ["mount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MountVolumeProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of mount + if self.mount: + _dict['mount'] = self.mount.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MountVolumeProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "mount": VolumeMount.from_dict(obj["mount"]) if obj.get("mount") is not None else None + }) + return _obj + + diff --git a/flightctl/models/o_auth2_introspection.py b/flightctl/models/o_auth2_introspection.py new file mode 100644 index 0000000..d5ab50c --- /dev/null +++ b/flightctl/models/o_auth2_introspection.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flightctl.models.git_hub_introspection_spec import GitHubIntrospectionSpec +from flightctl.models.jwt_introspection_spec import JwtIntrospectionSpec +from flightctl.models.rfc7662_introspection_spec import Rfc7662IntrospectionSpec +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +OAUTH2INTROSPECTION_ONE_OF_SCHEMAS = ["GitHubIntrospectionSpec", "JwtIntrospectionSpec", "Rfc7662IntrospectionSpec"] + +class OAuth2Introspection(BaseModel): + """ + OAuth2Introspection defines the token introspection configuration. + """ + # data type: Rfc7662IntrospectionSpec + oneof_schema_1_validator: Optional[Rfc7662IntrospectionSpec] = None + # data type: GitHubIntrospectionSpec + oneof_schema_2_validator: Optional[GitHubIntrospectionSpec] = None + # data type: JwtIntrospectionSpec + oneof_schema_3_validator: Optional[JwtIntrospectionSpec] = None + actual_instance: Optional[Union[GitHubIntrospectionSpec, JwtIntrospectionSpec, Rfc7662IntrospectionSpec]] = None + one_of_schemas: Set[str] = { "GitHubIntrospectionSpec", "JwtIntrospectionSpec", "Rfc7662IntrospectionSpec" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = OAuth2Introspection.model_construct() + error_messages = [] + match = 0 + # validate data type: Rfc7662IntrospectionSpec + if not isinstance(v, Rfc7662IntrospectionSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `Rfc7662IntrospectionSpec`") + else: + match += 1 + # validate data type: GitHubIntrospectionSpec + if not isinstance(v, GitHubIntrospectionSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `GitHubIntrospectionSpec`") + else: + match += 1 + # validate data type: JwtIntrospectionSpec + if not isinstance(v, JwtIntrospectionSpec): + error_messages.append(f"Error! Input type `{type(v)}` is not `JwtIntrospectionSpec`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in OAuth2Introspection with oneOf schemas: GitHubIntrospectionSpec, JwtIntrospectionSpec, Rfc7662IntrospectionSpec. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in OAuth2Introspection with oneOf schemas: GitHubIntrospectionSpec, JwtIntrospectionSpec, Rfc7662IntrospectionSpec. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `GitHubIntrospectionSpec` + if _data_type == "github": + instance.actual_instance = GitHubIntrospectionSpec.from_json(json_str) + return instance + + # check if data type is `JwtIntrospectionSpec` + if _data_type == "jwt": + instance.actual_instance = JwtIntrospectionSpec.from_json(json_str) + return instance + + # check if data type is `Rfc7662IntrospectionSpec` + if _data_type == "rfc7662": + instance.actual_instance = Rfc7662IntrospectionSpec.from_json(json_str) + return instance + + # deserialize data into Rfc7662IntrospectionSpec + try: + instance.actual_instance = Rfc7662IntrospectionSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into GitHubIntrospectionSpec + try: + instance.actual_instance = GitHubIntrospectionSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into JwtIntrospectionSpec + try: + instance.actual_instance = JwtIntrospectionSpec.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into OAuth2Introspection with oneOf schemas: GitHubIntrospectionSpec, JwtIntrospectionSpec, Rfc7662IntrospectionSpec. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into OAuth2Introspection with oneOf schemas: GitHubIntrospectionSpec, JwtIntrospectionSpec, Rfc7662IntrospectionSpec. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], GitHubIntrospectionSpec, JwtIntrospectionSpec, Rfc7662IntrospectionSpec]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flightctl/models/o_auth2_provider_spec.py b/flightctl/models/o_auth2_provider_spec.py new file mode 100644 index 0000000..e2e7abf --- /dev/null +++ b/flightctl/models/o_auth2_provider_spec.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment +from flightctl.models.auth_role_assignment import AuthRoleAssignment +from flightctl.models.o_auth2_introspection import OAuth2Introspection +from typing import Optional, Set +from typing_extensions import Self + +class OAuth2ProviderSpec(BaseModel): + """ + OAuth2ProviderSpec describes an OAuth2 provider configuration. + """ # noqa: E501 + provider_type: StrictStr = Field(description="The type of authentication provider.", alias="providerType") + display_name: Optional[StrictStr] = Field(default=None, description="Human-readable display name for the provider.", alias="displayName") + issuer: Optional[StrictStr] = Field(default=None, description="The OAuth2 issuer identifier (used for issuer identification in tokens).") + authorization_url: StrictStr = Field(description="The OAuth2 authorization endpoint URL.", alias="authorizationUrl") + token_url: StrictStr = Field(description="The OAuth2 token endpoint URL.", alias="tokenUrl") + userinfo_url: StrictStr = Field(description="The OAuth2 userinfo endpoint URL.", alias="userinfoUrl") + client_id: StrictStr = Field(description="The OAuth2 client ID.", alias="clientId") + client_secret: StrictStr = Field(description="The OAuth2 client secret.", alias="clientSecret") + enabled: Optional[StrictBool] = Field(default=True, description="Whether this OAuth2 provider is enabled.") + scopes: Optional[List[StrictStr]] = Field(default=None, description="List of OAuth2 scopes to request.") + organization_assignment: AuthOrganizationAssignment = Field(alias="organizationAssignment") + username_claim: Optional[List[StrictStr]] = Field(default=None, description="JSON path to the username claim in the userinfo response as an array of path segments (e.g., [\"preferred_username\"], [\"email\"], [\"sub\"]).", alias="usernameClaim") + role_assignment: AuthRoleAssignment = Field(alias="roleAssignment") + introspection: Optional[OAuth2Introspection] = None + __properties: ClassVar[List[str]] = ["providerType", "displayName", "issuer", "authorizationUrl", "tokenUrl", "userinfoUrl", "clientId", "clientSecret", "enabled", "scopes", "organizationAssignment", "usernameClaim", "roleAssignment", "introspection"] + + @field_validator('provider_type') + def provider_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['oauth2']): + raise ValueError("must be one of enum values ('oauth2')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OAuth2ProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization_assignment + if self.organization_assignment: + _dict['organizationAssignment'] = self.organization_assignment.to_dict() + # override the default output from pydantic by calling `to_dict()` of role_assignment + if self.role_assignment: + _dict['roleAssignment'] = self.role_assignment.to_dict() + # override the default output from pydantic by calling `to_dict()` of introspection + if self.introspection: + _dict['introspection'] = self.introspection.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OAuth2ProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "displayName": obj.get("displayName"), + "issuer": obj.get("issuer"), + "authorizationUrl": obj.get("authorizationUrl"), + "tokenUrl": obj.get("tokenUrl"), + "userinfoUrl": obj.get("userinfoUrl"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "scopes": obj.get("scopes"), + "organizationAssignment": AuthOrganizationAssignment.from_dict(obj["organizationAssignment"]) if obj.get("organizationAssignment") is not None else None, + "usernameClaim": obj.get("usernameClaim"), + "roleAssignment": AuthRoleAssignment.from_dict(obj["roleAssignment"]) if obj.get("roleAssignment") is not None else None, + "introspection": OAuth2Introspection.from_dict(obj["introspection"]) if obj.get("introspection") is not None else None + }) + return _obj + + diff --git a/flightctl/models/object_meta.py b/flightctl/models/object_meta.py index 1ae40a1..98b6039 100644 --- a/flightctl/models/object_meta.py +++ b/flightctl/models/object_meta.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/object_reference.py b/flightctl/models/object_reference.py index 6964c09..44ad420 100644 --- a/flightctl/models/object_reference.py +++ b/flightctl/models/object_reference.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/oidc_provider_spec.py b/flightctl/models/oidc_provider_spec.py new file mode 100644 index 0000000..39a9c37 --- /dev/null +++ b/flightctl/models/oidc_provider_spec.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment +from flightctl.models.auth_role_assignment import AuthRoleAssignment +from typing import Optional, Set +from typing_extensions import Self + +class OIDCProviderSpec(BaseModel): + """ + OIDCProviderSpec describes an OIDC provider configuration. + """ # noqa: E501 + provider_type: StrictStr = Field(description="The type of authentication provider.", alias="providerType") + display_name: Optional[StrictStr] = Field(default=None, description="Human-readable display name for the provider.", alias="displayName") + issuer: StrictStr = Field(description="The OIDC issuer URL (e.g., https://accounts.google.com).") + client_id: StrictStr = Field(description="The OIDC client ID.", alias="clientId") + client_secret: StrictStr = Field(description="The OIDC client secret.", alias="clientSecret") + enabled: Optional[StrictBool] = Field(default=True, description="Whether this OIDC provider is enabled.") + scopes: Optional[List[StrictStr]] = Field(default=None, description="List of OIDC scopes to request.") + organization_assignment: AuthOrganizationAssignment = Field(alias="organizationAssignment") + username_claim: Optional[List[StrictStr]] = Field(default=None, description="JSON path to the username claim in the JWT token as an array of path segments (e.g., [\"preferred_username\"], [\"email\"], [\"sub\"]).", alias="usernameClaim") + role_assignment: AuthRoleAssignment = Field(alias="roleAssignment") + __properties: ClassVar[List[str]] = ["providerType", "displayName", "issuer", "clientId", "clientSecret", "enabled", "scopes", "organizationAssignment", "usernameClaim", "roleAssignment"] + + @field_validator('provider_type') + def provider_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['oidc']): + raise ValueError("must be one of enum values ('oidc')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OIDCProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of organization_assignment + if self.organization_assignment: + _dict['organizationAssignment'] = self.organization_assignment.to_dict() + # override the default output from pydantic by calling `to_dict()` of role_assignment + if self.role_assignment: + _dict['roleAssignment'] = self.role_assignment.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OIDCProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "displayName": obj.get("displayName"), + "issuer": obj.get("issuer"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "scopes": obj.get("scopes"), + "organizationAssignment": AuthOrganizationAssignment.from_dict(obj["organizationAssignment"]) if obj.get("organizationAssignment") is not None else None, + "usernameClaim": obj.get("usernameClaim"), + "roleAssignment": AuthRoleAssignment.from_dict(obj["roleAssignment"]) if obj.get("roleAssignment") is not None else None + }) + return _obj + + diff --git a/flightctl/models/open_shift_provider_spec.py b/flightctl/models/open_shift_provider_spec.py new file mode 100644 index 0000000..f527a0f --- /dev/null +++ b/flightctl/models/open_shift_provider_spec.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class OpenShiftProviderSpec(BaseModel): + """ + OpenShiftProviderSpec describes an OpenShift OAuth provider configuration. + """ # noqa: E501 + provider_type: StrictStr = Field(description="The type of authentication provider.", alias="providerType") + display_name: Optional[StrictStr] = Field(default=None, description="Human-readable display name for the provider.", alias="displayName") + issuer: Optional[StrictStr] = Field(default=None, description="The OAuth2 issuer identifier (used for issuer identification in tokens).") + authorization_url: Optional[StrictStr] = Field(default=None, description="The OAuth2 authorization endpoint URL.", alias="authorizationUrl") + token_url: Optional[StrictStr] = Field(default=None, description="The OAuth2 token endpoint URL.", alias="tokenUrl") + client_id: Optional[StrictStr] = Field(default=None, description="The OAuth2 client ID.", alias="clientId") + client_secret: Optional[StrictStr] = Field(default=None, description="The OAuth2 client secret.", alias="clientSecret") + enabled: Optional[StrictBool] = Field(default=True, description="Whether this OpenShift provider is enabled.") + scopes: Optional[List[StrictStr]] = Field(default=None, description="List of OAuth2 scopes to request.") + cluster_control_plane_url: Optional[StrictStr] = Field(default=None, description="The OpenShift cluster control plane URL.", alias="clusterControlPlaneUrl") + project_label_filter: Optional[StrictStr] = Field(default=None, description="If specified, only projects with this label will be considered. The label selector should be in the format 'key' or 'key=value'. If only the key is provided, any project with that label (regardless of value) will be included. This enables server-side filtering for better performance.", alias="projectLabelFilter") + role_suffix: Optional[StrictStr] = Field(default=None, description="Optional suffix to strip from ClusterRole names when normalizing role names. Used for multi-release deployments where ClusterRoles have namespace-specific names (e.g., flightctl-admin-).", alias="roleSuffix") + __properties: ClassVar[List[str]] = ["providerType", "displayName", "issuer", "authorizationUrl", "tokenUrl", "clientId", "clientSecret", "enabled", "scopes", "clusterControlPlaneUrl", "projectLabelFilter", "roleSuffix"] + + @field_validator('provider_type') + def provider_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['openshift']): + raise ValueError("must be one of enum values ('openshift')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenShiftProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenShiftProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "providerType": obj.get("providerType"), + "displayName": obj.get("displayName"), + "issuer": obj.get("issuer"), + "authorizationUrl": obj.get("authorizationUrl"), + "tokenUrl": obj.get("tokenUrl"), + "clientId": obj.get("clientId"), + "clientSecret": obj.get("clientSecret"), + "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, + "scopes": obj.get("scopes"), + "clusterControlPlaneUrl": obj.get("clusterControlPlaneUrl"), + "projectLabelFilter": obj.get("projectLabelFilter"), + "roleSuffix": obj.get("roleSuffix") + }) + return _obj + + diff --git a/flightctl/models/organization.py b/flightctl/models/organization.py index ae6cdc0..79bd3d1 100644 --- a/flightctl/models/organization.py +++ b/flightctl/models/organization.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/organization_list.py b/flightctl/models/organization_list.py index a855e25..e71bcaf 100644 --- a/flightctl/models/organization_list.py +++ b/flightctl/models/organization_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/organization_spec.py b/flightctl/models/organization_spec.py index 23db800..0b52ad1 100644 --- a/flightctl/models/organization_spec.py +++ b/flightctl/models/organization_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/patch_request_inner.py b/flightctl/models/patch_request_inner.py index d1d2afd..4f14f9c 100644 --- a/flightctl/models/patch_request_inner.py +++ b/flightctl/models/patch_request_inner.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/permission.py b/flightctl/models/permission.py new file mode 100644 index 0000000..279df2a --- /dev/null +++ b/flightctl/models/permission.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Permission(BaseModel): + """ + A permission defining allowed operations on a resource. + """ # noqa: E501 + resource: StrictStr = Field(description="The resource (e.g., \"devices\", \"fleets\", \"*\" for all resources).") + operations: List[StrictStr] = Field(description="List of allowed operations (e.g., \"get\", \"list\", \"create\", \"update\", \"patch\", \"delete\", \"*\" for all operations).") + __properties: ClassVar[List[str]] = ["resource", "operations"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Permission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Permission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resource": obj.get("resource"), + "operations": obj.get("operations") + }) + return _obj + + diff --git a/flightctl/models/permission_list.py b/flightctl/models/permission_list.py new file mode 100644 index 0000000..ab789e0 --- /dev/null +++ b/flightctl/models/permission_list.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from flightctl.models.permission import Permission +from typing import Optional, Set +from typing_extensions import Self + +class PermissionList(BaseModel): + """ + List of available permissions for a user. + """ # noqa: E501 + permissions: List[Permission] = Field(description="List of permissions available to the user.") + __properties: ClassVar[List[str]] = ["permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PermissionList from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + _items = [] + if self.permissions: + for _item_permissions in self.permissions: + if _item_permissions: + _items.append(_item_permissions.to_dict()) + _dict['permissions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PermissionList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "permissions": [Permission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/flightctl/models/referenced_repository_updated_details.py b/flightctl/models/referenced_repository_updated_details.py index c044dff..04c2dcc 100644 --- a/flightctl/models/referenced_repository_updated_details.py +++ b/flightctl/models/referenced_repository_updated_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/relative_path.py b/flightctl/models/relative_path.py index 0d17388..0d7c618 100644 --- a/flightctl/models/relative_path.py +++ b/flightctl/models/relative_path.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/repo_spec_type.py b/flightctl/models/repo_spec_type.py index bd3d663..8b378d1 100644 --- a/flightctl/models/repo_spec_type.py +++ b/flightctl/models/repo_spec_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/repository.py b/flightctl/models/repository.py index fc7ab5f..6a1ca5e 100644 --- a/flightctl/models/repository.py +++ b/flightctl/models/repository.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/repository_list.py b/flightctl/models/repository_list.py index 68af1fe..f7166fd 100644 --- a/flightctl/models/repository_list.py +++ b/flightctl/models/repository_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/repository_spec.py b/flightctl/models/repository_spec.py index 9783d24..ea8d0c7 100644 --- a/flightctl/models/repository_spec.py +++ b/flightctl/models/repository_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/repository_status.py b/flightctl/models/repository_status.py index 358163d..d729894 100644 --- a/flightctl/models/repository_status.py +++ b/flightctl/models/repository_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_alert_rule.py b/flightctl/models/resource_alert_rule.py index be4fac1..f6e21eb 100644 --- a/flightctl/models/resource_alert_rule.py +++ b/flightctl/models/resource_alert_rule.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_alert_severity_type.py b/flightctl/models/resource_alert_severity_type.py index de048c4..87d9941 100644 --- a/flightctl/models/resource_alert_severity_type.py +++ b/flightctl/models/resource_alert_severity_type.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,9 +27,9 @@ class ResourceAlertSeverityType(str, Enum): """ allowed enum values """ - WARNING = 'Warning' - CRITICAL = 'Critical' - INFO = 'Info' + ResourceAlertSeverityTypeWarning = 'Warning' + ResourceAlertSeverityTypeCritical = 'Critical' + ResourceAlertSeverityTypeInfo = 'Info' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/resource_kind.py b/flightctl/models/resource_kind.py index 6271e81..069b580 100644 --- a/flightctl/models/resource_kind.py +++ b/flightctl/models/resource_kind.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,6 +34,7 @@ class ResourceKind(str, Enum): REPOSITORY = 'Repository' RESOURCESYNC = 'ResourceSync' TEMPLATEVERSION = 'TemplateVersion' + AUTHPROVIDER = 'AuthProvider' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/resource_monitor.py b/flightctl/models/resource_monitor.py index 7341c23..f0236b6 100644 --- a/flightctl/models/resource_monitor.py +++ b/flightctl/models/resource_monitor.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -119,21 +119,6 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = MemoryResourceMonitorSpec.from_json(json_str) return instance - # check if data type is `CpuResourceMonitorSpec` - if _data_type == "CpuResourceMonitorSpec": - instance.actual_instance = CpuResourceMonitorSpec.from_json(json_str) - return instance - - # check if data type is `DiskResourceMonitorSpec` - if _data_type == "DiskResourceMonitorSpec": - instance.actual_instance = DiskResourceMonitorSpec.from_json(json_str) - return instance - - # check if data type is `MemoryResourceMonitorSpec` - if _data_type == "MemoryResourceMonitorSpec": - instance.actual_instance = MemoryResourceMonitorSpec.from_json(json_str) - return instance - # deserialize data into CpuResourceMonitorSpec try: instance.actual_instance = CpuResourceMonitorSpec.from_json(json_str) diff --git a/flightctl/models/resource_monitor_spec.py b/flightctl/models/resource_monitor_spec.py index 24c559d..47d5a83 100644 --- a/flightctl/models/resource_monitor_spec.py +++ b/flightctl/models/resource_monitor_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_sync.py b/flightctl/models/resource_sync.py index 7ad48b6..812ecd3 100644 --- a/flightctl/models/resource_sync.py +++ b/flightctl/models/resource_sync.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_sync_completed_details.py b/flightctl/models/resource_sync_completed_details.py index 68cec1b..b728838 100644 --- a/flightctl/models/resource_sync_completed_details.py +++ b/flightctl/models/resource_sync_completed_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_sync_list.py b/flightctl/models/resource_sync_list.py index b0f4b50..d6bb11c 100644 --- a/flightctl/models/resource_sync_list.py +++ b/flightctl/models/resource_sync_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_sync_spec.py b/flightctl/models/resource_sync_spec.py index 5675dd2..021502a 100644 --- a/flightctl/models/resource_sync_spec.py +++ b/flightctl/models/resource_sync_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_sync_status.py b/flightctl/models/resource_sync_status.py index 4572d88..dcb8333 100644 --- a/flightctl/models/resource_sync_status.py +++ b/flightctl/models/resource_sync_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/resource_updated_details.py b/flightctl/models/resource_updated_details.py index 7642555..011169e 100644 --- a/flightctl/models/resource_updated_details.py +++ b/flightctl/models/resource_updated_details.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/rfc7662_introspection_spec.py b/flightctl/models/rfc7662_introspection_spec.py new file mode 100644 index 0000000..ac8ac7e --- /dev/null +++ b/flightctl/models/rfc7662_introspection_spec.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class Rfc7662IntrospectionSpec(BaseModel): + """ + Rfc7662IntrospectionSpec defines token introspection using RFC 7662 standard. Uses the OAuth2ProviderSpec clientId and clientSecret for authentication. + """ # noqa: E501 + type: StrictStr = Field(description="The introspection type.") + url: StrictStr = Field(description="The RFC 7662 token introspection endpoint URL.") + __properties: ClassVar[List[str]] = ["type", "url"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['rfc7662']): + raise ValueError("must be one of enum values ('rfc7662')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Rfc7662IntrospectionSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Rfc7662IntrospectionSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "url": obj.get("url") + }) + return _obj + + diff --git a/flightctl/models/rollout_device_selection.py b/flightctl/models/rollout_device_selection.py index f256b62..fddac08 100644 --- a/flightctl/models/rollout_device_selection.py +++ b/flightctl/models/rollout_device_selection.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/rollout_policy.py b/flightctl/models/rollout_policy.py index bf44480..157d97b 100644 --- a/flightctl/models/rollout_policy.py +++ b/flightctl/models/rollout_policy.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -21,8 +21,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from flightctl.models.batch_sequence import BatchSequence from flightctl.models.disruption_budget import DisruptionBudget -from flightctl.models.rollout_device_selection import RolloutDeviceSelection from typing import Optional, Set from typing_extensions import Self @@ -31,9 +31,9 @@ class RolloutPolicy(BaseModel): RolloutPolicy is the rollout policy of the fleet. """ # noqa: E501 disruption_budget: Optional[DisruptionBudget] = Field(default=None, alias="disruptionBudget") - device_selection: Optional[RolloutDeviceSelection] = Field(default=None, alias="deviceSelection") + device_selection: Optional[BatchSequence] = Field(default=None, alias="deviceSelection") success_threshold: Optional[StrictStr] = Field(default=None, description="Percentage is the string format representing percentage string.", alias="successThreshold") - default_update_timeout: Optional[Annotated[str, Field(strict=True)]] = Field(default='0s', description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.", alias="defaultUpdateTimeout") + default_update_timeout: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.", alias="defaultUpdateTimeout") __properties: ClassVar[List[str]] = ["disruptionBudget", "deviceSelection", "successThreshold", "defaultUpdateTimeout"] @field_validator('default_update_timeout') @@ -104,9 +104,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "disruptionBudget": DisruptionBudget.from_dict(obj["disruptionBudget"]) if obj.get("disruptionBudget") is not None else None, - "deviceSelection": RolloutDeviceSelection.from_dict(obj["deviceSelection"]) if obj.get("deviceSelection") is not None else None, + "deviceSelection": BatchSequence.from_dict(obj["deviceSelection"]) if obj.get("deviceSelection") is not None else None, "successThreshold": obj.get("successThreshold"), - "defaultUpdateTimeout": obj.get("defaultUpdateTimeout") if obj.get("defaultUpdateTimeout") is not None else '0s' + "defaultUpdateTimeout": obj.get("defaultUpdateTimeout") }) return _obj diff --git a/flightctl/models/rollout_strategy.py b/flightctl/models/rollout_strategy.py index eb4603f..c1f6ad0 100644 --- a/flightctl/models/rollout_strategy.py +++ b/flightctl/models/rollout_strategy.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/ssh_config.py b/flightctl/models/ssh_config.py index 9d13f1c..b077d7f 100644 --- a/flightctl/models/ssh_config.py +++ b/flightctl/models/ssh_config.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/ssh_repo_spec.py b/flightctl/models/ssh_repo_spec.py index fb4f92d..68396c5 100644 --- a/flightctl/models/ssh_repo_spec.py +++ b/flightctl/models/ssh_repo_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/status.py b/flightctl/models/status.py index 7ba3c6c..2b057ba 100644 --- a/flightctl/models/status.py +++ b/flightctl/models/status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/systemd_active_state_type.py b/flightctl/models/systemd_active_state_type.py new file mode 100644 index 0000000..3161c01 --- /dev/null +++ b/flightctl/models/systemd_active_state_type.py @@ -0,0 +1,45 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SystemdActiveStateType(str, Enum): + """ + The high-level unit activation state. + """ + + """ + allowed enum values + """ + SystemdActiveStateActive = 'active' + SystemdActiveStateReloading = 'reloading' + SystemdActiveStateInactive = 'inactive' + SystemdActiveStateFailed = 'failed' + SystemdActiveStateActivating = 'activating' + SystemdActiveStateDeactivating = 'deactivating' + SystemdActiveStateMaintenance = 'maintenance' + SystemdActiveStateRefreshing = 'refreshing' + SystemdActiveStateUnknown = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SystemdActiveStateType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/systemd_enable_state_type.py b/flightctl/models/systemd_enable_state_type.py new file mode 100644 index 0000000..1589456 --- /dev/null +++ b/flightctl/models/systemd_enable_state_type.py @@ -0,0 +1,51 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SystemdEnableStateType(str, Enum): + """ + The enable state of the unit file. + """ + + """ + allowed enum values + """ + SystemdEnableStateEnabled = 'enabled' + SystemdEnableStateEnabledRuntime = 'enabled-runtime' + SystemdEnableStateLinked = 'linked' + SystemdEnableStateLinkedRuntime = 'linked-runtime' + SystemdEnableStateAlias = 'alias' + SystemdEnableStateMasked = 'masked' + SystemdEnableStateMaskedRuntime = 'masked-runtime' + SystemdEnableStateStatic = 'static' + SystemdEnableStateDisabled = 'disabled' + SystemdEnableStateIndirect = 'indirect' + SystemdEnableStateGenerated = 'generated' + SystemdEnableStateTransient = 'transient' + SystemdEnableStateBad = 'bad' + SystemdEnableStateUnknown = 'unknown' + SystemdEnableStateEmpty = '' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SystemdEnableStateType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/systemd_load_state_type.py b/flightctl/models/systemd_load_state_type.py new file mode 100644 index 0000000..b5a5658 --- /dev/null +++ b/flightctl/models/systemd_load_state_type.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SystemdLoadStateType(str, Enum): + """ + The load state of the unit file. + """ + + """ + allowed enum values + """ + SystemdLoadStateStub = 'stub' + SystemdLoadStateLoaded = 'loaded' + SystemdLoadStateNotFound = 'not-found' + SystemdLoadStateBadSetting = 'bad-setting' + SystemdLoadStateError = 'error' + SystemdLoadStateMerged = 'merged' + SystemdLoadStateMasked = 'masked' + SystemdLoadStateUnknown = 'unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SystemdLoadStateType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/systemd_unit_status.py b/flightctl/models/systemd_unit_status.py new file mode 100644 index 0000000..afd5216 --- /dev/null +++ b/flightctl/models/systemd_unit_status.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from flightctl.models.systemd_active_state_type import SystemdActiveStateType +from flightctl.models.systemd_enable_state_type import SystemdEnableStateType +from flightctl.models.systemd_load_state_type import SystemdLoadStateType +from typing import Optional, Set +from typing_extensions import Self + +class SystemdUnitStatus(BaseModel): + """ + SystemdUnitStatus + """ # noqa: E501 + unit: StrictStr = Field(description="The unit name (e.g., \"sshd.service\").") + description: Annotated[str, Field(strict=True, max_length=2048)] = Field(description="The human-readable description for the unit.") + enable_state: SystemdEnableStateType = Field(alias="enableState") + load_state: SystemdLoadStateType = Field(alias="loadState") + active_state: SystemdActiveStateType = Field(alias="activeState") + sub_state: Annotated[str, Field(strict=True, max_length=64)] = Field(description="The low-level, unit-type-specific state.", alias="subState") + __properties: ClassVar[List[str]] = ["unit", "description", "enableState", "loadState", "activeState", "subState"] + + @field_validator('sub_state') + def sub_state_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z0-9-]+$", value): + raise ValueError(r"must validate the regular expression /^[a-z0-9-]+$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SystemdUnitStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SystemdUnitStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "unit": obj.get("unit"), + "description": obj.get("description"), + "enableState": obj.get("enableState"), + "loadState": obj.get("loadState"), + "activeState": obj.get("activeState"), + "subState": obj.get("subState") + }) + return _obj + + diff --git a/flightctl/models/template_version.py b/flightctl/models/template_version.py index a93186c..a1c8b5c 100644 --- a/flightctl/models/template_version.py +++ b/flightctl/models/template_version.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/template_version_list.py b/flightctl/models/template_version_list.py index c004c3c..dd73f6f 100644 --- a/flightctl/models/template_version_list.py +++ b/flightctl/models/template_version_list.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/template_version_spec.py b/flightctl/models/template_version_spec.py index 315e862..a54ac86 100644 --- a/flightctl/models/template_version_spec.py +++ b/flightctl/models/template_version_spec.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/template_version_status.py b/flightctl/models/template_version_status.py index d919dfb..a8fb9b2 100644 --- a/flightctl/models/template_version_status.py +++ b/flightctl/models/template_version_status.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/token_request.py b/flightctl/models/token_request.py new file mode 100644 index 0000000..b96ad34 --- /dev/null +++ b/flightctl/models/token_request.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TokenRequest(BaseModel): + """ + OAuth2 token request + """ # noqa: E501 + grant_type: StrictStr = Field(description="OAuth2 grant type.") + client_id: StrictStr = Field(description="OAuth2 client identifier.") + refresh_token: Optional[StrictStr] = Field(default=None, description="Refresh token for refresh_token grant.") + code: Optional[StrictStr] = Field(default=None, description="Authorization code for authorization_code grant.") + scope: Optional[StrictStr] = Field(default=None, description="OAuth2 scope.") + code_verifier: Optional[StrictStr] = Field(default=None, description="PKCE code verifier.") + redirect_uri: Optional[StrictStr] = Field(default=None, description="OAuth2 redirect URI (required for authorization_code grant if included in authorization request).") + __properties: ClassVar[List[str]] = ["grant_type", "client_id", "refresh_token", "code", "scope", "code_verifier", "redirect_uri"] + + @field_validator('grant_type') + def grant_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['refresh_token', 'authorization_code']): + raise ValueError("must be one of enum values ('refresh_token', 'authorization_code')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if refresh_token (nullable) is None + # and model_fields_set contains the field + if self.refresh_token is None and "refresh_token" in self.model_fields_set: + _dict['refresh_token'] = None + + # set to None if code (nullable) is None + # and model_fields_set contains the field + if self.code is None and "code" in self.model_fields_set: + _dict['code'] = None + + # set to None if scope (nullable) is None + # and model_fields_set contains the field + if self.scope is None and "scope" in self.model_fields_set: + _dict['scope'] = None + + # set to None if code_verifier (nullable) is None + # and model_fields_set contains the field + if self.code_verifier is None and "code_verifier" in self.model_fields_set: + _dict['code_verifier'] = None + + # set to None if redirect_uri (nullable) is None + # and model_fields_set contains the field + if self.redirect_uri is None and "redirect_uri" in self.model_fields_set: + _dict['redirect_uri'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "grant_type": obj.get("grant_type"), + "client_id": obj.get("client_id"), + "refresh_token": obj.get("refresh_token"), + "code": obj.get("code"), + "scope": obj.get("scope"), + "code_verifier": obj.get("code_verifier"), + "redirect_uri": obj.get("redirect_uri") + }) + return _obj + + diff --git a/flightctl/models/token_response.py b/flightctl/models/token_response.py new file mode 100644 index 0000000..539e0b4 --- /dev/null +++ b/flightctl/models/token_response.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class TokenResponse(BaseModel): + """ + OAuth2 token response + """ # noqa: E501 + access_token: Optional[StrictStr] = Field(default=None, description="OAuth2 access token.") + token_type: Optional[StrictStr] = Field(default=None, description="Token type.") + id_token: Optional[StrictStr] = Field(default=None, description="OIDC ID token (JWT). Present when using OIDC with openid scope.") + refresh_token: Optional[StrictStr] = Field(default=None, description="OAuth2 refresh token.") + expires_in: Optional[StrictInt] = Field(default=None, description="Token expiration time in seconds.") + error: Optional[StrictStr] = Field(default=None, description="OAuth2 error code.") + error_description: Optional[StrictStr] = Field(default=None, description="OAuth2 error description.") + __properties: ClassVar[List[str]] = ["access_token", "token_type", "id_token", "refresh_token", "expires_in", "error", "error_description"] + + @field_validator('token_type') + def token_type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['Bearer']): + raise ValueError("must be one of enum values ('Bearer')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "access_token": obj.get("access_token"), + "token_type": obj.get("token_type"), + "id_token": obj.get("id_token"), + "refresh_token": obj.get("refresh_token"), + "expires_in": obj.get("expires_in"), + "error": obj.get("error"), + "error_description": obj.get("error_description") + }) + return _obj + + diff --git a/flightctl/models/update_schedule.py b/flightctl/models/update_schedule.py index 47ea7ad..312a47a 100644 --- a/flightctl/models/update_schedule.py +++ b/flightctl/models/update_schedule.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,15 +30,12 @@ class UpdateSchedule(BaseModel): """ # noqa: E501 time_zone: Optional[StrictStr] = Field(default='Local', description="Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported (\"GMT\", \"UTC\").", alias="timeZone") at: StrictStr = Field(description="Cron expression format for scheduling times. The format is `* * * * *`: - Minutes: `*` matches 0-59. - Hours: `*` matches 0-23. - Day of Month: `*` matches 1-31. - Month: `*` matches 1-12. - Day of Week: `*` matches 0-6. Supported operators: - `*`: Matches any value (e.g., `*` in hours matches every hour). - `-`: Range (e.g., `0-8` for 12 AM to 8 AM). - `,`: List (e.g., `1,12` for 1st and 12th minute). - `/`: Step (e.g., `*/12` for every 12th minute). - Single value (e.g., `8` matches the 8th minute). Example: `* 0-8,16-23 * * *`.") - start_grace_duration: Optional[Annotated[str, Field(strict=True)]] = Field(default='0s', description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.", alias="startGraceDuration") + start_grace_duration: Annotated[str, Field(strict=True)] = Field(description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.", alias="startGraceDuration") __properties: ClassVar[List[str]] = ["timeZone", "at", "startGraceDuration"] @field_validator('start_grace_duration') def start_grace_duration_validate_regular_expression(cls, value): """Validates the regular expression""" - if value is None: - return value - if not re.match(r"^(?:[1-9]\d*)?\d[smh]$", value): raise ValueError(r"must validate the regular expression /^(?:[1-9]\d*)?\d[smh]$/") return value @@ -96,7 +93,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "timeZone": obj.get("timeZone") if obj.get("timeZone") is not None else 'Local', "at": obj.get("at"), - "startGraceDuration": obj.get("startGraceDuration") if obj.get("startGraceDuration") is not None else '0s' + "startGraceDuration": obj.get("startGraceDuration") }) return _obj diff --git a/flightctl/models/user_info_response.py b/flightctl/models/user_info_response.py new file mode 100644 index 0000000..5ddd26b --- /dev/null +++ b/flightctl/models/user_info_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.organization import Organization +from typing import Optional, Set +from typing_extensions import Self + +class UserInfoResponse(BaseModel): + """ + OIDC UserInfo response + """ # noqa: E501 + sub: Optional[StrictStr] = Field(default=None, description="Subject identifier.") + preferred_username: Optional[StrictStr] = Field(default=None, description="Preferred username.") + name: Optional[StrictStr] = Field(default=None, description="Full name.") + organizations: Optional[List[Organization]] = Field(default=None, description="User organizations.") + error: Optional[StrictStr] = Field(default=None, description="Error code.") + __properties: ClassVar[List[str]] = ["sub", "preferred_username", "name", "organizations", "error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UserInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in organizations (list) + _items = [] + if self.organizations: + for _item_organizations in self.organizations: + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UserInfoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "sub": obj.get("sub"), + "preferred_username": obj.get("preferred_username"), + "name": obj.get("name"), + "organizations": [Organization.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None, + "error": obj.get("error") + }) + return _obj + + diff --git a/flightctl/models/version.py b/flightctl/models/version.py index 4cf3bc2..badfa41 100644 --- a/flightctl/models/version.py +++ b/flightctl/models/version.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/flightctl/models/volume_mount.py b/flightctl/models/volume_mount.py new file mode 100644 index 0000000..f634cb1 --- /dev/null +++ b/flightctl/models/volume_mount.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class VolumeMount(BaseModel): + """ + Mount configuration for a volume. + """ # noqa: E501 + path: StrictStr = Field(description="Mount path in the container with support for options.") + __properties: ClassVar[List[str]] = ["path"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VolumeMount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VolumeMount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path") + }) + return _obj + + diff --git a/flightctl/rest.py b/flightctl/rest.py index 404aace..1bf15f0 100644 --- a/flightctl/rest.py +++ b/flightctl/rest.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -77,6 +77,7 @@ def __init__(self, configuration) -> None: "ca_certs": configuration.ssl_ca_cert, "cert_file": configuration.cert_file, "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, } if configuration.assert_hostname is not None: pool_args['assert_hostname'] = ( diff --git a/openapitools.json b/openapitools.json index 973a005..4267aac 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,7 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.11.0" + "version": "7.17.0", + "storageDir": "~/.openapi-generator" } } diff --git a/pyproject.toml b/pyproject.toml index dddb99c..96e5806 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,23 +1,29 @@ -[tool.poetry] +[project] name = "flightctl" version = "1.0.0" description = "Flight Control API" -authors = ["The Flight Control Team "] -license = "Apache 2.0" +authors = [ + {name = "The Flight Control Team",email = "team@flightctl.io"}, +] +license = { text = "Apache 2.0" } readme = "README.md" -repository = "https://github.com/flightctl/python-client" keywords = ["OpenAPI", "OpenAPI-Generator", "Flight Control API"] -include = ["flightctl/py.typed"] +requires-python = ">=3.9" -[tool.poetry.dependencies] -python = "^3.8" +dependencies = [ + "urllib3 (>=2.1.0,<3.0.0)", + "python-dateutil (>=2.8.2)", + "pydantic (>=2)", + "typing-extensions (>=4.7.1)", +] -urllib3 = ">= 1.25.3, < 3.0.0" -python-dateutil = ">= 2.8.2" -pydantic = ">= 2" -typing-extensions = ">= 4.7.1" +[project.urls] +Repository = "https://github.com/flightctl/python-client" + +[tool.poetry] +requires-poetry = ">=2.0" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] pytest = ">= 7.2.1" pytest-cov = ">= 2.8.1" tox = ">= 3.9.0" diff --git a/requirements.txt b/requirements.txt index 67f7f68..6cbb2b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -urllib3 >= 1.25.3, < 3.0.0 +urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/setup.py b/setup.py index 07d57fa..e2328cd 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: v1alpha1 + The version of the OpenAPI document: v1beta1 Contact: team@flightctl.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,9 +23,9 @@ # http://pypi.python.org/pypi/setuptools NAME = "flightctl" VERSION = "1.0.0" -PYTHON_REQUIRES = ">= 3.8" +PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ - "urllib3 >= 1.25.3, < 3.0.0", + "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "pydantic >= 2", "typing-extensions >= 4.7.1", diff --git a/test/test_aap_provider_spec.py b/test/test_aap_provider_spec.py new file mode 100644 index 0000000..8184684 --- /dev/null +++ b/test/test_aap_provider_spec.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.aap_provider_spec import AapProviderSpec + +class TestAapProviderSpec(unittest.TestCase): + """AapProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AapProviderSpec: + """Test AapProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AapProviderSpec` + """ + model = AapProviderSpec() + if include_optional: + return AapProviderSpec( + provider_type = 'aap', + display_name = '', + api_url = '', + authorization_url = '', + token_url = '', + client_id = '', + client_secret = '', + enabled = True, + scopes = [ + '' + ] + ) + else: + return AapProviderSpec( + provider_type = 'aap', + api_url = '', + authorization_url = '', + token_url = '', + client_id = '', + client_secret = '', + scopes = [ + '' + ], + ) + """ + + def testAapProviderSpec(self): + """Test AapProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_resource_limits.py b/test/test_application_resource_limits.py new file mode 100644 index 0000000..d5fecc1 --- /dev/null +++ b/test/test_application_resource_limits.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.application_resource_limits import ApplicationResourceLimits + +class TestApplicationResourceLimits(unittest.TestCase): + """ApplicationResourceLimits unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationResourceLimits: + """Test ApplicationResourceLimits + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationResourceLimits` + """ + model = ApplicationResourceLimits() + if include_optional: + return ApplicationResourceLimits( + cpu = '0.75', + memory = '256m' + ) + else: + return ApplicationResourceLimits( + ) + """ + + def testApplicationResourceLimits(self): + """Test ApplicationResourceLimits""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_resources.py b/test/test_application_resources.py new file mode 100644 index 0000000..44c4c71 --- /dev/null +++ b/test/test_application_resources.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.application_resources import ApplicationResources + +class TestApplicationResources(unittest.TestCase): + """ApplicationResources unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationResources: + """Test ApplicationResources + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ApplicationResources` + """ + model = ApplicationResources() + if include_optional: + return ApplicationResources( + limits = flightctl.models.application_resource_limits.ApplicationResourceLimits( + cpu = '0.75', + memory = '256m', ) + ) + else: + return ApplicationResources( + ) + """ + + def testApplicationResources(self): + """Test ApplicationResources""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_volume_reclaim_policy.py b/test/test_application_volume_reclaim_policy.py new file mode 100644 index 0000000..1451670 --- /dev/null +++ b/test/test_application_volume_reclaim_policy.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.application_volume_reclaim_policy import ApplicationVolumeReclaimPolicy + +class TestApplicationVolumeReclaimPolicy(unittest.TestCase): + """ApplicationVolumeReclaimPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApplicationVolumeReclaimPolicy(self): + """Test ApplicationVolumeReclaimPolicy""" + # inst = ApplicationVolumeReclaimPolicy() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_dynamic_organization_assignment.py b/test/test_auth_dynamic_organization_assignment.py new file mode 100644 index 0000000..15c4bb2 --- /dev/null +++ b/test/test_auth_dynamic_organization_assignment.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_dynamic_organization_assignment import AuthDynamicOrganizationAssignment + +class TestAuthDynamicOrganizationAssignment(unittest.TestCase): + """AuthDynamicOrganizationAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthDynamicOrganizationAssignment: + """Test AuthDynamicOrganizationAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthDynamicOrganizationAssignment` + """ + model = AuthDynamicOrganizationAssignment() + if include_optional: + return AuthDynamicOrganizationAssignment( + type = 'dynamic', + claim_path = [ + '' + ], + organization_name_prefix = '', + organization_name_suffix = '' + ) + else: + return AuthDynamicOrganizationAssignment( + type = 'dynamic', + claim_path = [ + '' + ], + ) + """ + + def testAuthDynamicOrganizationAssignment(self): + """Test AuthDynamicOrganizationAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_dynamic_role_assignment.py b/test/test_auth_dynamic_role_assignment.py new file mode 100644 index 0000000..82a16d6 --- /dev/null +++ b/test/test_auth_dynamic_role_assignment.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_dynamic_role_assignment import AuthDynamicRoleAssignment + +class TestAuthDynamicRoleAssignment(unittest.TestCase): + """AuthDynamicRoleAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthDynamicRoleAssignment: + """Test AuthDynamicRoleAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthDynamicRoleAssignment` + """ + model = AuthDynamicRoleAssignment() + if include_optional: + return AuthDynamicRoleAssignment( + type = 'dynamic', + claim_path = [ + '' + ], + separator = ':' + ) + else: + return AuthDynamicRoleAssignment( + type = 'dynamic', + claim_path = [ + '' + ], + ) + """ + + def testAuthDynamicRoleAssignment(self): + """Test AuthDynamicRoleAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_organization_assignment.py b/test/test_auth_organization_assignment.py new file mode 100644 index 0000000..58b793a --- /dev/null +++ b/test/test_auth_organization_assignment.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment + +class TestAuthOrganizationAssignment(unittest.TestCase): + """AuthOrganizationAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthOrganizationAssignment: + """Test AuthOrganizationAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthOrganizationAssignment` + """ + model = AuthOrganizationAssignment() + if include_optional: + return AuthOrganizationAssignment( + type = 'static', + organization_name = '', + claim_path = [ + '' + ], + organization_name_prefix = 'user-org-', + organization_name_suffix = '' + ) + else: + return AuthOrganizationAssignment( + type = 'static', + organization_name = '', + claim_path = [ + '' + ], + ) + """ + + def testAuthOrganizationAssignment(self): + """Test AuthOrganizationAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_per_user_organization_assignment.py b/test/test_auth_per_user_organization_assignment.py new file mode 100644 index 0000000..785a4d4 --- /dev/null +++ b/test/test_auth_per_user_organization_assignment.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_per_user_organization_assignment import AuthPerUserOrganizationAssignment + +class TestAuthPerUserOrganizationAssignment(unittest.TestCase): + """AuthPerUserOrganizationAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthPerUserOrganizationAssignment: + """Test AuthPerUserOrganizationAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthPerUserOrganizationAssignment` + """ + model = AuthPerUserOrganizationAssignment() + if include_optional: + return AuthPerUserOrganizationAssignment( + type = 'perUser', + organization_name_prefix = 'user-org-', + organization_name_suffix = '' + ) + else: + return AuthPerUserOrganizationAssignment( + type = 'perUser', + ) + """ + + def testAuthPerUserOrganizationAssignment(self): + """Test AuthPerUserOrganizationAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_provider.py b/test/test_auth_provider.py new file mode 100644 index 0000000..822e054 --- /dev/null +++ b/test/test_auth_provider.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_provider import AuthProvider + +class TestAuthProvider(unittest.TestCase): + """AuthProvider unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthProvider: + """Test AuthProvider + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthProvider` + """ + model = AuthProvider() + if include_optional: + return AuthProvider( + api_version = '', + kind = '', + metadata = flightctl.models.object_meta.ObjectMeta( + creation_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deletion_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + labels = { + 'key' : '' + }, + generation = 56, + owner = '', + annotations = { + 'key' : '' + }, + resource_version = '', ), + spec = None + ) + else: + return AuthProvider( + api_version = '', + kind = '', + metadata = flightctl.models.object_meta.ObjectMeta( + creation_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deletion_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + labels = { + 'key' : '' + }, + generation = 56, + owner = '', + annotations = { + 'key' : '' + }, + resource_version = '', ), + spec = None, + ) + """ + + def testAuthProvider(self): + """Test AuthProvider""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_provider_list.py b/test/test_auth_provider_list.py new file mode 100644 index 0000000..7e7c87c --- /dev/null +++ b/test/test_auth_provider_list.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_provider_list import AuthProviderList + +class TestAuthProviderList(unittest.TestCase): + """AuthProviderList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthProviderList: + """Test AuthProviderList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthProviderList` + """ + model = AuthProviderList() + if include_optional: + return AuthProviderList( + api_version = '', + kind = '', + metadata = flightctl.models.list_meta.ListMeta( + continue = '', + remaining_item_count = 56, ), + items = [ + flightctl.models.auth_provider.AuthProvider( + api_version = '', + kind = '', + metadata = flightctl.models.object_meta.ObjectMeta( + creation_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deletion_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + labels = { + 'key' : '' + }, + generation = 56, + owner = '', + annotations = { + 'key' : '' + }, + resource_version = '', ), + spec = null, ) + ] + ) + else: + return AuthProviderList( + api_version = '', + kind = '', + metadata = flightctl.models.list_meta.ListMeta( + continue = '', + remaining_item_count = 56, ), + items = [ + flightctl.models.auth_provider.AuthProvider( + api_version = '', + kind = '', + metadata = flightctl.models.object_meta.ObjectMeta( + creation_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deletion_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + labels = { + 'key' : '' + }, + generation = 56, + owner = '', + annotations = { + 'key' : '' + }, + resource_version = '', ), + spec = null, ) + ], + ) + """ + + def testAuthProviderList(self): + """Test AuthProviderList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_provider_spec.py b/test/test_auth_provider_spec.py new file mode 100644 index 0000000..997d86e --- /dev/null +++ b/test/test_auth_provider_spec.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_provider_spec import AuthProviderSpec + +class TestAuthProviderSpec(unittest.TestCase): + """AuthProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthProviderSpec: + """Test AuthProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthProviderSpec` + """ + model = AuthProviderSpec() + if include_optional: + return AuthProviderSpec( + provider_type = 'k8s', + display_name = '', + issuer = '', + client_id = '', + client_secret = '', + enabled = True, + scopes = [ + '' + ], + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + username_claim = [ + '' + ], + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment(), + authorization_url = '', + token_url = '', + userinfo_url = '', + introspection = flightctl.models.o_auth2_introspection.OAuth2Introspection(), + cluster_control_plane_url = '', + project_label_filter = '', + role_suffix = '', + api_url = '', + rbac_ns = '' + ) + else: + return AuthProviderSpec( + provider_type = 'k8s', + issuer = '', + client_id = '', + client_secret = '', + scopes = [ + '' + ], + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment(), + authorization_url = '', + token_url = '', + userinfo_url = '', + api_url = '', + ) + """ + + def testAuthProviderSpec(self): + """Test AuthProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_role_assignment.py b/test/test_auth_role_assignment.py new file mode 100644 index 0000000..defc5b3 --- /dev/null +++ b/test/test_auth_role_assignment.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_role_assignment import AuthRoleAssignment + +class TestAuthRoleAssignment(unittest.TestCase): + """AuthRoleAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthRoleAssignment: + """Test AuthRoleAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthRoleAssignment` + """ + model = AuthRoleAssignment() + if include_optional: + return AuthRoleAssignment( + type = 'static', + roles = [ + '' + ], + claim_path = [ + '' + ], + separator = ':' + ) + else: + return AuthRoleAssignment( + type = 'static', + roles = [ + '' + ], + claim_path = [ + '' + ], + ) + """ + + def testAuthRoleAssignment(self): + """Test AuthRoleAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_static_organization_assignment.py b/test/test_auth_static_organization_assignment.py new file mode 100644 index 0000000..e2767bb --- /dev/null +++ b/test/test_auth_static_organization_assignment.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_static_organization_assignment import AuthStaticOrganizationAssignment + +class TestAuthStaticOrganizationAssignment(unittest.TestCase): + """AuthStaticOrganizationAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthStaticOrganizationAssignment: + """Test AuthStaticOrganizationAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthStaticOrganizationAssignment` + """ + model = AuthStaticOrganizationAssignment() + if include_optional: + return AuthStaticOrganizationAssignment( + type = 'static', + organization_name = '' + ) + else: + return AuthStaticOrganizationAssignment( + type = 'static', + organization_name = '', + ) + """ + + def testAuthStaticOrganizationAssignment(self): + """Test AuthStaticOrganizationAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_auth_static_role_assignment.py b/test/test_auth_static_role_assignment.py new file mode 100644 index 0000000..a699800 --- /dev/null +++ b/test/test_auth_static_role_assignment.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.auth_static_role_assignment import AuthStaticRoleAssignment + +class TestAuthStaticRoleAssignment(unittest.TestCase): + """AuthStaticRoleAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AuthStaticRoleAssignment: + """Test AuthStaticRoleAssignment + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AuthStaticRoleAssignment` + """ + model = AuthStaticRoleAssignment() + if include_optional: + return AuthStaticRoleAssignment( + type = 'static', + roles = [ + '' + ] + ) + else: + return AuthStaticRoleAssignment( + type = 'static', + roles = [ + '' + ], + ) + """ + + def testAuthStaticRoleAssignment(self): + """Test AuthStaticRoleAssignment""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_authprovider_api.py b/test/test_authprovider_api.py new file mode 100644 index 0000000..3a6b530 --- /dev/null +++ b/test/test_authprovider_api.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.api.authprovider_api import AuthproviderApi + + +class TestAuthproviderApi(unittest.TestCase): + """AuthproviderApi unit test stubs""" + + def setUp(self) -> None: + self.api = AuthproviderApi() + + def tearDown(self) -> None: + pass + + def test_create_auth_provider(self) -> None: + """Test case for create_auth_provider + + """ + pass + + def test_delete_auth_provider(self) -> None: + """Test case for delete_auth_provider + + """ + pass + + def test_get_auth_provider(self) -> None: + """Test case for get_auth_provider + + """ + pass + + def test_list_auth_providers(self) -> None: + """Test case for list_auth_providers + + """ + pass + + def test_patch_auth_provider(self) -> None: + """Test case for patch_auth_provider + + """ + pass + + def test_replace_auth_provider(self) -> None: + """Test case for replace_auth_provider + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_git_hub_introspection_spec.py b/test/test_git_hub_introspection_spec.py new file mode 100644 index 0000000..c460e35 --- /dev/null +++ b/test/test_git_hub_introspection_spec.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.git_hub_introspection_spec import GitHubIntrospectionSpec + +class TestGitHubIntrospectionSpec(unittest.TestCase): + """GitHubIntrospectionSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GitHubIntrospectionSpec: + """Test GitHubIntrospectionSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GitHubIntrospectionSpec` + """ + model = GitHubIntrospectionSpec() + if include_optional: + return GitHubIntrospectionSpec( + type = 'github', + url = 'https://api.github.com' + ) + else: + return GitHubIntrospectionSpec( + type = 'github', + ) + """ + + def testGitHubIntrospectionSpec(self): + """Test GitHubIntrospectionSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_mount_volume_provider_spec.py b/test/test_image_mount_volume_provider_spec.py new file mode 100644 index 0000000..da314be --- /dev/null +++ b/test/test_image_mount_volume_provider_spec.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.image_mount_volume_provider_spec import ImageMountVolumeProviderSpec + +class TestImageMountVolumeProviderSpec(unittest.TestCase): + """ImageMountVolumeProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageMountVolumeProviderSpec: + """Test ImageMountVolumeProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImageMountVolumeProviderSpec` + """ + model = ImageMountVolumeProviderSpec() + if include_optional: + return ImageMountVolumeProviderSpec( + image = flightctl.models.image_volume_source.ImageVolumeSource( + reference = '', + pull_policy = 'IfNotPresent', ), + mount = flightctl.models.volume_mount.VolumeMount( + path = '/etc/nginx/conf.d:ro', ) + ) + else: + return ImageMountVolumeProviderSpec( + image = flightctl.models.image_volume_source.ImageVolumeSource( + reference = '', + pull_policy = 'IfNotPresent', ), + mount = flightctl.models.volume_mount.VolumeMount( + path = '/etc/nginx/conf.d:ro', ), + ) + """ + + def testImageMountVolumeProviderSpec(self): + """Test ImageMountVolumeProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_jwt_introspection_spec.py b/test/test_jwt_introspection_spec.py new file mode 100644 index 0000000..1d72261 --- /dev/null +++ b/test/test_jwt_introspection_spec.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.jwt_introspection_spec import JwtIntrospectionSpec + +class TestJwtIntrospectionSpec(unittest.TestCase): + """JwtIntrospectionSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> JwtIntrospectionSpec: + """Test JwtIntrospectionSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `JwtIntrospectionSpec` + """ + model = JwtIntrospectionSpec() + if include_optional: + return JwtIntrospectionSpec( + type = 'jwt', + jwks_url = '', + issuer = '', + audience = [ + '' + ] + ) + else: + return JwtIntrospectionSpec( + type = 'jwt', + jwks_url = '', + ) + """ + + def testJwtIntrospectionSpec(self): + """Test JwtIntrospectionSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_k8s_provider_spec.py b/test/test_k8s_provider_spec.py new file mode 100644 index 0000000..09c7ee5 --- /dev/null +++ b/test/test_k8s_provider_spec.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.k8s_provider_spec import K8sProviderSpec + +class TestK8sProviderSpec(unittest.TestCase): + """K8sProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> K8sProviderSpec: + """Test K8sProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `K8sProviderSpec` + """ + model = K8sProviderSpec() + if include_optional: + return K8sProviderSpec( + provider_type = 'k8s', + display_name = '', + api_url = '', + rbac_ns = '', + enabled = True, + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment(), + role_suffix = '' + ) + else: + return K8sProviderSpec( + provider_type = 'k8s', + api_url = '', + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment(), + ) + """ + + def testK8sProviderSpec(self): + """Test K8sProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mount_volume_provider_spec.py b/test/test_mount_volume_provider_spec.py new file mode 100644 index 0000000..acd154a --- /dev/null +++ b/test/test_mount_volume_provider_spec.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.mount_volume_provider_spec import MountVolumeProviderSpec + +class TestMountVolumeProviderSpec(unittest.TestCase): + """MountVolumeProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MountVolumeProviderSpec: + """Test MountVolumeProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MountVolumeProviderSpec` + """ + model = MountVolumeProviderSpec() + if include_optional: + return MountVolumeProviderSpec( + mount = flightctl.models.volume_mount.VolumeMount( + path = '/etc/nginx/conf.d:ro', ) + ) + else: + return MountVolumeProviderSpec( + mount = flightctl.models.volume_mount.VolumeMount( + path = '/etc/nginx/conf.d:ro', ), + ) + """ + + def testMountVolumeProviderSpec(self): + """Test MountVolumeProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_introspection.py b/test/test_o_auth2_introspection.py new file mode 100644 index 0000000..f297526 --- /dev/null +++ b/test/test_o_auth2_introspection.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.o_auth2_introspection import OAuth2Introspection + +class TestOAuth2Introspection(unittest.TestCase): + """OAuth2Introspection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuth2Introspection: + """Test OAuth2Introspection + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2Introspection` + """ + model = OAuth2Introspection() + if include_optional: + return OAuth2Introspection( + type = 'rfc7662', + url = 'https://api.github.com', + jwks_url = '', + issuer = '', + audience = [ + '' + ] + ) + else: + return OAuth2Introspection( + type = 'rfc7662', + url = 'https://api.github.com', + jwks_url = '', + ) + """ + + def testOAuth2Introspection(self): + """Test OAuth2Introspection""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_provider_spec.py b/test/test_o_auth2_provider_spec.py new file mode 100644 index 0000000..557e39e --- /dev/null +++ b/test/test_o_auth2_provider_spec.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.o_auth2_provider_spec import OAuth2ProviderSpec + +class TestOAuth2ProviderSpec(unittest.TestCase): + """OAuth2ProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OAuth2ProviderSpec: + """Test OAuth2ProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OAuth2ProviderSpec` + """ + model = OAuth2ProviderSpec() + if include_optional: + return OAuth2ProviderSpec( + provider_type = 'oauth2', + display_name = '', + issuer = '', + authorization_url = '', + token_url = '', + userinfo_url = '', + client_id = '', + client_secret = '', + enabled = True, + scopes = [ + '' + ], + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + username_claim = [ + '' + ], + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment(), + introspection = flightctl.models.o_auth2_introspection.OAuth2Introspection() + ) + else: + return OAuth2ProviderSpec( + provider_type = 'oauth2', + authorization_url = '', + token_url = '', + userinfo_url = '', + client_id = '', + client_secret = '', + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment(), + ) + """ + + def testOAuth2ProviderSpec(self): + """Test OAuth2ProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_oidc_provider_spec.py b/test/test_oidc_provider_spec.py new file mode 100644 index 0000000..39face7 --- /dev/null +++ b/test/test_oidc_provider_spec.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.oidc_provider_spec import OIDCProviderSpec + +class TestOIDCProviderSpec(unittest.TestCase): + """OIDCProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OIDCProviderSpec: + """Test OIDCProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OIDCProviderSpec` + """ + model = OIDCProviderSpec() + if include_optional: + return OIDCProviderSpec( + provider_type = 'oidc', + display_name = '', + issuer = '', + client_id = '', + client_secret = '', + enabled = True, + scopes = [ + '' + ], + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + username_claim = [ + '' + ], + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment() + ) + else: + return OIDCProviderSpec( + provider_type = 'oidc', + issuer = '', + client_id = '', + client_secret = '', + organization_assignment = flightctl.models.auth_organization_assignment.AuthOrganizationAssignment(), + role_assignment = flightctl.models.auth_role_assignment.AuthRoleAssignment(), + ) + """ + + def testOIDCProviderSpec(self): + """Test OIDCProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_shift_provider_spec.py b/test/test_open_shift_provider_spec.py new file mode 100644 index 0000000..c3e05e5 --- /dev/null +++ b/test/test_open_shift_provider_spec.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.open_shift_provider_spec import OpenShiftProviderSpec + +class TestOpenShiftProviderSpec(unittest.TestCase): + """OpenShiftProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenShiftProviderSpec: + """Test OpenShiftProviderSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenShiftProviderSpec` + """ + model = OpenShiftProviderSpec() + if include_optional: + return OpenShiftProviderSpec( + provider_type = 'openshift', + display_name = '', + issuer = '', + authorization_url = '', + token_url = '', + client_id = '', + client_secret = '', + enabled = True, + scopes = [ + '' + ], + cluster_control_plane_url = '', + project_label_filter = '', + role_suffix = '' + ) + else: + return OpenShiftProviderSpec( + provider_type = 'openshift', + ) + """ + + def testOpenShiftProviderSpec(self): + """Test OpenShiftProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_permission.py b/test/test_permission.py new file mode 100644 index 0000000..bb366d4 --- /dev/null +++ b/test/test_permission.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.permission import Permission + +class TestPermission(unittest.TestCase): + """Permission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Permission: + """Test Permission + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Permission` + """ + model = Permission() + if include_optional: + return Permission( + resource = '', + operations = [ + '' + ] + ) + else: + return Permission( + resource = '', + operations = [ + '' + ], + ) + """ + + def testPermission(self): + """Test Permission""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_permission_list.py b/test/test_permission_list.py new file mode 100644 index 0000000..a7c7548 --- /dev/null +++ b/test/test_permission_list.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.permission_list import PermissionList + +class TestPermissionList(unittest.TestCase): + """PermissionList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PermissionList: + """Test PermissionList + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PermissionList` + """ + model = PermissionList() + if include_optional: + return PermissionList( + permissions = [ + flightctl.models.permission.Permission( + resource = '', + operations = [ + '' + ], ) + ] + ) + else: + return PermissionList( + permissions = [ + flightctl.models.permission.Permission( + resource = '', + operations = [ + '' + ], ) + ], + ) + """ + + def testPermissionList(self): + """Test PermissionList""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_rfc7662_introspection_spec.py b/test/test_rfc7662_introspection_spec.py new file mode 100644 index 0000000..32e3f27 --- /dev/null +++ b/test/test_rfc7662_introspection_spec.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.rfc7662_introspection_spec import Rfc7662IntrospectionSpec + +class TestRfc7662IntrospectionSpec(unittest.TestCase): + """Rfc7662IntrospectionSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Rfc7662IntrospectionSpec: + """Test Rfc7662IntrospectionSpec + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Rfc7662IntrospectionSpec` + """ + model = Rfc7662IntrospectionSpec() + if include_optional: + return Rfc7662IntrospectionSpec( + type = 'rfc7662', + url = '' + ) + else: + return Rfc7662IntrospectionSpec( + type = 'rfc7662', + url = '', + ) + """ + + def testRfc7662IntrospectionSpec(self): + """Test Rfc7662IntrospectionSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_systemd_active_state_type.py b/test/test_systemd_active_state_type.py new file mode 100644 index 0000000..18005a7 --- /dev/null +++ b/test/test_systemd_active_state_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.systemd_active_state_type import SystemdActiveStateType + +class TestSystemdActiveStateType(unittest.TestCase): + """SystemdActiveStateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSystemdActiveStateType(self): + """Test SystemdActiveStateType""" + # inst = SystemdActiveStateType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_systemd_enable_state_type.py b/test/test_systemd_enable_state_type.py new file mode 100644 index 0000000..4793c2b --- /dev/null +++ b/test/test_systemd_enable_state_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.systemd_enable_state_type import SystemdEnableStateType + +class TestSystemdEnableStateType(unittest.TestCase): + """SystemdEnableStateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSystemdEnableStateType(self): + """Test SystemdEnableStateType""" + # inst = SystemdEnableStateType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_systemd_load_state_type.py b/test/test_systemd_load_state_type.py new file mode 100644 index 0000000..0b9d6b2 --- /dev/null +++ b/test/test_systemd_load_state_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.systemd_load_state_type import SystemdLoadStateType + +class TestSystemdLoadStateType(unittest.TestCase): + """SystemdLoadStateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSystemdLoadStateType(self): + """Test SystemdLoadStateType""" + # inst = SystemdLoadStateType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_systemd_unit_status.py b/test/test_systemd_unit_status.py new file mode 100644 index 0000000..75902ae --- /dev/null +++ b/test/test_systemd_unit_status.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.systemd_unit_status import SystemdUnitStatus + +class TestSystemdUnitStatus(unittest.TestCase): + """SystemdUnitStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SystemdUnitStatus: + """Test SystemdUnitStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SystemdUnitStatus` + """ + model = SystemdUnitStatus() + if include_optional: + return SystemdUnitStatus( + unit = 'sshd.service', + description = 'OpenSSH server daemon', + enable_state = 'enabled', + load_state = 'stub', + active_state = 'active', + sub_state = 'running' + ) + else: + return SystemdUnitStatus( + unit = 'sshd.service', + description = 'OpenSSH server daemon', + enable_state = 'enabled', + load_state = 'stub', + active_state = 'active', + sub_state = 'running', + ) + """ + + def testSystemdUnitStatus(self): + """Test SystemdUnitStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_token_request.py b/test/test_token_request.py new file mode 100644 index 0000000..06415a0 --- /dev/null +++ b/test/test_token_request.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.token_request import TokenRequest + +class TestTokenRequest(unittest.TestCase): + """TokenRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenRequest: + """Test TokenRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenRequest` + """ + model = TokenRequest() + if include_optional: + return TokenRequest( + grant_type = 'refresh_token', + client_id = '', + refresh_token = '', + code = '', + scope = '', + code_verifier = '', + redirect_uri = '' + ) + else: + return TokenRequest( + grant_type = 'refresh_token', + client_id = '', + ) + """ + + def testTokenRequest(self): + """Test TokenRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_token_response.py b/test/test_token_response.py new file mode 100644 index 0000000..15c8a91 --- /dev/null +++ b/test/test_token_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.token_response import TokenResponse + +class TestTokenResponse(unittest.TestCase): + """TokenResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenResponse: + """Test TokenResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenResponse` + """ + model = TokenResponse() + if include_optional: + return TokenResponse( + access_token = '', + token_type = 'Bearer', + id_token = '', + refresh_token = '', + expires_in = 56, + error = '', + error_description = '' + ) + else: + return TokenResponse( + ) + """ + + def testTokenResponse(self): + """Test TokenResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_info_response.py b/test/test_user_info_response.py new file mode 100644 index 0000000..310515e --- /dev/null +++ b/test/test_user_info_response.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.user_info_response import UserInfoResponse + +class TestUserInfoResponse(unittest.TestCase): + """UserInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UserInfoResponse: + """Test UserInfoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UserInfoResponse` + """ + model = UserInfoResponse() + if include_optional: + return UserInfoResponse( + sub = '', + preferred_username = '', + name = '', + organizations = [ + flightctl.models.organization.Organization( + api_version = '', + kind = '', + metadata = flightctl.models.object_meta.ObjectMeta( + creation_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + deletion_timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '', + labels = { + 'key' : '' + }, + generation = 56, + owner = '', + annotations = { + 'key' : '' + }, + resource_version = '', ), + spec = flightctl.models.organization_spec.OrganizationSpec( + display_name = '', + external_id = '', ), ) + ], + error = '' + ) + else: + return UserInfoResponse( + ) + """ + + def testUserInfoResponse(self): + """Test UserInfoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_volume_mount.py b/test/test_volume_mount.py new file mode 100644 index 0000000..8190296 --- /dev/null +++ b/test/test_volume_mount.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: v1beta1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.models.volume_mount import VolumeMount + +class TestVolumeMount(unittest.TestCase): + """VolumeMount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> VolumeMount: + """Test VolumeMount + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `VolumeMount` + """ + model = VolumeMount() + if include_optional: + return VolumeMount( + path = '/etc/nginx/conf.d:ro' + ) + else: + return VolumeMount( + path = '/etc/nginx/conf.d:ro', + ) + """ + + def testVolumeMount(self): + """Test VolumeMount""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()