diff --git a/Makefile b/Makefile index 8845a41..9afcb36 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ # Python package version. Override on generate: -# make generate-client VERSION=1.3.0 -VERSION ?= 1.3.0 +# make generate-client VERSION=1.4.0 +VERSION ?= 1.4.0 GENERATOR_VERSION = 7.17.0 COMMON_PROPS = packageName=flightctl,useOneOfDiscriminatorLookup=true,packageVersion=$(VERSION),removeEnumValuePrefix=false GIT_USER = flightctl GIT_REPO = python-client # Required: flightctl/flightctl release tag. -# Example: make fetch-specs FLIGHTCTL_VERSION=v1.3.0 +# Example: make fetch-specs FLIGHTCTL_VERSION=v1.4.0 FLIGHTCTL_REPO = https://raw.githubusercontent.com/flightctl/flightctl FLIGHTCTL_VERSION ?= SPEC_FILES = \ @@ -20,7 +20,7 @@ SPEC_FILES = \ fetch-specs: @if [ -z "$(FLIGHTCTL_VERSION)" ]; then \ echo "FLIGHTCTL_VERSION is required (flightctl/flightctl release tag)."; \ - echo "Example: make fetch-specs FLIGHTCTL_VERSION=v1.3.0"; \ + echo "Example: make fetch-specs FLIGHTCTL_VERSION=v1.4.0"; \ exit 1; \ fi @for f in $(SPEC_FILES); do \ diff --git a/README.md b/README.md index 0afdf62..b97eee2 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,14 @@ This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1beta1 -- Package version: 1.3.0 +- Package version: 1.4.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.9+ +Python 3.10+ ## Installation & Usage ### pip install @@ -109,10 +109,12 @@ Class | Method | HTTP request | Description *DeviceApi* | [**get_device**](docs/DeviceApi.md#get_device) | **GET** /devices/{name} | *DeviceApi* | [**get_device_application_console**](docs/DeviceApi.md#get_device_application_console) | **GET** /ws/v1/devices/{name}/applications/{appname}/console | *DeviceApi* | [**get_device_console**](docs/DeviceApi.md#get_device_console) | **GET** /ws/v1/devices/{name}/console | +*DeviceApi* | [**get_device_label_sync_provenance**](docs/DeviceApi.md#get_device_label_sync_provenance) | **GET** /devices/{name}/labelsyncprovenance | *DeviceApi* | [**get_device_last_seen**](docs/DeviceApi.md#get_device_last_seen) | **GET** /devices/{name}/lastseen | *DeviceApi* | [**get_device_status**](docs/DeviceApi.md#get_device_status) | **GET** /devices/{name}/status | *DeviceApi* | [**get_rendered_device**](docs/DeviceApi.md#get_rendered_device) | **GET** /devices/{name}/rendered | *DeviceApi* | [**list_devices**](docs/DeviceApi.md#list_devices) | **GET** /devices | +*DeviceApi* | [**override_device_enrollment_hook**](docs/DeviceApi.md#override_device_enrollment_hook) | **POST** /devices/{name}/enrollmenthooks/override | *DeviceApi* | [**patch_device**](docs/DeviceApi.md#patch_device) | **PATCH** /devices/{name} | *DeviceApi* | [**patch_device_status**](docs/DeviceApi.md#patch_device_status) | **PATCH** /devices/{name}/status | *DeviceApi* | [**replace_device**](docs/DeviceApi.md#replace_device) | **PUT** /devices/{name} | @@ -121,6 +123,12 @@ Class | Method | HTTP request | Description *DeviceApi* | [**start_device_application**](docs/DeviceApi.md#start_device_application) | **POST** /devices/{name}/applications/{appname}/actions/start | *DeviceApi* | [**stop_device_application**](docs/DeviceApi.md#stop_device_application) | **POST** /devices/{name}/applications/{appname}/actions/stop | *DeviceactionsApi* | [**resume_devices**](docs/DeviceactionsApi.md#resume_devices) | **POST** /deviceactions/resume | +*EnrollmenthookpolicyApi* | [**create_enrollment_hook_policy**](docs/EnrollmenthookpolicyApi.md#create_enrollment_hook_policy) | **POST** /enrollmenthookpolicies | +*EnrollmenthookpolicyApi* | [**delete_enrollment_hook_policy**](docs/EnrollmenthookpolicyApi.md#delete_enrollment_hook_policy) | **DELETE** /enrollmenthookpolicies/{name} | +*EnrollmenthookpolicyApi* | [**get_enrollment_hook_policy**](docs/EnrollmenthookpolicyApi.md#get_enrollment_hook_policy) | **GET** /enrollmenthookpolicies/{name} | +*EnrollmenthookpolicyApi* | [**list_enrollment_hook_policies**](docs/EnrollmenthookpolicyApi.md#list_enrollment_hook_policies) | **GET** /enrollmenthookpolicies | +*EnrollmenthookpolicyApi* | [**patch_enrollment_hook_policy**](docs/EnrollmenthookpolicyApi.md#patch_enrollment_hook_policy) | **PATCH** /enrollmenthookpolicies/{name} | +*EnrollmenthookpolicyApi* | [**replace_enrollment_hook_policy**](docs/EnrollmenthookpolicyApi.md#replace_enrollment_hook_policy) | **PUT** /enrollmenthookpolicies/{name} | *EnrollmentrequestApi* | [**approve_enrollment_request**](docs/EnrollmentrequestApi.md#approve_enrollment_request) | **PUT** /enrollmentrequests/{name}/approval | *EnrollmentrequestApi* | [**create_enrollment_request**](docs/EnrollmentrequestApi.md#create_enrollment_request) | **POST** /enrollmentrequests | *EnrollmentrequestApi* | [**delete_enrollment_request**](docs/EnrollmentrequestApi.md#delete_enrollment_request) | **DELETE** /enrollmentrequests/{name} | @@ -148,6 +156,13 @@ Class | Method | HTTP request | Description *FleetApi* | [**start_fleet_application**](docs/FleetApi.md#start_fleet_application) | **POST** /fleets/{name}/applications/{appname}/actions/start | *FleetApi* | [**stop_fleet_application**](docs/FleetApi.md#stop_fleet_application) | **POST** /fleets/{name}/applications/{appname}/actions/stop | *LabelApi* | [**list_labels**](docs/LabelApi.md#list_labels) | **GET** /labels | +*LabelsyncmappingApi* | [**create_label_sync_mapping**](docs/LabelsyncmappingApi.md#create_label_sync_mapping) | **POST** /labelsyncmappings | +*LabelsyncmappingApi* | [**delete_label_sync_mapping**](docs/LabelsyncmappingApi.md#delete_label_sync_mapping) | **DELETE** /labelsyncmappings/{name} | +*LabelsyncmappingApi* | [**get_label_sync_mapping**](docs/LabelsyncmappingApi.md#get_label_sync_mapping) | **GET** /labelsyncmappings/{name} | +*LabelsyncmappingApi* | [**get_label_sync_provenance**](docs/LabelsyncmappingApi.md#get_label_sync_provenance) | **GET** /labelsyncprovenance | +*LabelsyncmappingApi* | [**list_label_sync_mappings**](docs/LabelsyncmappingApi.md#list_label_sync_mappings) | **GET** /labelsyncmappings | +*LabelsyncmappingApi* | [**patch_label_sync_mapping**](docs/LabelsyncmappingApi.md#patch_label_sync_mapping) | **PATCH** /labelsyncmappings/{name} | +*LabelsyncmappingApi* | [**replace_label_sync_mapping**](docs/LabelsyncmappingApi.md#replace_label_sync_mapping) | **PUT** /labelsyncmappings/{name} | *OrganizationApi* | [**list_organizations**](docs/OrganizationApi.md#list_organizations) | **GET** /organizations | List organizations *RepositoryApi* | [**check_repository_oci_image**](docs/RepositoryApi.md#check_repository_oci_image) | **POST** /repositories/{name}/check-oci-image | *RepositoryApi* | [**check_repository_oci_tag**](docs/RepositoryApi.md#check_repository_oci_tag) | **POST** /repositories/{name}/check-oci-tag | @@ -175,6 +190,7 @@ Class | Method | HTTP request | Description - [ApplicationContent](docs/ApplicationContent.md) - [ApplicationDesiredState](docs/ApplicationDesiredState.md) - [ApplicationEnvVars](docs/ApplicationEnvVars.md) + - [ApplicationImageDigest](docs/ApplicationImageDigest.md) - [ApplicationLifecycleChangedDetails](docs/ApplicationLifecycleChangedDetails.md) - [ApplicationProviderBase](docs/ApplicationProviderBase.md) - [ApplicationProviderSpec](docs/ApplicationProviderSpec.md) @@ -220,6 +236,9 @@ Class | Method | HTTP request | Description - [ContainerApplication](docs/ContainerApplication.md) - [ContainerApplicationProperties](docs/ContainerApplicationProperties.md) - [CpuResourceMonitorSpec](docs/CpuResourceMonitorSpec.md) + - [DeltaGenerationPhase](docs/DeltaGenerationPhase.md) + - [DeltaGenerationProgressDetails](docs/DeltaGenerationProgressDetails.md) + - [DeltaGenerationStatus](docs/DeltaGenerationStatus.md) - [DependencyChangeDetectedDetails](docs/DependencyChangeDetectedDetails.md) - [DependencySyncConfigRefStatus](docs/DependencySyncConfigRefStatus.md) - [DependencySyncProbeFailedDetails](docs/DependencySyncProbeFailedDetails.md) @@ -232,10 +251,15 @@ Class | Method | HTTP request | Description - [DeviceConsole](docs/DeviceConsole.md) - [DeviceDecommission](docs/DeviceDecommission.md) - [DeviceDecommissionTargetType](docs/DeviceDecommissionTargetType.md) + - [DeviceDeltaApplyOutcomeType](docs/DeviceDeltaApplyOutcomeType.md) + - [DeviceDeltaApplyStatus](docs/DeviceDeltaApplyStatus.md) + - [DeviceEnrollmentHooksStatus](docs/DeviceEnrollmentHooksStatus.md) + - [DeviceGpu](docs/DeviceGpu.md) - [DeviceIntegrityCheckStatus](docs/DeviceIntegrityCheckStatus.md) - [DeviceIntegrityCheckStatusType](docs/DeviceIntegrityCheckStatusType.md) - [DeviceIntegrityStatus](docs/DeviceIntegrityStatus.md) - [DeviceIntegrityStatusSummaryType](docs/DeviceIntegrityStatusSummaryType.md) + - [DeviceKvm](docs/DeviceKvm.md) - [DeviceLastSeen](docs/DeviceLastSeen.md) - [DeviceLifecycleHookType](docs/DeviceLifecycleHookType.md) - [DeviceLifecycleStatus](docs/DeviceLifecycleStatus.md) @@ -243,6 +267,7 @@ Class | Method | HTTP request | Description - [DeviceList](docs/DeviceList.md) - [DeviceMultipleOwnersDetectedDetails](docs/DeviceMultipleOwnersDetectedDetails.md) - [DeviceMultipleOwnersResolvedDetails](docs/DeviceMultipleOwnersResolvedDetails.md) + - [DeviceOsSpec](docs/DeviceOsSpec.md) - [DeviceOsStatus](docs/DeviceOsStatus.md) - [DeviceOwnershipChangedDetails](docs/DeviceOwnershipChangedDetails.md) - [DeviceResourceStatus](docs/DeviceResourceStatus.md) @@ -255,6 +280,9 @@ Class | Method | HTTP request | Description - [DeviceSummaryStatus](docs/DeviceSummaryStatus.md) - [DeviceSummaryStatusType](docs/DeviceSummaryStatusType.md) - [DeviceSystemInfo](docs/DeviceSystemInfo.md) + - [DeviceSystemInfoStatus](docs/DeviceSystemInfoStatus.md) + - [DeviceSystemInfoStatuses](docs/DeviceSystemInfoStatuses.md) + - [DeviceSystemInfoSummaryStatus](docs/DeviceSystemInfoSummaryStatus.md) - [DeviceUpdatePolicySpec](docs/DeviceUpdatePolicySpec.md) - [DeviceUpdatedStatus](docs/DeviceUpdatedStatus.md) - [DeviceUpdatedStatusType](docs/DeviceUpdatedStatusType.md) @@ -266,6 +294,16 @@ Class | Method | HTTP request | Description - [DockerAuth](docs/DockerAuth.md) - [EncodingType](docs/EncodingType.md) - [EnrollmentConfig](docs/EnrollmentConfig.md) + - [EnrollmentHookAuth](docs/EnrollmentHookAuth.md) + - [EnrollmentHookHttpAction](docs/EnrollmentHookHttpAction.md) + - [EnrollmentHookPolicy](docs/EnrollmentHookPolicy.md) + - [EnrollmentHookPolicyList](docs/EnrollmentHookPolicyList.md) + - [EnrollmentHookPolicySpec](docs/EnrollmentHookPolicySpec.md) + - [EnrollmentHookPolicyStatus](docs/EnrollmentHookPolicyStatus.md) + - [EnrollmentHookRetryPolicy](docs/EnrollmentHookRetryPolicy.md) + - [EnrollmentHookSnapshot](docs/EnrollmentHookSnapshot.md) + - [EnrollmentHookSnapshotAction](docs/EnrollmentHookSnapshotAction.md) + - [EnrollmentHookStageSpec](docs/EnrollmentHookStageSpec.md) - [EnrollmentRequest](docs/EnrollmentRequest.md) - [EnrollmentRequestApproval](docs/EnrollmentRequestApproval.md) - [EnrollmentRequestApprovalStatus](docs/EnrollmentRequestApprovalStatus.md) @@ -279,6 +317,7 @@ Class | Method | HTTP request | Description - [EventDetails](docs/EventDetails.md) - [EventList](docs/EventList.md) - [EventSource](docs/EventSource.md) + - [FailurePolicyType](docs/FailurePolicyType.md) - [FileContent](docs/FileContent.md) - [FileMetadata](docs/FileMetadata.md) - [FileOperation](docs/FileOperation.md) @@ -308,6 +347,7 @@ Class | Method | HTTP request | Description - [HttpConfigProviderSpec](docs/HttpConfigProviderSpec.md) - [HttpConfigProviderSpecHttpRef](docs/HttpConfigProviderSpecHttpRef.md) - [HttpRepoSpec](docs/HttpRepoSpec.md) + - [ImageDeltaHint](docs/ImageDeltaHint.md) - [ImageMountVolumeProviderSpec](docs/ImageMountVolumeProviderSpec.md) - [ImageOrCatalogItemRefSpec](docs/ImageOrCatalogItemRefSpec.md) - [ImagePullPolicy](docs/ImagePullPolicy.md) @@ -323,6 +363,12 @@ Class | Method | HTTP request | Description - [KubernetesSecretProviderSpec](docs/KubernetesSecretProviderSpec.md) - [KubernetesSecretProviderSpecSecretRef](docs/KubernetesSecretProviderSpecSecretRef.md) - [LabelSelector](docs/LabelSelector.md) + - [LabelSyncMapping](docs/LabelSyncMapping.md) + - [LabelSyncMappingList](docs/LabelSyncMappingList.md) + - [LabelSyncMappingSpec](docs/LabelSyncMappingSpec.md) + - [LabelSyncMappingStatus](docs/LabelSyncMappingStatus.md) + - [LabelSyncProvenanceItem](docs/LabelSyncProvenanceItem.md) + - [LabelSyncProvenanceList](docs/LabelSyncProvenanceList.md) - [ListMeta](docs/ListMeta.md) - [MatchExpression](docs/MatchExpression.md) - [MemoryResourceMonitorSpec](docs/MemoryResourceMonitorSpec.md) @@ -342,6 +388,9 @@ Class | Method | HTTP request | Description - [PatchRequestInner](docs/PatchRequestInner.md) - [Permission](docs/Permission.md) - [PermissionList](docs/PermissionList.md) + - [PreEnrollmentActionResult](docs/PreEnrollmentActionResult.md) + - [PreEnrollmentResult](docs/PreEnrollmentResult.md) + - [PrepareDeltasDetails](docs/PrepareDeltasDetails.md) - [QuadletApplication](docs/QuadletApplication.md) - [ReferencedRepositoryUpdatedDetails](docs/ReferencedRepositoryUpdatedDetails.md) - [RelativePath](docs/RelativePath.md) @@ -364,9 +413,13 @@ Class | Method | HTTP request | Description - [ResourceUpdatedDetails](docs/ResourceUpdatedDetails.md) - [Rfc7662IntrospectionSpec](docs/Rfc7662IntrospectionSpec.md) - [RolloutPolicy](docs/RolloutPolicy.md) + - [RolloutPolicyDeltaGeneration](docs/RolloutPolicyDeltaGeneration.md) - [RolloutStrategy](docs/RolloutStrategy.md) - [SshConfig](docs/SshConfig.md) - [Status](docs/Status.md) + - [SystemInfoSourceStatus](docs/SystemInfoSourceStatus.md) + - [SystemInfoSourceStatusType](docs/SystemInfoSourceStatusType.md) + - [SystemInfoSummaryStatusType](docs/SystemInfoSummaryStatusType.md) - [SystemdActiveStateType](docs/SystemdActiveStateType.md) - [SystemdEnableStateType](docs/SystemdEnableStateType.md) - [SystemdLoadStateType](docs/SystemdLoadStateType.md) @@ -406,4 +459,3 @@ Authentication schemes defined for the API: team@flightctl.io - diff --git a/api/bundled/core-v1alpha1.yaml b/api/bundled/core-v1alpha1.yaml deleted file mode 100644 index 293dc32..0000000 --- a/api/bundled/core-v1alpha1.yaml +++ /dev/null @@ -1,2859 +0,0 @@ -openapi: 3.0.1 -info: - title: Flight Control API - version: v1alpha1 - description: | - [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - - This API version (v1alpha1) contains alpha-stage resources that are subject to change. - contact: - name: The Flight Control Team - url: https://flightctl.io - email: team@flightctl.io - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html -servers: - - url: /api/v1 -tags: - - name: catalog - description: Operations on Catalog resources. - - name: vulnerability - description: Operations for vulnerability reports and organization-wide summaries. -paths: - /catalogitems: - x-resource: catalogitems - get: - tags: - - catalog - description: List CatalogItems across all Catalogs. - operationId: listAllCatalogItems - parameters: - - name: continue - in: query - description: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. - required: false - schema: - type: string - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItemList' - '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' - /catalogs: - x-resource: catalogs - get: - tags: - - catalog - description: List Catalog resources. - operationId: listCatalogs - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogList' - '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: - - catalog - description: Create a Catalog resource. - operationId: createCatalog - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - links: - GetCatalog: - operationId: getCatalog - parameters: - name: $response.body#/metadata/name - DeleteCatalog: - operationId: deleteCatalog - parameters: - name: $response.body#/metadata/name - ListCatalogItems: - operationId: listCatalogItems - parameters: - catalog: $response.body#/metadata/name - CreateCatalogItem: - operationId: createCatalogItem - parameters: - catalog: $response.body#/metadata/name - ReplaceCatalog: - operationId: replaceCatalog - parameters: - name: $response.body#/metadata/name - GetCatalogStatus: - operationId: getCatalogStatus - parameters: - name: $response.body#/metadata/name - ReplaceCatalogStatus: - operationId: replaceCatalogStatus - parameters: - name: $response.body#/metadata/name - '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' - /catalogs/{name}: - x-resource: catalogs - get: - tags: - - catalog - description: Get a Catalog resource. - operationId: getCatalog - parameters: - - name: name - in: path - description: The name of the Catalog resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - '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' - '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: - - catalog - description: Update a Catalog resource. - operationId: replaceCatalog - parameters: - - name: name - in: path - description: The name of the Catalog resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - '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: - - catalog - description: Delete a Catalog resource. - operationId: deleteCatalog - parameters: - - name: name - in: path - description: The name of the Catalog resource to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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: - - catalog - description: Patch a Catalog resource. - operationId: patchCatalog - parameters: - - name: name - in: path - description: The name of the Catalog 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/Catalog' - '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' - /catalogs/{name}/status: - x-resource: catalogs - get: - tags: - - catalog - description: Get status of a Catalog resource. - operationId: getCatalogStatus - parameters: - - name: name - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - '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' - '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: - - catalog - description: Update status of a Catalog resource. - operationId: replaceCatalogStatus - parameters: - - name: name - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Catalog' - '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: - - catalog - description: Patch status of a Catalog resource. - operationId: patchCatalogStatus - parameters: - - name: name - in: path - description: The name of the Catalog resource. - 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/Catalog' - '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' - '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' - /catalogs/{catalog}/items: - x-resource: catalogs/items - get: - tags: - - catalog - description: List CatalogItems from a Catalog. - operationId: listCatalogItems - parameters: - - name: catalog - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - example: edge-apps - - name: continue - in: query - description: An optional parameter to query more results from the server. - required: false - schema: - type: string - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. - schema: - type: string - - name: limit - in: query - description: The maximum number of results returned in the list response. - required: false - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItemList' - '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' - '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: - - catalog - description: Create a CatalogItem in a Catalog. - operationId: createCatalogItem - parameters: - - name: catalog - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - example: edge-apps - requestBody: - description: The CatalogItem resource to create. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItem' - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItem' - links: - GetCatalogItem: - operationId: getCatalogItem - parameters: - catalog: $request.path.catalog - name: $response.body#/metadata/name - DeleteCatalogItem: - operationId: deleteCatalogItem - parameters: - catalog: $request.path.catalog - name: $response.body#/metadata/name - ReplaceCatalogItem: - operationId: replaceCatalogItem - parameters: - catalog: $request.path.catalog - name: $response.body#/metadata/name - '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' - '503': - description: Service Unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /catalogs/{catalog}/items/{name}: - x-resource: catalogs/items - get: - tags: - - catalog - description: Get a CatalogItem from a Catalog. - operationId: getCatalogItem - parameters: - - name: catalog - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - example: edge-apps - - name: name - in: path - description: The name of the CatalogItem resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItem' - '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' - '503': - description: Service Unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - put: - tags: - - catalog - description: Replace a CatalogItem in a Catalog. - operationId: replaceCatalogItem - parameters: - - name: catalog - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - example: edge-apps - - name: name - in: path - description: The name of the CatalogItem resource. - required: true - schema: - type: string - requestBody: - description: The CatalogItem resource to replace. - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItem' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItem' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItem' - '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' - '503': - description: Service Unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - delete: - tags: - - catalog - description: Delete a CatalogItem from a Catalog. - operationId: deleteCatalogItem - parameters: - - name: catalog - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - example: edge-apps - - name: name - in: path - description: The name of the CatalogItem resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '503': - description: Service Unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - patch: - tags: - - catalog - description: Patch a CatalogItem in a Catalog. - operationId: patchCatalogItem - parameters: - - name: catalog - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - example: edge-apps - - name: name - in: path - description: The name of the CatalogItem 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/CatalogItem' - '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' - '503': - description: Service Unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /catalogs/{catalog}/items/{name}/deployments: - x-resource: catalogs/deployments - get: - tags: - - catalog - description: Get the CatalogItemDeployments for a particular Catalog Item - operationId: getCatalogItemDeployments - parameters: - - name: catalog - in: path - description: The name of the Catalog resource. - required: true - schema: - type: string - example: edge-apps - - name: name - in: path - description: The name of the CatalogItem resource. - required: true - schema: - type: string - - name: continue - in: query - description: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. - required: false - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CatalogItemDeploymentList' - '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' - '503': - description: Service Unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /vulnerabilities/summary: - x-resource: vulnerabilities - get: - tags: - - vulnerability - description: Return organization-wide CVE counts by severity. - operationId: getVulnerabilitySummary - responses: - '200': - description: OK. - content: - application/json: - schema: - $ref: '#/components/schemas/VulnerabilitySummaryResponse' - '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' - '501': - description: Not Implemented (vulnerability feature is not enabled on this server). - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /vulnerabilities: - x-resource: vulnerabilities - get: - tags: - - vulnerability - description: List distinct vulnerabilities across the organization with affected device counts. - operationId: listVulnerabilities - parameters: - - name: continue - in: query - description: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. - required: false - schema: - type: string - - 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: sortBy - in: query - description: Field to sort vulnerability list results by. - schema: - type: string - enum: - - severity - - cvssScore - - publishedAt - - cveId - default: severity - - name: order - in: query - description: Sort order for the results. - schema: - type: string - enum: - - asc - - desc - default: desc - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK. - content: - application/json: - schema: - $ref: '#/components/schemas/VulnerabilityGroupList' - '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' - '501': - description: Not Implemented (vulnerability feature is not enabled on this server). - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '503': - description: Service Unavailable. - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /vulnerabilities/devices/{name}: - x-resource: vulnerabilities - get: - tags: - - vulnerability - description: List vulnerabilities affecting a single device by device metadata name. - operationId: getDeviceVulnerabilities - parameters: - - name: name - in: path - description: The metadata.name of the Device resource. - required: true - schema: - type: string - - name: continue - in: query - description: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. - required: false - schema: - type: string - - 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: sortBy - in: query - description: Field to sort vulnerability list results by. - schema: - type: string - enum: - - severity - - cvssScore - - publishedAt - - cveId - default: severity - - name: order - in: query - description: Sort order for the results. - schema: - type: string - enum: - - asc - - desc - default: desc - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK. - content: - application/json: - schema: - $ref: '#/components/schemas/VulnerabilityList' - '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' - '429': - description: Too Many Requests. - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '501': - description: Not Implemented (vulnerability feature is not enabled on this server). - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /vulnerabilities/fleets/{name}: - x-resource: vulnerabilities - get: - tags: - - vulnerability - description: List vulnerabilities aggregated for a fleet by fleet metadata name. - operationId: getFleetVulnerabilities - parameters: - - name: name - in: path - description: The metadata.name of the Fleet resource. - required: true - schema: - type: string - - name: continue - in: query - description: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. - required: false - schema: - type: string - - 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: sortBy - in: query - description: Field to sort vulnerability list results by. - schema: - type: string - enum: - - severity - - cvssScore - - publishedAt - - cveId - default: severity - - name: order - in: query - description: Sort order for the results. - schema: - type: string - enum: - - asc - - desc - default: desc - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK. - content: - application/json: - schema: - $ref: '#/components/schemas/VulnerabilityGroupList' - '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' - '429': - description: Too Many Requests. - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '501': - description: Not Implemented (vulnerability feature is not enabled on this server). - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /vulnerabilities/devices/{name}/summary: - x-resource: vulnerabilities - get: - tags: - - vulnerability - description: Return the severity summary for a single device without fetching the full CVE list. - operationId: getDeviceVulnerabilitySummary - parameters: - - name: name - in: path - description: The metadata.name of the Device resource. - required: true - schema: - type: string - - 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. - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceVulnerabilitySummaryResponse' - '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' - '429': - description: Too Many Requests. - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '501': - description: Not Implemented (vulnerability feature is not enabled on this server). - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /vulnerabilities/fleets/{name}/summary: - x-resource: vulnerabilities - get: - tags: - - vulnerability - description: Return the severity summary for a single fleet without fetching the full CVE list. - operationId: getFleetVulnerabilitySummary - parameters: - - name: name - in: path - description: The metadata.name of the Fleet resource. - required: true - schema: - type: string - - 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. - content: - application/json: - schema: - $ref: '#/components/schemas/FleetVulnerabilitySummaryResponse' - '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' - '429': - description: Too Many Requests. - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '501': - description: Not Implemented (vulnerability feature is not enabled on this server). - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /vulnerabilities/cves/{cveId}/impact: - x-resource: vulnerabilities - get: - tags: - - vulnerability - description: Return per-fleet and fleetless blast radius for a CVE identifier. - operationId: getVulnerabilityImpact - parameters: - - name: cveId - in: path - description: The CVE identifier (for example, CVE-2024-1234). Unknown identifiers still return 200 with an empty list of affected resources (blast radius) when no matching data is found. - required: true - schema: - type: string - - name: continue - in: query - description: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. - required: false - schema: - type: string - - name: fieldSelector - in: query - description: Restricts blast-radius rows by device owner before aggregation. Supported key is `owner` (device owner string, for example `owner=Fleet/my-fleet`). Operators include `=`, `==`, `!=`, and set-style `in` / `notin` where applicable. - schema: - type: string - - name: sortBy - in: query - description: Field to sort blast radius rows by. - schema: - type: string - enum: - - affectedDevices - - fleetName - default: affectedDevices - - name: order - in: query - description: Sort order for the results. - schema: - type: string - enum: - - asc - - desc - default: desc - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK. - content: - application/json: - schema: - $ref: '#/components/schemas/VulnerabilityImpact' - '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' - '501': - description: Not Implemented (vulnerability feature is not enabled on this server). - 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: - ApiVersion: - type: string - x-go-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.' - enum: - - v1alpha1 - - flightctl.io/v1alpha1 - x-enum-varnames: - - ApiVersionV1alpha1 - - ApiVersionFlightctlIoV1alpha1 - SemVer: - type: string - x-go-type: string - description: Semantic version identifier (e.g., 1.2.3, 2.0.0-rc1) - pattern: ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - example: 1.2.3 - SemVerRange: - type: string - x-go-type: string - description: Semver range constraint (e.g., >=1.0.0 <2.0.0). Space-separated terms, each with optional operator (>=, <=, >, <, =, ~, ^) followed by a version. - pattern: ^[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*$ - example: '>=1.0.0 <2.0.0' - Catalog: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/CatalogSpec' - status: - $ref: '#/components/schemas/CatalogStatus' - required: - - apiVersion - - kind - - metadata - - spec - additionalProperties: false - example: - apiVersion: flightctl.io/v1alpha1 - kind: Catalog - metadata: - name: edge-apps - spec: - displayName: Edge Applications - CatalogSpec: - type: object - description: CatalogSpec describes the configuration of a catalog. Catalogs are containers for locally-managed CatalogItems. - properties: - displayName: - type: string - description: Human-readable display name shown in catalog listings. - shortDescription: - type: string - description: A brief one-line description of the catalog. - icon: - type: string - description: URL or data URI of the catalog icon for display in UI. - provider: - type: string - description: Provider or publisher of the catalog (company or team name). - support: - type: string - description: Link to support resources or documentation for getting help. - additionalProperties: false - CatalogStatus: - type: object - description: CatalogStatus represents the current status of a catalog source. - properties: - conditions: - type: array - description: Current state of the catalog source. - items: - $ref: '#/components/schemas/Condition' - required: - - conditions - additionalProperties: false - CatalogList: - type: object - description: CatalogList is a list of Catalogs. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 Catalogs. - items: - $ref: '#/components/schemas/Catalog' - required: - - apiVersion - - kind - - metadata - - items - additionalProperties: false - CatalogItemMeta: - type: object - description: Metadata for CatalogItem resources. Extends ObjectMeta with catalog scoping. - allOf: - - $ref: '#/components/schemas/ObjectMeta' - - type: object - properties: - catalog: - type: string - description: The catalog this item belongs to. Similar to namespace in Kubernetes. - example: edge-apps - required: - - catalog - CatalogItem: - type: object - description: CatalogItem represents an application template from a catalog. It provides default configuration values that can be customized when adding the application to a fleet. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource this object represents. - metadata: - $ref: '#/components/schemas/CatalogItemMeta' - spec: - $ref: '#/components/schemas/CatalogItemSpec' - required: - - apiVersion - - kind - - metadata - - spec - additionalProperties: false - CatalogItemArtifact: - type: object - description: An artifact reference. The type field is the discriminator and must be unique within the artifacts list. - properties: - type: - $ref: '#/components/schemas/CatalogItemArtifactType' - name: - type: string - description: Optional human-readable display name for this artifact. - example: QCOW2 Disk Image - uri: - type: string - minLength: 1 - description: Artifact URI without version qualifier. The version reference (tag or digest) is applied at resolution time. - example: quay.io/redhat/rhel-bootc-qcow2 - required: - - type - - uri - additionalProperties: false - CatalogItemArtifactType: - type: string - description: Artifact format discriminator. Must be unique within the artifacts list. Includes bootc-image-builder output formats. - example: container - enum: - - container - - qcow2 - - ami - - iso - - anaconda-iso - - vmdk - - vhd - - raw - - gce - - qcow2-disk-container - x-enum-varnames: - - CatalogItemArtifactTypeContainer - - CatalogItemArtifactTypeQcow2 - - CatalogItemArtifactTypeAmi - - CatalogItemArtifactTypeIso - - CatalogItemArtifactTypeAnacondaIso - - CatalogItemArtifactTypeVmdk - - CatalogItemArtifactTypeVhd - - CatalogItemArtifactTypeRaw - - CatalogItemArtifactTypeGce - - CatalogItemArtifactTypeQcow2DiskContainer - CatalogItemConfigurable: - type: object - description: Configuration fields that can be specified at item level (as defaults) and overridden at version level. Version-level values fully replace item-level values (not merged). - properties: - config: - type: object - additionalProperties: true - description: Configuration values (envVars, ports, volumes, resources, etc.). - example: - envVars: - LOG_LEVEL: info - ports: - - 9090:9090 - configSchema: - type: object - additionalProperties: true - description: JSON Schema defining configurable parameters and their validation. - readme: - type: string - description: Detailed documentation, preferably in markdown format. - CatalogItemSpec: - type: object - description: CatalogItemSpec defines the configuration for a catalog item. - properties: - category: - $ref: '#/components/schemas/CatalogItemCategory' - type: - $ref: '#/components/schemas/CatalogItemType' - artifacts: - type: array - items: - $ref: '#/components/schemas/CatalogItemArtifact' - minItems: 1 - description: Artifact definitions for this catalog item. Defined once; version references resolve each artifact independently. Type must be unique within the list. - example: - - type: container - uri: quay.io/prometheus/prometheus - versions: - type: array - items: - $ref: '#/components/schemas/CatalogItemVersion' - description: Available versions using Cincinnati model. Use replaces for primary edge, skips when stable channel skips intermediate versions. - example: - - version: 2.45.0 - references: - container: sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 - channels: - - stable - - fast - replaces: 2.44.0 - skips: - - 2.43.0 - - version: 2.44.0 - references: - container: v2.44.0 - channels: - - fast - replaces: 2.43.0 - defaults: - $ref: '#/components/schemas/CatalogItemConfigurable' - displayName: - type: string - description: Human-readable display name shown in catalog listings. - shortDescription: - type: string - description: A brief one-line description of the catalog item. - icon: - type: string - description: URL or data URI of the catalog item icon for display in UI. - deprecation: - $ref: '#/components/schemas/CatalogItemDeprecation' - provider: - type: string - description: Provider or publisher of the catalog item (company or team name). - support: - type: string - description: Link to support resources or documentation for getting help. - homepage: - type: string - description: The homepage URL for the catalog item project. - documentationUrl: - type: string - description: Link to external documentation. - required: - - type - - artifacts - - versions - additionalProperties: false - CatalogItemVersion: - type: object - description: | - A version of a catalog item following the Cincinnati model where versions - are nodes in an upgrade graph and channels are labels on those nodes. - Upgrade edges are defined by replaces (single), skips (multiple), or - skipRange (semver range). Includes CatalogItemConfigurable fields that - override item-level defaults. - allOf: - - $ref: '#/components/schemas/CatalogItemConfigurable' - - type: object - properties: - version: - allOf: - - $ref: '#/components/schemas/SemVer' - description: Semantic version identifier (e.g., 1.2.3, 2.0.0-rc1). Required for version ordering and upgrade graph. - example: 2.45.0 - references: - type: object - x-go-type: map[CatalogItemArtifactType]string - minProperties: 1 - additionalProperties: - type: string - minLength: 1 - description: Map of artifact type to image tag or digest. Keys must match a type in spec.artifacts. Only keyed artifacts are available for this version. - example: - container: sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4 - qcow2: v2.45.0 - channels: - type: array - minItems: 1 - items: - type: string - description: Channels this version belongs to. - replaces: - allOf: - - $ref: '#/components/schemas/SemVer' - description: The single version this one replaces, defining the primary upgrade edge. - skips: - type: array - items: - $ref: '#/components/schemas/SemVer' - description: Additional versions that can upgrade directly to this one. Use when stable channel skips intermediate fast-only versions. - example: - - 1.0.0 - - 1.1.0 - skipRange: - allOf: - - $ref: '#/components/schemas/SemVerRange' - description: Semver range of versions that can upgrade directly to this one. Use for z-stream updates or hotfixes. - example: '>=1.0.0 <1.3.0' - deprecation: - $ref: '#/components/schemas/CatalogItemDeprecation' - required: - - version - - channels - - references - CatalogItemList: - type: object - description: CatalogItemList is a list of CatalogItems. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 CatalogItems. - items: - $ref: '#/components/schemas/CatalogItem' - required: - - apiVersion - - kind - - metadata - - items - additionalProperties: false - CatalogItemDeployment: - type: object - description: CatalogItemDeployment represents a specific deployment of a catalog item to a fleet or device. A catalog item associated to a fleet that has no devices is still considered a deployment. A deployment is only associated with the fleet and not the individual devices in cases where a device is using a catalog item deployment that came from a device spec template on a fleet. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource this object represents. - deployedTo: - type: object - description: The device or fleet that this deployment pertains to. - properties: - resourceKind: - type: string - description: Either a Device or Fleet. - resourceName: - type: string - description: The name of the device or fleet. - catalog: - type: string - description: The catalog of the catalogItem. - example: edge-apps - catalogItem: - type: string - description: The catalogItem that this deployment corresponds to. - example: nginx - version: - type: string - description: The version of the catalog item that is deployed. - channel: - type: string - description: The channel, if any, that is intended to be tracked for the catalog item. - applicationName: - type: string - description: For catalog items in the 'application' category, the name of the application on the device that the deployment is associated with. Required for application catalog items. - required: - - apiVersion - - kind - - catalog - - catalogItem - - version - additionalProperties: false - CatalogItemDeploymentList: - type: object - description: CatalogItemDeploymentList is a list of CatalogItemDeployments. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 CatalogItemDeployments. - items: - $ref: '#/components/schemas/CatalogItemDeployment' - required: - - apiVersion - - kind - - metadata - - items - additionalProperties: false - CatalogItemCategory: - type: string - description: Category of a catalog item. - enum: - - system - - application - default: application - x-enum-varnames: - - CatalogItemCategorySystem - - CatalogItemCategoryApplication - CatalogItemType: - type: string - description: Type of catalog item within its category. - enum: - - os - - firmware - - driver - - container - - helm - - quadlet - - compose - - data - x-enum-varnames: - - CatalogItemTypeOS - - CatalogItemTypeFirmware - - CatalogItemTypeDriver - - CatalogItemTypeContainer - - CatalogItemTypeHelm - - CatalogItemTypeQuadlet - - CatalogItemTypeCompose - - CatalogItemTypeData - CatalogItemDeprecation: - type: object - description: Deprecation information for a catalog item or version. Presence indicates deprecated status. - properties: - message: - type: string - description: Required message explaining why this is deprecated and what to do instead. - example: This item is deprecated. Use nginx-plus instead. - replacement: - type: string - description: Optional name of the replacement catalog item (item-level only). - example: nginx-plus - required: - - message - additionalProperties: false - Status: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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.' - code: - type: integer - format: int32 - description: Suggested HTTP return code for this status, 0 if not set. - message: - type: string - description: A human-readable description of the status of this operation. - reason: - type: string - description: A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. - status: - type: string - description: 'Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.' - description: Status is a return value for calls that don't return other objects. - required: - - apiVersion - - kind - - status - - code - - reason - - message - additionalProperties: false - VulnerabilitySummaryResponse: - type: object - description: Estate-wide vulnerability summary counts. - additionalProperties: false - required: - - apiVersion - - kind - - cvesBySeverity - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Resource kind; always VulnerabilitySummary. - cvesBySeverity: - $ref: '#/components/schemas/CveCountsBySeverity' - DeviceCountsBySeverity: - type: object - description: Counts of distinct devices affected in the organization, grouped by vulnerability severity. - additionalProperties: false - required: - - total - - critical - - high - - medium - - low - - none - - unknown - properties: - total: - type: integer - format: int64 - description: Number of distinct devices with at least one vulnerability finding in the organization. - critical: - type: integer - format: int64 - description: Number of devices whose highest severity finding is critical. - high: - type: integer - format: int64 - description: Number of devices whose highest severity finding is high. - medium: - type: integer - format: int64 - description: Number of devices whose highest severity finding is medium. - low: - type: integer - format: int64 - description: Number of devices whose highest severity finding is low. - none: - type: integer - format: int64 - description: Number of devices whose highest severity finding is none. - unknown: - type: integer - format: int64 - description: Number of devices whose highest severity finding is unknown. - CveCountsBySeverity: - type: object - description: Counts of distinct CVEs in the organization by highest severity. - additionalProperties: false - required: - - total - - critical - - high - - medium - - low - - none - - unknown - properties: - total: - type: integer - format: int64 - description: Total distinct CVEs across the organization. - critical: - type: integer - format: int64 - description: Count of distinct Critical CVEs. - high: - type: integer - format: int64 - description: Count of distinct High CVEs. - medium: - type: integer - format: int64 - description: Count of distinct Medium CVEs. - low: - type: integer - format: int64 - description: Count of distinct Low CVEs. - none: - type: integer - format: int64 - description: Count of distinct CVEs with no exploitable impact (CVSS score 0). - unknown: - type: integer - format: int64 - description: Count of distinct CVEs with unknown or unscored severity. - Vulnerability: - type: object - description: A single vulnerability (CVE) finding. Vulnerabilities are global CVE records from Trustify; they are not tenant-owned resources. Tenancy is determined by the device or fleet context through which they are queried. - additionalProperties: false - required: - - apiVersion - - kind - - cveId - - severity - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource this object represents. Always Vulnerability. - cveId: - type: string - description: CVE identifier (e.g. CVE-2024-1234). - advisoryId: - type: string - description: Vendor advisory identifier when available. - issuer: - type: string - description: Name of the advisory issuer (e.g. Red Hat, NVD) when known. - link: - type: string - description: URL to the CVE details page. Points to Red Hat Security portal for Red Hat advisories, otherwise to NVD. - severity: - type: string - description: Normalized severity label. - enum: - - Critical - - High - - Medium - - Low - - None - - Unknown - cvssScore: - type: number - format: float - description: CVSS base score when available. - description: - type: string - description: Short summary of the vulnerability. - publishedAt: - type: string - format: date-time - description: Advisory publish time when known. - image: - type: string - description: Image reference (name or URL) from the device context. - imageDigest: - type: string - description: Immutable image digest from the device context. - affectedDevices: - type: integer - format: int64 - description: Distinct devices affected by this CVE. For device context this is always 1; for fleet context it is the number of devices in the fleet running an image with this CVE; for organization-wide context it is the count across the whole organization. - VulnerabilityList: - type: object - description: Paginated list of Vulnerability resources. - additionalProperties: false - required: - - apiVersion - - kind - - metadata - - items - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource this object represents. Always VulnerabilityList. - metadata: - $ref: '#/components/schemas/ListMeta' - items: - type: array - description: Paginated Vulnerability resources for this page. - items: - $ref: '#/components/schemas/Vulnerability' - VulnerabilityImageRef: - type: object - description: Reference to an OS or workload image by name and digest. - additionalProperties: false - required: - - image - - imageDigest - properties: - image: - type: string - description: Image reference (name or URL). - imageDigest: - type: string - description: Immutable image digest. - affectedDevices: - type: integer - format: int64 - description: Devices running this exact image digest within the parent scope (fleet or blast radius row). - VulnerabilityGroupItem: - type: object - description: A single CVE finding for a specific image digest, including all image refs that resolve to that digest. - additionalProperties: false - required: - - imageDigest - - severity - - imageRefs - properties: - imageDigest: - type: string - description: Immutable image digest. - imageRefs: - type: array - description: Image references observed for this digest within the query scope. - items: - type: string - severity: - type: string - description: Severity of this CVE for this digest. - enum: - - Critical - - High - - Medium - - Low - - None - - Unknown - cvssScore: - type: number - format: float - description: CVSS base score when available. - advisoryId: - type: string - description: Vendor advisory identifier when available. - issuer: - type: string - description: Name of the advisory issuer (e.g. Red Hat, NVD) when known. - link: - type: string - description: URL to the CVE details page. Points to Red Hat Security portal for Red Hat advisories, otherwise to NVD. - description: - type: string - description: Short summary of the vulnerability. - publishedAt: - type: string - format: date-time - description: Advisory publish time when known. - affectedDevices: - type: integer - format: int64 - description: Number of devices in scope running this digest. - firstSeenAt: - type: string - format: date-time - description: When this CVE was first observed in this digest. - VulnerabilityGroup: - type: object - description: | - A CVE grouped across one or more images, as returned by fleet-scoped and organization-wide vulnerability list endpoints. Each finding represents one image in which the CVE was detected. - additionalProperties: false - required: - - apiVersion - - kind - - cveId - - severity - - findings - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource. Always VulnerabilityGroup. - cveId: - type: string - description: CVE identifier (e.g. CVE-2024-1234). - severity: - type: string - description: Worst severity across all findings in this group. - enum: - - Critical - - High - - Medium - - Low - - None - - Unknown - maxCvssScore: - type: number - format: float - description: Highest CVSS base score across all findings. - maxPublishedAt: - type: string - format: date-time - description: Latest advisory publish time across all findings. - affectedDevices: - type: integer - format: int64 - description: Total distinct devices affected by this CVE within scope. - findings: - type: array - description: Per-digest findings for this CVE within the query scope. - items: - $ref: '#/components/schemas/VulnerabilityGroupItem' - VulnerabilityGroupList: - type: object - description: Paginated list of VulnerabilityGroup resources (fleet-scoped or organization-wide). - additionalProperties: false - required: - - apiVersion - - kind - - metadata - - items - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource. Always VulnerabilityGroupList. - metadata: - $ref: '#/components/schemas/ListMeta' - items: - type: array - description: Paginated VulnerabilityGroup resources for this page. - items: - $ref: '#/components/schemas/VulnerabilityGroup' - DeviceVulnerabilitySummaryResponse: - type: object - description: Severity summary for a single device. - additionalProperties: false - required: - - apiVersion - - kind - - summary - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Resource kind; always DeviceVulnerabilitySummary. - image: - type: string - description: Image reference from device status. Absent when the device has no rendered OS image. - imageDigest: - type: string - description: Image digest from device status. Absent when the device has no rendered OS image. - summary: - $ref: '#/components/schemas/VulnerabilitySeveritySummary' - FleetVulnerabilitySummaryResponse: - type: object - description: Severity summary for a single fleet. - additionalProperties: false - required: - - apiVersion - - kind - - summary - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Resource kind; always FleetVulnerabilitySummary. - summary: - $ref: '#/components/schemas/FleetVulnerabilitySummary' - VulnerabilitySeveritySummary: - type: object - description: Total vulnerability counts by severity for the full result set (not only the current page). - additionalProperties: false - required: - - total - - critical - - high - - medium - - low - - none - - unknown - properties: - total: - type: integer - format: int64 - description: Total vulnerabilities across all severities for the full result set. - critical: - type: integer - format: int64 - description: Count of Critical severity findings in the full result set. - high: - type: integer - format: int64 - description: Count of High severity findings in the full result set. - medium: - type: integer - format: int64 - description: Count of Medium severity findings in the full result set. - low: - type: integer - format: int64 - description: Count of Low severity findings in the full result set. - none: - type: integer - format: int64 - description: Count of findings with no exploitable impact (CVSS score 0). - unknown: - type: integer - format: int64 - description: Count of findings with unknown or unscored severity. - FleetVulnerabilitySummary: - description: Fleet vulnerability totals including unique digest count. - allOf: - - $ref: '#/components/schemas/VulnerabilitySeveritySummary' - - type: object - additionalProperties: false - required: - - uniqueDigests - properties: - uniqueDigests: - type: integer - format: int64 - description: Distinct image digests observed in the fleet. - VulnerabilityImpact: - type: object - description: Blast radius for a single CVE across fleets and fleetless devices. - additionalProperties: false - required: - - apiVersion - - kind - - metadata - - cveId - - severity - - items - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Resource kind; always VulnerabilityImpact. - metadata: - $ref: '#/components/schemas/ListMeta' - cveId: - type: string - description: CVE identifier for this blast radius response. - issuer: - type: string - description: Name of the advisory issuer (e.g. Red Hat, NVD) when known. - link: - type: string - description: URL to the CVE details page. Points to Red Hat Security portal for Red Hat advisories, otherwise to NVD. - severity: - type: string - description: Worst severity for this CVE in the fleet or fleetless group. - enum: - - Critical - - High - - Medium - - Low - - None - - Unknown - maxCvssScore: - type: number - format: float - description: Highest CVSS base score for this CVE in the fleet or fleetless group. - maxPublishedAt: - type: string - format: date-time - description: When this CVE was first observed in the fleet or fleetless group. - items: - type: array - description: Per-fleet or fleetless rows with device and image counts. - items: - $ref: '#/components/schemas/AffectedFleet' - AffectedFleet: - type: object - description: One fleet or the fleetless aggregate with device and image counts for a CVE. - additionalProperties: false - required: - - fleetName - - fleetless - - affectedDevices - - findings - properties: - fleetName: - type: string - description: Fleet metadata.name, empty for the fleetless aggregate. - fleetless: - type: boolean - description: True when this row represents devices not owned by a fleet. - affectedDevices: - type: integer - format: int64 - description: Devices in this fleet or fleetless group affected by the CVE. - findings: - type: array - description: Per-digest findings within this fleet or fleetless group. - items: - $ref: '#/components/schemas/VulnerabilityGroupItem' - ListMeta: - type: object - properties: - continue: - type: string - description: May be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. - remainingItemCount: - type: integer - description: The number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. - format: int64 - description: ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - ObjectMeta: - type: object - properties: - creationTimestamp: - type: string - description: The time the object was created. - format: date-time - deletionTimestamp: - type: string - description: The time the object will be deleted. - format: date-time - name: - type: string - maxLength: 253 - description: The name of the object. - labels: - type: object - description: Map of string keys and values that can be used to organize and categorize (scope and select) objects. - additionalProperties: - type: string - maxLength: 63 - generation: - type: integer - description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - format: int64 - owner: - type: string - description: A resource that owns this resource, in "kind/name" format. - annotations: - type: object - additionalProperties: - type: string - description: Properties set by the service. - resourceVersion: - type: string - description: An opaque string that identifies the server's internal version of an object. - description: ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - ConditionStatus: - type: string - description: Status of the condition, one of True, False, Unknown. - enum: - - 'True' - - 'False' - - Unknown - x-enum-varnames: - - ConditionStatusTrue - - ConditionStatusFalse - - ConditionStatusUnknown - ConditionBase: - type: object - description: Base condition structure following Kubernetes API conventions. Use with allOf to add a specific type enum. - required: - - status - - lastTransitionTime - - reason - - message - properties: - status: - $ref: '#/components/schemas/ConditionStatus' - observedGeneration: - type: integer - format: int64 - description: The .metadata.generation that the condition was set based upon. - lastTransitionTime: - type: string - format: date-time - description: The last time the condition transitioned from one status to another. - message: - type: string - description: Human readable message indicating details about last transition. - reason: - type: string - description: A (brief) reason for the condition's last transition. - ConditionType: - type: string - description: Type of condition in CamelCase. - enum: - - Approved - - TPMVerified - - Approved - - Denied - - Failed - - TPMVerified - - Accessible - - Accessible - - ResourceParsed - - Synced - - Valid - - RolloutInProgress - - Updating - - SpecValid - - MultipleOwners - - DeviceDecommissioning - x-enum-varnames: - - EnrollmentRequestApproved - - EnrollmentRequestTPMVerified - - CertificateSigningRequestApproved - - CertificateSigningRequestDenied - - CertificateSigningRequestFailed - - CertificateSigningRequestTPMVerified - - RepositoryAccessible - - ResourceSyncAccessible - - ResourceSyncResourceParsed - - ResourceSyncSynced - - FleetValid - - FleetRolloutInProgress - - DeviceUpdating - - DeviceSpecValid - - DeviceMultipleOwners - - DeviceDecommissioning - Condition: - description: Condition contains details for one aspect of the current state of this API Resource. - allOf: - - $ref: '#/components/schemas/ConditionBase' - - type: object - required: - - type - properties: - type: - $ref: '#/components/schemas/ConditionType' - 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 diff --git a/api/bundled/core-v1beta1.yaml b/api/bundled/core-v1beta1.yaml deleted file mode 100644 index 9d21ae0..0000000 --- a/api/bundled/core-v1beta1.yaml +++ /dev/null @@ -1,9028 +0,0 @@ -openapi: 3.0.1 -info: - title: Flight Control API - version: v1beta1 - description: | - [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. - contact: - name: The Flight Control Team - url: https://flightctl.io - email: team@flightctl.io - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html -servers: - - url: /api/v1 -tags: - - name: authentication - description: Operations for authentication. - - name: authprovider - description: Operations on AuthProvider resources. - - name: certificatesigningrequest - description: Operations on CertificateSigningRequest resources. - - name: device - description: Operations on Device resources. - - name: deviceactions - description: Operations for device actions. - - name: enrollmentrequest - description: Operations on EnrollmentRequest resources. - - name: event - description: Operations for retrieving events. - - name: fleet - description: Operations on Fleet resources. - - name: label - description: Operations for retrieving labels across different resources. - - name: organization - description: Operations for retrieving Organization resources. - - name: repository - description: Operations on Repository resources. - - name: resourcesync - description: Operations on ResourceSync resources. - - name: version - description: Operations for receiving service version. -paths: - /version: - x-resource: version - get: - tags: - - version - description: Get service version. - operationId: getVersion - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Version' - '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' - /auth/config: - get: - tags: - - authentication - description: Get authentication configuration. - operationId: authConfig - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/AuthConfig' - '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' - /auth/validate: - get: - tags: - - authentication - description: Validate an authentication token. - operationId: authValidate - parameters: - - name: Authorization - in: header - description: The authentication token to validate. - schema: - type: string - responses: - '200': - description: Token valid - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '401': - description: Token invalid - 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' - /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' - /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' - /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: - application/json: - schema: - $ref: '#/components/schemas/Status' - /resourcesyncs: - x-resource: resourcesyncs - get: - tags: - - resourcesync - description: List ResourceSync resources. - operationId: listResourceSyncs - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceSyncList' - '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: - - resourcesync - description: Create a ResourceSync resource. - operationId: createResourceSync - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceSync' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceSync' - links: - GetResourceSync: - operationId: getResourceSync - parameters: - name: $response.body#/metadata/name - DeleteResourceSync: - operationId: deleteResourceSync - parameters: - name: $response.body#/metadata/name - ReplaceResourceSync: - operationId: replaceResourceSync - parameters: - name: $response.body#/metadata/name - '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' - /resourcesyncs/{name}: - x-resource: resourcesyncs - get: - tags: - - resourcesync - description: Get a ResourceSync resource. - operationId: getResourceSync - parameters: - - name: name - in: path - description: The name of the ResourceSync resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceSync' - '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' - '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: - - resourcesync - description: Update a ResourceSync resource. - operationId: replaceResourceSync - parameters: - - name: name - in: path - description: The name of the ResourceSync resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceSync' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceSync' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/ResourceSync' - '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: - - resourcesync - description: Patch a ResourceSync resource. - operationId: patchResourceSync - parameters: - - name: name - in: path - description: The name of the ResourceSync 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/ResourceSync' - '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: - - resourcesync - description: Delete a ResourceSync resource. - operationId: deleteResourceSync - parameters: - - name: name - in: path - description: The name of the ResourceSync resource to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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' - /repositories: - x-resource: repositories - get: - tags: - - repository - description: List Repository resources. - operationId: listRepositories - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/RepositoryList' - '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: - - repository - description: Create a Repository resource. - operationId: createRepository - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - links: - GetRepository: - operationId: getRepository - parameters: - name: $response.body#/metadata/name - DeleteRepository: - operationId: deleteRepository - parameters: - name: $response.body#/metadata/name - ReplaceRepository: - operationId: replaceRepository - parameters: - name: $response.body#/metadata/name - CreateResourceSync: - operationId: createResourceSync - requestBody: - spec: - repository: $response.body#/metadata/name - '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' - /repositories/{name}: - x-resource: repositories - get: - tags: - - repository - description: Get a Repository resource. - operationId: getRepository - parameters: - - name: name - in: path - description: The name of the Repository resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - '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' - '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: - - repository - description: Update a Repository resource. - operationId: replaceRepository - parameters: - - name: name - in: path - description: The name of the Repository resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Repository' - '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: - - repository - description: Delete a Repository resource. - operationId: deleteRepository - parameters: - - name: name - in: path - description: The name of the Repository resource to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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: - - repository - description: Patch a Repository resource. - operationId: patchRepository - parameters: - - name: name - in: path - description: The name of the Repository 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/Repository' - '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' - /repositories/{name}/check-oci-tag: - x-resource: repositories/check-oci-tag - post: - tags: - - repository - description: | - Check if a specific image tag exists in an OCI registry configured as a Repository resource. The registry credentials and connection settings are read from the named Repository resource. - operationId: checkRepositoryOciTag - parameters: - - name: name - in: path - description: The name of the Repository resource to use for registry connection. - required: true - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CheckRepositoryOciTagRequest' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CheckRepositoryOciResult' - '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 - Repository resource does not exist - 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' - /repositories/{name}/check-oci-image: - x-resource: repositories/check-oci-image - post: - tags: - - repository - description: | - Check if a specific OCI image is accessible in a registry configured as a Repository resource. The registry credentials and connection settings are read from the named Repository resource. - operationId: checkRepositoryOciImage - parameters: - - name: name - in: path - description: The name of the Repository resource to use for registry connection. - required: true - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CheckRepositoryOciImageRequest' - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CheckRepositoryOciResult' - '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 - Repository resource does not exist - 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' - /devices: - x-resource: devices - get: - tags: - - device - description: List Device resources. - operationId: listDevices - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - - name: summaryOnly - in: query - description: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. - required: false - schema: - type: boolean - - name: cveId - in: query - description: Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345). - required: false - schema: - type: string - pattern: ^CVE-[0-9]{4}-[0-9]{4,}$ - maxLength: 64 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceList' - '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: - - device - description: Create a Device resource. - operationId: createDevice - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - links: - GetDevice: - operationId: getDevice - parameters: - name: $response.body#/metadata/name - DeleteDevice: - operationId: deleteDevice - parameters: - name: $response.body#/metadata/name - ReplaceDevice: - operationId: replaceDevice - parameters: - name: $response.body#/metadata/name - GetDeviceStatus: - operationId: getDeviceStatus - parameters: - name: $response.body#/metadata/name - ReplaceDeviceStatus: - operationId: replaceDeviceStatus - parameters: - name: $response.body#/metadata/name - GetRenderedDevice: - operationId: getRenderedDevice - parameters: - name: $response.body#/metadata/name - GetDeviceLastSeen: - operationId: getDeviceLastSeen - parameters: - name: $response.body#/metadata/name - DecommissionDevice: - operationId: decommissionDevice - parameters: - name: $response.body#/metadata/name - '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' - /devices/{name}: - x-resource: devices - get: - tags: - - device - description: Get a Device resource. - operationId: getDevice - parameters: - - name: name - in: path - description: The name of the Device resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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' - '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: - - device - description: Update a Device resource. - operationId: replaceDevice - parameters: - - name: name - in: path - description: The name of the Device resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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: - - device - description: Delete a Device resource. - operationId: deleteDevice - parameters: - - name: name - in: path - description: The name of the Device resource to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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: - - device - description: Patch a Device resource. - operationId: patchDevice - parameters: - - name: name - in: path - description: The name of the Device 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/Device' - '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' - /devices/{name}/status: - x-resource: devices/status - get: - tags: - - device - description: Get the status of a Device resource. - operationId: getDeviceStatus - parameters: - - name: name - in: path - description: The name of the Device resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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' - '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: - - device - description: Patch the status of a Device resource. - operationId: patchDeviceStatus - parameters: - - name: name - in: path - description: The name of the Device 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/Device' - '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' - '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: - - device - description: Update the status of a Device resource. - operationId: replaceDeviceStatus - parameters: - - name: name - in: path - description: The name of the Device resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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' - /devices/{name}/decommission: - x-resource: devices/decommission - put: - tags: - - device - description: schedule the device to decommission - operationId: decommissionDevice - parameters: - - name: name - in: path - description: The name of the Device resource to decommission. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceDecommission' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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' - /devices/{name}/applications/{appname}/actions/stop: - x-resource: devices/applications/lifecycle - post: - tags: - - device - description: | - Stop an application on this device. Sets a device-level lifecycle override (independent of the application's declarative spec, fleet template or standalone device) that is applied on top of the rendered application spec at render time and survives fleet template rollouts, since it is never stored as part of the device's spec. - operationId: stopDeviceApplication - x-rbac: - resource: devices/applications/lifecycle - action: update - parameters: - - name: name - in: path - description: The name of the Device resource. - required: true - schema: - type: string - - name: appname - in: path - description: The name of the application, as defined in the device's rendered application spec. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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' - /devices/{name}/applications/{appname}/actions/start: - x-resource: devices/applications/lifecycle - post: - tags: - - device - description: | - Start an application on this device. Sets a device-level lifecycle override (independent of the application's declarative spec, fleet template or standalone device) that is applied on top of the rendered application spec at render time and survives fleet template rollouts, since it is never stored as part of the device's spec. If the application is also owned by a fleet with its own stop/start default for this application, whichever of the two actions was issued most recently takes effect. - operationId: startDeviceApplication - x-rbac: - resource: devices/applications/lifecycle - action: update - parameters: - - name: name - in: path - description: The name of the Device resource. - required: true - schema: - type: string - - name: appname - in: path - description: The name of the application, as defined in the device's rendered application spec. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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' - /devices/{name}/applications/{appname}/actions/restart: - x-resource: devices/applications/lifecycle - post: - tags: - - device - description: | - Restart an application on this device. Sets a device-level restartGeneration override (independent of the application's declarative spec, fleet template or standalone device); the control plane computes the next generation, and the agent restarts the application using the type-appropriate restart operation when it observes the change. The override is applied on top of the rendered application spec at render time and survives fleet template rollouts, since it is never stored as part of the device's spec. Only meaningful while the application's desired state is "running". - operationId: restartDeviceApplication - x-rbac: - resource: devices/applications/lifecycle - action: update - parameters: - - name: name - in: path - description: The name of the Device resource. - required: true - schema: - type: string - - name: appname - in: path - description: The name of the application, as defined in the device's rendered application spec. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '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' - /devices/{name}/rendered: - x-resource: devices/rendered - get: - tags: - - device - description: Get the rendered device. - operationId: getRenderedDevice - parameters: - - name: name - in: path - description: The name of the Device resource to get the rendered device specification for. - required: true - schema: - type: string - - name: knownRenderedVersion - in: query - description: The last known renderedVersion. - required: false - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Device' - '204': - description: No Content - content: {} - '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' - /devices/{name}/lastseen: - x-resource: devices/lastseen - get: - tags: - - device - description: Get the last seen timestamp of the Device resource. - operationId: getDeviceLastSeen - parameters: - - name: name - in: path - description: The name of the Device resource to get the last seen timestamp for. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceLastSeen' - '204': - description: No Content - content: {} - '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' - '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' - /ws/v1/devices/{name}/console: - x-resource: devices/console - get: - tags: - - device - description: Open a WebSocket console session to the Device. - operationId: getDeviceConsole - x-rbac: - resource: devices/console - action: get - parameters: - - name: name - in: path - description: The name of the Device resource. - required: true - schema: - type: string - responses: - '101': - description: Switching Protocols - '400': - description: Bad Request - '401': - description: Unauthorized - '403': - description: Forbidden - '404': - description: Not Found - '429': - description: Too Many Requests - '500': - description: Internal Server Error - '504': - description: Gateway Timeout - /ws/v1/devices/{name}/applications/{appname}/console: - x-resource: devices/applications/console - get: - tags: - - device - description: Open a WebSocket console session to an application running on the Device. - operationId: getDeviceApplicationConsole - x-rbac: - resource: devices/applications/console - action: get - parameters: - - name: name - in: path - description: The name of the Device resource. - required: true - schema: - type: string - - name: appname - in: path - description: The name of the application to connect to. - required: true - schema: - type: string - - name: consoleType - in: query - required: true - description: The type of console session to open. "serial" opens a text terminal; "vnc" opens a VNC proxy tunnel. - schema: - type: string - enum: - - serial - - vnc - x-enum-varnames: - - ConsoleTypeSerial - - ConsoleTypeVnc - - name: force - in: query - required: false - description: If true, take over an already-active console session of the same type for this application instead of failing with a 409 Conflict. The replaced session is disconnected and told why. - schema: - type: boolean - default: false - responses: - '101': - description: Switching Protocols - '400': - description: Bad Request - '401': - description: Unauthorized - '403': - description: Forbidden - '404': - description: Not Found - '409': - description: Conflict - '429': - description: Too Many Requests - '500': - description: Internal Server Error - '504': - description: Gateway Timeout - /deviceactions/resume: - x-resource: devices/resume - post: - tags: - - deviceactions - description: Resume devices based on label selector and/or field selector. - operationId: resumeDevices - x-rbac: - resource: devices/resume - action: update - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceResumeRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/DeviceResumeResponse' - '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' - /enrollmentconfig: - x-resource: enrollmentconfig - get: - tags: - - enrollmentrequest - description: Get enrollment information. - operationId: getEnrollmentConfig - parameters: - - name: csr - in: query - description: The name of a CertificateSigningRequest resource to query for an issued certificate. If provided, the service will check if the CertificateSigningRequest contains an issued certificate and in this case include it the returned EnrollmentConfig. In all other case, the enrollment certificate field will be empty. - required: false - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentConfig' - '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' - '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' - /enrollmentrequests: - x-resource: enrollmentrequests - get: - tags: - - enrollmentrequest - description: List EnrollmentRequest resources. - operationId: listEnrollmentRequests - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequestList' - '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: - - enrollmentrequest - description: Create an EnrollmentRequest resource. - operationId: createEnrollmentRequest - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - links: - GetEnrollmentRequest: - operationId: getEnrollmentRequest - parameters: - name: $response.body#/metadata/name - DeleteEnrollmentRequest: - operationId: deleteEnrollmentRequest - parameters: - name: $response.body#/metadata/name - GetEnrollmentRequestStatus: - operationId: getEnrollmentRequestStatus - parameters: - name: $response.body#/metadata/name - ApproveEnrollmentRequest: - operationId: approveEnrollmentRequest - parameters: - name: $response.body#/metadata/name - ReplaceEnrollmentRequest: - operationId: replaceEnrollmentRequest - parameters: - name: $response.body#/metadata/name - ReplaceEnrollmentRequestStatus: - operationId: replaceEnrollmentRequestStatus - parameters: - name: $response.body#/metadata/name - '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' - /enrollmentrequests/{name}: - x-resource: enrollmentrequests - get: - tags: - - enrollmentrequest - description: Get an EnrollmentRequest resource. - operationId: getEnrollmentRequest - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - '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' - '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: - - enrollmentrequest - description: Update an EnrollmentRequest resource. - operationId: replaceEnrollmentRequest - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - '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: - - enrollmentrequest - description: Patch an EnrollmentRequest resource. - operationId: patchEnrollmentRequest - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest 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/EnrollmentRequest' - '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: - - enrollmentrequest - description: Delete an EnrollmentRequest resource. - operationId: deleteEnrollmentRequest - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest resource to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - /enrollmentrequests/{name}/status: - x-resource: enrollmentrequests/status - get: - tags: - - enrollmentrequest - description: Get the status of an EnrollmentRequest resource. - operationId: getEnrollmentRequestStatus - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - '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' - '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: - - enrollmentrequest - description: Update the status of an EnrollmentRequest resource. - operationId: replaceEnrollmentRequestStatus - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequest' - '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' - '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: - - enrollmentrequest - description: Patch the status of an EnrollmentRequest resource. - operationId: patchEnrollmentRequestStatus - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest 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/EnrollmentRequest' - '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' - /enrollmentrequests/{name}/approval: - x-resource: enrollmentrequests/approval - put: - tags: - - enrollmentrequest - description: Approve or deny an EnrollmentRequest. - operationId: approveEnrollmentRequest - parameters: - - name: name - in: path - description: The name of the EnrollmentRequest to approve or deny. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequestApproval' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EnrollmentRequestApprovalStatus' - '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' - '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' - /certificatesigningrequests: - x-resource: certificatesigningrequests - get: - tags: - - certificatesigningrequest - description: List CertificateSigningRequest resources. - operationId: listCertificateSigningRequests - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequestList' - '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: - - certificatesigningrequest - description: Create a CertificateSigningRequest resource. - operationId: createCertificateSigningRequest - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - links: - GetCertificateSigningRequest: - operationId: getCertificateSigningRequest - parameters: - name: $response.body#/metadata/name - DeleteCertificateSigningRequest: - operationId: deleteCertificateSigningRequest - parameters: - name: $response.body#/metadata/name - UpdateCertificateSigningRequestApproval: - operationId: updateCertificateSigningRequestApproval - parameters: - name: $response.body#/metadata/name - ReplaceCertificateSigningRequest: - operationId: replaceCertificateSigningRequest - parameters: - name: $response.body#/metadata/name - '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' - /certificatesigningrequests/{name}: - x-resource: certificatesigningrequests - patch: - tags: - - certificatesigningrequest - description: Patch a CertificateSigningRequest resource. - operationId: patchCertificateSigningRequest - parameters: - - name: name - in: path - description: The name of the CertificateSigningRequest 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/CertificateSigningRequest' - '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' - get: - tags: - - certificatesigningrequest - description: read the specified certificateSigningRequest - operationId: getCertificateSigningRequest - parameters: - - name: name - in: path - description: The name of the CertificateSigningRequest resource to get. - required: true - schema: - type: string - uniqueItems: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - '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' - '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: - - certificatesigningrequest - description: replace the specified CertificateSigningRequest - operationId: replaceCertificateSigningRequest - parameters: - - name: name - in: path - description: The name of the CertificateSigningRequest resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - '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: - - certificatesigningrequest - description: delete a Certificate Signing Request - operationId: deleteCertificateSigningRequest - parameters: - - name: name - in: path - description: The name of the CertificateSigningRequest resource to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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' - /certificatesigningrequests/{name}/approval: - x-resource: certificatesigningrequests/approval - put: - tags: - - certificatesigningrequest - description: Approve or deny a CertificateSigningRequest. - operationId: updateCertificateSigningRequestApproval - parameters: - - name: name - in: path - description: The name of the CertificateSigningRequest to approve or deny. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' - '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' - /fleets: - x-resource: fleets - get: - tags: - - fleet - description: List Fleet resources. - operationId: listFleets - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - - name: addDevicesSummary - in: query - description: Include a summary of the devices in the fleet. - required: false - schema: - type: boolean - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/FleetList' - '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: - - fleet - description: Create a Fleet resource. - operationId: createFleet - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - links: - GetFleet: - operationId: getFleet - parameters: - name: $response.body#/metadata/name - DeleteFleet: - operationId: deleteFleet - parameters: - name: $response.body#/metadata/name - ListTemplateVersions: - operationId: listTemplateVersions - parameters: - fleet: $response.body#/metadata/name - ReplaceFleet: - operationId: replaceFleet - parameters: - name: $response.body#/metadata/name - GetFleetStatus: - operationId: getFleetStatus - parameters: - name: $response.body#/metadata/name - ReplaceFleetStatus: - operationId: replaceFleetStatus - parameters: - name: $response.body#/metadata/name - '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' - /fleets/{name}: - x-resource: fleets - get: - tags: - - fleet - description: Get a Fleet resource. - operationId: getFleet - parameters: - - name: name - in: path - description: The name of the Fleet resource to get. - required: true - schema: - type: string - - name: addDevicesSummary - in: query - description: Include a summary of the devices in the fleet. - required: false - schema: - type: boolean - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - '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' - '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: - - fleet - description: Update a Fleet resource. - operationId: replaceFleet - parameters: - - name: name - in: path - description: The name of the Fleet resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - '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: - - fleet - description: Patch a Fleet resource. - operationId: patchFleet - parameters: - - name: name - in: path - description: The name of the Fleet 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/Fleet' - '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: - - fleet - description: Delete a Fleet resource. - operationId: deleteFleet - parameters: - - name: name - in: path - description: The name of the Fleet resource to delete. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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' - /fleets/{name}/status: - x-resource: fleets/status - get: - tags: - - fleet - description: read status of the specified Fleet - operationId: getFleetStatus - parameters: - - name: name - in: path - description: The name of the Fleet resource to get. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - '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' - '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: - - fleet - description: Patch the status of a Fleet resource. - operationId: patchFleetStatus - parameters: - - name: name - in: path - description: The name of the Fleet 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/Fleet' - '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' - '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: - - fleet - description: replace status of the specified Fleet - operationId: replaceFleetStatus - parameters: - - name: name - in: path - description: The name of the Fleet resource to update. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - '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' - '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' - /fleets/{name}/applications/{appname}/actions/stop: - x-resource: fleets/applications/lifecycle - post: - tags: - - fleet - description: | - Stop an application across every device currently owned by this fleet. Sets a fleet-level lifecycle default (independent of the application's declarative spec) that is applied on top of the rendered application spec of each member device at render time, and is automatically inherited by devices that join the fleet later. If a specific device also has its own override for this application (see /devices/{name}/applications/{appname}/actions/stop or .../start), whichever of the two actions was issued most recently takes effect for that device. - operationId: stopFleetApplication - x-rbac: - resource: fleets/applications/lifecycle - action: update - parameters: - - name: name - in: path - description: The name of the Fleet resource. - required: true - schema: - type: string - - name: appname - in: path - description: The name of the application, as defined in the fleet's device template. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - '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' - /fleets/{name}/applications/{appname}/actions/start: - x-resource: fleets/applications/lifecycle - post: - tags: - - fleet - description: | - Start an application across every device currently owned by this fleet. Sets a fleet-level lifecycle default (independent of the application's declarative spec) that is applied on top of the rendered application spec of each member device at render time, and is automatically inherited by devices that join the fleet later. If a specific device also has its own override for this application (see /devices/{name}/applications/{appname}/actions/stop or .../start), whichever of the two actions was issued most recently takes effect for that device. - operationId: startFleetApplication - x-rbac: - resource: fleets/applications/lifecycle - action: update - parameters: - - name: name - in: path - description: The name of the Fleet resource. - required: true - schema: - type: string - - name: appname - in: path - description: The name of the application, as defined in the fleet's device template. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - '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' - /fleets/{fleet}/templateversions: - x-resource: fleets/templateversions - get: - tags: - - fleet - description: list template versions - operationId: listTemplateVersions - parameters: - - name: fleet - in: path - description: The owner of the template versions. - required: true - schema: - type: string - - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateVersionList' - '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' - /fleets/{fleet}/templateversions/{name}: - x-resource: fleets/templateversions - get: - tags: - - fleet - description: read the specified template version - operationId: getTemplateVersion - parameters: - - name: fleet - in: path - description: The owner of the template version. - required: true - schema: - type: string - - name: name - in: path - description: The name of the template version. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateVersion' - '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' - '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: - - fleet - description: delete a template version - operationId: deleteTemplateVersion - parameters: - - name: fleet - in: path - description: The owner of the template version. - required: true - schema: - type: string - - name: name - in: path - description: The name of the template version. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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' - /labels: - x-resource: labels - get: - tags: - - label - description: | - Retrieves a distinct list of labels for the specified resource type. - operationId: listLabels - parameters: - - name: kind - in: query - description: The type of resource to retrieve labels from. - required: true - schema: - type: string - enum: - - Device - - name: labelSelector - in: query - description: A filter to retrieve labels only from resources that match the given label selector. - schema: - type: string - - name: fieldSelector - in: query - description: A filter to retrieve labels only from resources that match the given field selector. - schema: - type: string - - name: limit - in: query - description: The maximum number of distinct labels to return in the response. - required: false - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/LabelList' - examples: - labelsExample: - summary: Example response for labels - value: - - environment=production - - region=us-east-1 - - tier=backend - '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' - /events: - x-resource: events - get: - tags: - - event - description: | - Retrieves a list of events. - operationId: listEvents - 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 - - name: order - in: query - description: Sort order for the results by timestamp. Defaults to 'desc' (newest first). - schema: - type: string - enum: - - asc - - desc - default: desc - - name: limit - in: query - description: The maximum number of events to return in the response. - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 - - 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 - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/EventList' - '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' - /organizations: - x-resource: organizations - get: - tags: - - organization - 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 - content: - application/json: - schema: - $ref: '#/components/schemas/OrganizationList' - '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' - /authproviders: - x-resource: 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 - 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' - links: - GetAuthProvider: - operationId: getAuthProvider - parameters: - name: $response.body#/metadata/name - DeleteAuthProvider: - operationId: deleteAuthProvider - parameters: - name: $response.body#/metadata/name - ReplaceAuthProvider: - operationId: replaceAuthProvider - parameters: - name: $response.body#/metadata/name - '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' - /authproviders/{name}: - x-resource: authproviders - 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' - '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' - '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' - '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' - '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: - ApiVersion: - type: string - x-go-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.' - enum: - - v1beta1 - - flightctl.io/v1beta1 - - '' - x-enum-varnames: - - ApiVersionV1beta1 - - ApiVersionFlightctlIoV1beta1 - - ApiVersionEmpty - 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: - $ref: '#/components/schemas/ApiVersion' - 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. - example: - apiVersion: flightctl.io/v1beta1 - kind: Repository - metadata: - name: example-repo - spec: - type: oci - registry: quay.io - accessMode: ReadWrite - status: - conditions: [] - 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 - description: HTTP endpoint specification for fetching configuration. - additionalProperties: false - properties: - url: - type: string - minLength: 1 - example: https://example.com/config - description: The HTTP URL to call. - type: - type: string - description: The repository type discriminator. - enum: - - http - x-enum-varnames: - - HttpRepoSpecTypeHttp - httpConfig: - $ref: '#/components/schemas/HttpConfig' - validationSuffix: - type: string - description: URL suffix used only for validating access to the repository. Users might use the URL field as a root URL to be used by config sources adding suffixes. This will help with the validation of the http endpoint. - required: - - url - - type - SshConfig: - type: object - description: Configuration for SSH transport. - additionalProperties: false - properties: - sshPrivateKey: - type: string - description: Base64 encoded private SSH key. - format: password - privateKeyPassphrase: - type: string - description: The passphrase for sshPrivateKey. - format: password - skipServerVerification: - type: boolean - description: Skip remote server verification. - GitRepoSpec: - type: object - description: Git repository specification. Supports no auth (public repos), HTTP/HTTPS auth, or SSH auth. - additionalProperties: false - properties: - url: - type: string - minLength: 1 - example: https://github.com/example/repo.git - description: The Git repository URL to clone from. - type: - type: string - description: The repository type discriminator. - enum: - - git - x-enum-varnames: - - GitRepoSpecTypeGit - httpConfig: - $ref: '#/components/schemas/HttpConfig' - sshConfig: - $ref: '#/components/schemas/SshConfig' - required: - - url - - type - not: - required: - - httpConfig - - sshConfig - OciAuthType: - type: string - description: The type of authentication for OCI registries. - enum: - - docker - DockerAuth: - type: object - description: Docker-style authentication for OCI registries. - additionalProperties: false - properties: - authType: - $ref: '#/components/schemas/OciAuthType' - username: - type: string - description: The username for registry authentication. - password: - type: string - description: The password or token for registry authentication. - format: password - required: - - authType - - username - - password - OciAuth: - type: object - description: Authentication for OCI registries. - discriminator: - propertyName: authType - mapping: - docker: '#/components/schemas/DockerAuth' - oneOf: - - $ref: '#/components/schemas/DockerAuth' - BaseImageEntry: - type: object - description: A curated base image entry available in an OCI registry. - properties: - displayName: - type: string - description: Human-readable label shown in the UI (e.g., "CentOS"). - imageName: - type: string - minLength: 1 - maxLength: 255 - description: Image path within the registry (e.g., "centos-bootc/centos-bootc"). - tags: - type: array - minItems: 1 - items: - type: string - minLength: 1 - maxLength: 128 - pattern: ^[\w][\w.-]{0,127}$ - description: Selectable tags for this image (e.g., ["stream9", "stream10"]). - required: - - imageName - - tags - additionalProperties: false - OciRepoSpec: - type: object - description: OCI container registry specification. - additionalProperties: false - properties: - registry: - type: string - description: The OCI registry hostname, FQDN, or IP address with optional port (e.g., quay.io, registry.redhat.io, myregistry.com:5000, 192.168.1.1:5000, [::1]:5000). - scheme: - type: string - description: URL scheme for connecting to the registry. - enum: - - http - - https - default: https - type: - type: string - description: The repository type discriminator. - enum: - - oci - x-enum-varnames: - - OciRepoSpecTypeOci - accessMode: - type: string - description: 'Access mode for the registry: "Read" for read-only (pull), "ReadWrite" for read-write (pull and push).' - enum: - - Read - - ReadWrite - default: Read - ociAuth: - $ref: '#/components/schemas/OciAuth' - ca.crt: - type: string - description: Base64 encoded root CA. - skipServerVerification: - type: boolean - description: Skip remote server verification. - baseImages: - type: array - description: Curated list of trusted base images available in this registry. When present, the Image Builder source picker surfaces these entries as selectable options. - items: - $ref: '#/components/schemas/BaseImageEntry' - required: - - registry - - type - RepositorySpec: - type: object - description: RepositorySpec describes a configuration repository. - oneOf: - - $ref: '#/components/schemas/GitRepoSpec' - - $ref: '#/components/schemas/HttpRepoSpec' - - $ref: '#/components/schemas/OciRepoSpec' - discriminator: - propertyName: type - mapping: - git: '#/components/schemas/GitRepoSpec' - http: '#/components/schemas/HttpRepoSpec' - oci: '#/components/schemas/OciRepoSpec' - RepositoryStatus: - type: object - description: RepositoryStatus represents information about the status of a repository. - properties: - conditions: - type: array - description: Current state of the repository. - items: - $ref: '#/components/schemas/Condition' - required: - - conditions - RepositoryList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 repositories. - items: - $ref: '#/components/schemas/Repository' - description: RepositoryList is a list of Repositories. - required: - - apiVersion - - kind - - metadata - - items - RepoSpecType: - type: string - description: RepoSpecType is the type of the repository. - enum: - - git - - http - - oci - x-enum-varnames: - - RepoSpecTypeGit - - RepoSpecTypeHttp - - RepoSpecTypeOci - Device: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/DeviceSpec' - status: - $ref: '#/components/schemas/DeviceStatus' - required: - - apiVersion - - kind - - metadata - additionalProperties: false - description: Device represents a physical device. - example: - apiVersion: flightctl.io/v1beta1 - kind: Device - metadata: - name: f62dfb4f5d2cdbb9339362b5f18f2ce268d75649bdc80003f0e04292a7ef8c3 - labels: - fleet: default - DeviceConsole: - type: object - description: DeviceConsole represents the console connection information. - properties: - sessionMetadata: - type: string - description: Additional session metadata in the form of key=value pairs, can be used to initialize the type of terminal, console to be used, etc. - sessionID: - type: string - description: The session ID for the console connection. - required: - - sessionMetadata - - sessionID - readOnly: true - ConfigProviderSpec: - oneOf: - - $ref: '#/components/schemas/GitConfigProviderSpec' - - $ref: '#/components/schemas/KubernetesSecretProviderSpec' - - $ref: '#/components/schemas/InlineConfigProviderSpec' - - $ref: '#/components/schemas/HttpConfigProviderSpec' - GitConfigProviderSpec: - type: object - properties: - name: - type: string - description: The name of the config provider. - gitRef: - type: object - description: The reference to a Git configuration server. - properties: - repository: - type: string - description: The name of the Repository resource. - targetRevision: - type: string - description: The revision to use from the Repository. - path: - type: string - description: The path to the config in the Repository. - required: - - repository - - targetRevision - - path - required: - - name - - gitRef - KubernetesSecretProviderSpec: - type: object - properties: - name: - type: string - description: The name of the config provider. - secretRef: - type: object - description: The reference to a Kubernetes secret. - properties: - name: - type: string - description: The name of the secret. - namespace: - type: string - description: The namespace of the secret. - mountPath: - type: string - description: Path in the device's file system at which the secret should be mounted. - user: - type: string - description: The file's owner, specified either as a name or numeric ID. Defaults to "root". - x-go-type: Username - x-go-type-skip-optional-pointer: true - group: - type: string - description: The file's group, specified either as a name or numeric ID. Defaults to "root". - x-go-type-skip-optional-pointer: true - required: - - name - - namespace - - mountPath - required: - - name - - secretRef - InlineConfigProviderSpec: - type: object - properties: - name: - type: string - description: The name of the config provider. - inline: - type: array - description: A list of files to create on the device. - items: - $ref: '#/components/schemas/FileSpec' - required: - - name - - inline - FileSpec: - allOf: - - $ref: '#/components/schemas/FileContent' - - $ref: '#/components/schemas/FileMetadata' - - $ref: '#/components/schemas/AbsolutePath' - - type: object - required: - - path - - content - FileContent: - description: The content of a file. - type: object - properties: - content: - type: string - description: The plain text (UTF-8) or base64-encoded content of the file. - contentEncoding: - $ref: '#/components/schemas/EncodingType' - AbsolutePath: - type: object - description: Represents an absolute file path. - properties: - path: - type: string - description: The absolute path to a file on the system. Note that any existing file will be overwritten. - example: /var/log/app.log - RelativePath: - type: object - description: Represents a relative file path. - properties: - path: - type: string - description: A relative file path on the system. Note that any existing file will be overwritten. - example: src/index.js - EncodingType: - type: string - description: Specifies the encoding type used for data representation. - enum: - - plain - - base64 - x-enum-varnames: - - EncodingPlain - - EncodingBase64 - FileMetadata: - description: File metadata. - type: object - properties: - mode: - type: integer - description: The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. - user: - type: string - description: The file's owner, specified either as a name or numeric ID. Defaults to "root". - x-go-type: Username - x-go-type-skip-optional-pointer: true - group: - type: string - description: The file's group, specified either as a name or numeric ID. Defaults to "root". - x-go-type-skip-optional-pointer: true - HttpConfigProviderSpec: - type: object - properties: - name: - type: string - description: The name of the config provider. - httpRef: - type: object - description: The reference to an HTTP configuration server. - properties: - repository: - type: string - description: The name of the repository resource to use as the sync source. - suffix: - type: string - description: 'Part of the URL that comes after the base URL. It can include query parameters such as: "/path/to/endpoint?query=param".' - filePath: - type: string - description: Path in the device's file system to which the content returned by the HTTP sever should be written. - required: - - repository - - filePath - required: - - name - - httpRef - ApplicationProviderSpec: - oneOf: - - $ref: '#/components/schemas/ComposeApplication' - - $ref: '#/components/schemas/QuadletApplication' - - $ref: '#/components/schemas/ContainerApplication' - - $ref: '#/components/schemas/HelmApplication' - - $ref: '#/components/schemas/VmApplication' - discriminator: - propertyName: appType - mapping: - compose: '#/components/schemas/ComposeApplication' - quadlet: '#/components/schemas/QuadletApplication' - container: '#/components/schemas/ContainerApplication' - helm: '#/components/schemas/HelmApplication' - vm: '#/components/schemas/VmApplication' - ApplicationDesiredState: - type: string - description: Desired lifecycle state for an application. - enum: - - running - - stopped - x-enum-varnames: - - ApplicationDesiredStateRunning - - ApplicationDesiredStateStopped - ApplicationProviderBase: - type: object - description: Common properties for all application types. - properties: - name: - type: string - 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' - annotations: - type: object - additionalProperties: - type: string - readOnly: true - description: Arbitrary metadata annotations. Used internally by the control plane (e.g., flightctl.io/workload-type) when transforming application types at render time. - desiredState: - allOf: - - $ref: '#/components/schemas/ApplicationDesiredState' - readOnly: true - description: 'Desired lifecycle state for this application, as most recently set by the stop/start device APIs. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent.' - restartGeneration: - type: integer - readOnly: true - description: 'Counter incremented by the restart device API each time the application is restarted. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent.' - required: - - appType - CatalogItemRefApplicationProviderSpec: - type: object - properties: - catalogItemRef: - $ref: '#/components/schemas/CatalogItemRefSpec' - required: - - catalogItemRef - ComposeApplication: - type: object - allOf: - - $ref: '#/components/schemas/ApplicationProviderBase' - - $ref: '#/components/schemas/ApplicationEnvVars' - - $ref: '#/components/schemas/ApplicationVolumeProviderSpec' - - oneOf: - - $ref: '#/components/schemas/ImageApplicationProviderSpec' - - $ref: '#/components/schemas/CatalogItemRefApplicationProviderSpec' - - $ref: '#/components/schemas/InlineApplicationProviderSpec' - QuadletApplication: - type: object - allOf: - - $ref: '#/components/schemas/ApplicationProviderBase' - - $ref: '#/components/schemas/ApplicationEnvVars' - - $ref: '#/components/schemas/ApplicationUser' - - $ref: '#/components/schemas/ApplicationVolumeProviderSpec' - - oneOf: - - $ref: '#/components/schemas/ImageApplicationProviderSpec' - - $ref: '#/components/schemas/CatalogItemRefApplicationProviderSpec' - - $ref: '#/components/schemas/InlineApplicationProviderSpec' - ContainerApplication: - type: object - allOf: - - $ref: '#/components/schemas/ApplicationProviderBase' - - $ref: '#/components/schemas/ApplicationEnvVars' - - $ref: '#/components/schemas/ApplicationUser' - - $ref: '#/components/schemas/ApplicationVolumeProviderSpec' - - oneOf: - - $ref: '#/components/schemas/ImageApplicationProviderSpec' - - $ref: '#/components/schemas/CatalogItemRefApplicationProviderSpec' - - type: object - properties: - ports: - type: array - description: Port mappings. - items: - $ref: '#/components/schemas/ApplicationPort' - resources: - $ref: '#/components/schemas/ApplicationResources' - HelmApplication: - type: object - allOf: - - $ref: '#/components/schemas/ApplicationProviderBase' - - oneOf: - - $ref: '#/components/schemas/ImageApplicationProviderSpec' - - $ref: '#/components/schemas/CatalogItemRefApplicationProviderSpec' - - type: object - properties: - namespace: - type: string - description: The target namespace for the application deployment. - example: my-app-namespace - values: - type: object - additionalProperties: true - description: Configuration values for the application. Supports arbitrarily nested structures. - example: - replicaCount: 3 - image: - repository: nginx - tag: '1.21' - service: - type: ClusterIP - port: 80 - ingress: - enabled: true - hosts: - - host: example.com - paths: - - path: / - pathType: Prefix - valuesFiles: - type: array - description: List of values files to apply during deployment. Files are relative paths and applied in array order before user-provided values. - items: - type: string - example: - - values-production.yaml - - values-overrides.yml - required: - - image - VmApplication: - type: object - description: A VM workload managed by the FlightCtl agent. The VM definition may be delivered either as an OCI image/artifact or as inline application content. For inline providers, the package must contain a KubeVirt VirtualMachine YAML file named vm.yaml. - allOf: - - $ref: '#/components/schemas/ApplicationProviderBase' - - type: object - properties: - publishPorts: - type: array - description: List of host-to-guest port mappings for the VM. Each entry must follow the format "hostPort:guestPort" or "hostPort:guestPort/protocol" (e.g. "8080:80" or "8080:80/tcp"). - items: - type: string - pattern: ^[0-9]+:[0-9]+(/(tcp|udp|sctp))?$ - - oneOf: - - $ref: '#/components/schemas/ImageApplicationProviderSpec' - - $ref: '#/components/schemas/InlineApplicationProviderSpec' - ApplicationUser: - type: object - properties: - runAs: - type: string - description: The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified. - x-go-type: Username - x-go-type-skip-optional-pointer: true - ContainerApplicationProperties: - type: object - description: Properties for container application deployments. - properties: - ports: - type: array - description: Port mappings. - items: - $ref: '#/components/schemas/ApplicationPort' - resources: - $ref: '#/components/schemas/ApplicationResources' - ImageOrCatalogItemRefSpec: - description: Either a specific OCI image reference, or a reference to a catalog item version that can be resolved to an OCI image ref. - allOf: - - type: object - description: Reference to an OCI image or artifact with tag. - properties: - image: - type: string - description: Reference to an OCI image or artifact with tag. - x-go-type-skip-optional-pointer: true - - type: object - description: Reference to a catalog item version. - properties: - catalogItemRef: - $ref: '#/components/schemas/CatalogItemRefSpec' - ImageApplicationProviderSpec: - $ref: '#/components/schemas/ImageSpec' - InlineApplicationProviderSpec: - type: object - allOf: - - type: object - properties: - inline: - type: array - description: A list of application content. - items: - $ref: '#/components/schemas/ApplicationContent' - required: - - inline - ApplicationVolumeProviderSpec: - type: object - properties: - volumes: - type: array - description: List of application volumes. - items: - $ref: '#/components/schemas/ApplicationVolume' - ApplicationVolume: - allOf: - - type: object - description: Defines a named volume used by an application. - properties: - 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: - image: - $ref: '#/components/schemas/ImageVolumeSource' - required: - - image - not: - required: - - mount - ImageVolumeSource: - type: object - description: Describes the source of an OCI-compliant image or artifact. Exactly one of 'reference' or 'catalogItemRef' must be specified. - properties: - reference: - type: string - 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. - x-go-type-skip-optional-pointer: true - catalogItemRef: - $ref: '#/components/schemas/CatalogItemRefSpec' - pullPolicy: - $ref: '#/components/schemas/ImagePullPolicy' - 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' - - $ref: '#/components/schemas/RelativePath' - - type: object - required: - - path - ApplicationEnvVars: - type: object - properties: - envVars: - type: object - 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 - - helm - - vm - x-enum-varnames: - - AppTypeCompose - - AppTypeQuadlet - - AppTypeContainer - - AppTypeHelm - - AppTypeVm - ResourceMonitor: - oneOf: - - $ref: '#/components/schemas/CpuResourceMonitorSpec' - - $ref: '#/components/schemas/MemoryResourceMonitorSpec' - - $ref: '#/components/schemas/DiskResourceMonitorSpec' - discriminator: - propertyName: monitorType - mapping: - CPU: '#/components/schemas/CpuResourceMonitorSpec' - Memory: '#/components/schemas/MemoryResourceMonitorSpec' - Disk: '#/components/schemas/DiskResourceMonitorSpec' - required: - - monitorType - ResourceMonitorSpec: - type: object - description: Specification for monitoring a resource. - properties: - alertRules: - type: array - items: - $ref: '#/components/schemas/ResourceAlertRule' - description: Array of alert rules. Only one alert per severity is allowed. - samplingInterval: - type: string - pattern: ^[1-9]\d*[smh]$ - description: 'Duration between monitor samples. Format: positive integer followed by ''s'' for seconds, ''m'' for minutes, ''h'' for hours.' - required: - - monitorType - - alertRules - - samplingInterval - CpuResourceMonitorSpec: - allOf: - - type: object - required: - - monitorType - properties: - monitorType: - type: string - description: The type of resource to monitor. - - $ref: '#/components/schemas/ResourceMonitorSpec' - MemoryResourceMonitorSpec: - allOf: - - type: object - required: - - monitorType - properties: - monitorType: - type: string - description: The type of resource to monitor. - - $ref: '#/components/schemas/ResourceMonitorSpec' - DiskResourceMonitorSpec: - allOf: - - $ref: '#/components/schemas/ResourceMonitorSpec' - - type: object - required: - - monitorType - properties: - monitorType: - type: string - description: The type of resource to monitor. - - type: object - description: Specification for monitoring disk usage. - required: - - path - properties: - path: - type: string - description: The directory path to monitor for disk usage. - ResourceAlertRule: - type: object - properties: - severity: - $ref: '#/components/schemas/ResourceAlertSeverityType' - duration: - type: string - pattern: ^\d+[smh]$ - description: 'Duration is the time over which the average usage is observed before alerting. Format: positive integer followed by ''s'' for seconds, ''m'' for minutes, ''h'' for hours.' - percentage: - type: number - description: The percentage of usage that triggers the alert. - description: - type: string - description: A human-readable description of the alert. - required: - - severity - - duration - - percentage - - description - ResourceAlertSeverityType: - type: string - description: Severity of the alert. - enum: - - Warning - - Critical - - Info - x-enum-varnames: - - ResourceAlertSeverityTypeWarning - - ResourceAlertSeverityTypeCritical - - ResourceAlertSeverityTypeInfo - DeviceLifecycleHookType: - type: string - enum: - - BeforeUpdating - - AfterUpdating - - BeforeRebooting - - AfterRebooting - x-enum-varnames: - - DeviceLifecycleHookBeforeUpdating - - DeviceLifecycleHookAfterUpdating - - DeviceLifecycleHookBeforeRebooting - - DeviceLifecycleHookAfterRebooting - HookAction: - allOf: - - type: object - properties: - if: - type: array - description: Conditions that must be met for the action to be executed. - items: - $ref: '#/components/schemas/HookCondition' - timeout: - 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, and 'h' for hours. - - oneOf: - - $ref: '#/components/schemas/HookActionRun' - HookCondition: - type: object - oneOf: - - $ref: '#/components/schemas/HookConditionPathOp' - - $ref: '#/components/schemas/HookConditionExpression' - HookConditionPathOp: - type: object - properties: - path: - type: string - description: The absolute path to a file or directory that must have changed as condition for the action to be performed. - op: - type: array - description: The operation(s) on files at or below the path that satisfy the path condition. - items: - $ref: '#/components/schemas/FileOperation' - required: - - path - - op - FileOperation: - type: string - enum: - - created - - removed - - updated - x-enum-varnames: - - FileOperationCreated - - FileOperationRemoved - - FileOperationUpdated - HookConditionExpression: - type: string - description: An expression that must evaluate to true as condition for the action to be performed. - HookActionRun: - type: object - properties: - run: - type: string - description: The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context. - envVars: - type: object - description: Environment variable key-value pairs, injected during runtime. - additionalProperties: - type: string - workDir: - type: string - description: The working directory to be used when running the command. - required: - - run - DeviceUpdatePolicySpec: - type: object - description: Specifies the policy for managing device updates, including when updates should be downloaded and applied. - properties: - downloadSchedule: - $ref: '#/components/schemas/UpdateSchedule' - updateSchedule: - $ref: '#/components/schemas/UpdateSchedule' - UpdateSchedule: - type: object - description: Defines the schedule for automatic downloading and updates, including timing and optional timeout. - properties: - timeZone: - $ref: '#/components/schemas/TimeZone' - at: - $ref: '#/components/schemas/CronExpression' - startGraceDuration: - $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"). - default: Local - CronExpression: - type: string - 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 * * *`. - ImagePullPolicy: - type: string - description: Optional. Defaults to 'IfNotPresent'. When set to 'Always', the image is pulled every time. When set to 'Never', the image must already exist on the device. - enum: - - Always - - IfNotPresent - - Never - x-enum-varnames: - - PullAlways - - PullIfNotPresent - - PullNever - default: IfNotPresent - DeviceList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 Devices. - items: - $ref: '#/components/schemas/Device' - summary: - $ref: '#/components/schemas/DevicesSummary' - description: DeviceList is a list of Devices. - required: - - apiVersion - - kind - - metadata - - items - DeviceOsSpec: - $ref: '#/components/schemas/ImageOrCatalogItemRefSpec' - DeviceStatus: - type: object - description: DeviceStatus represents information about the status of a device. Status may trail the actual state of a device. - required: - - conditions - - systemInfo - - applications - - applicationsSummary - - resources - - integrity - - config - - os - - updated - - summary - - lifecycle - properties: - conditions: - type: array - description: Conditions represent the observations of a the current state of a device. - items: - $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 statuses. - items: - $ref: '#/components/schemas/DeviceApplicationStatus' - applicationsSummary: - $ref: '#/components/schemas/DeviceApplicationsSummaryStatus' - resources: - $ref: '#/components/schemas/DeviceResourceStatus' - integrity: - $ref: '#/components/schemas/DeviceIntegrityStatus' - config: - $ref: '#/components/schemas/DeviceConfigStatus' - os: - $ref: '#/components/schemas/DeviceOsStatus' - updated: - $ref: '#/components/schemas/DeviceUpdatedStatus' - summary: - $ref: '#/components/schemas/DeviceSummaryStatus' - lastSeen: - type: string - description: 'The last time the device was seen by the service (NOTE: this property is not returned by the API).' - format: date-time - x-go-json-ignore: true - lifecycle: - $ref: '#/components/schemas/DeviceLifecycleStatus' - dependencySync: - $ref: '#/components/schemas/DependencySyncStatus' - capabilities: - $ref: '#/components/schemas/DeviceCapabilities' - additionalProperties: false - DeviceLastSeen: - type: object - description: DeviceLastSeen represents the last seen timestamp of a device. - required: - - lastSeen - properties: - lastSeen: - type: string - description: The last time the device was seen by the service. - format: date-time - DeviceSystemInfo: - required: - - architecture - - bootID - - operatingSystem - - agentVersion - type: object - description: System information collected from the device. - properties: - architecture: - type: string - description: The Architecture reported by the device. - bootID: - type: string - description: Boot ID reported by the device. - operatingSystem: - type: string - description: The Operating System reported by the device. - agentVersion: - type: string - description: The Agent version. - customInfo: - $ref: '#/components/schemas/CustomDeviceInfo' - additionalProperties: - type: string - description: | - Optional system attributes exposed by the agent. - Each key corresponds to a configurable internal capability. - CustomDeviceInfo: - type: object - description: User-defined information about the device. - 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: - - name - - ready - - restarts - - status - - embedded - - appType - properties: - name: - type: string - description: Human readable name of the application. - ready: - type: string - description: The number of containers which are ready in the application. - restarts: - type: integer - 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' - runAs: - type: string - description: The username of the system user this application is runing under. If blank, the application is run as the same user as the agent (generally root). - x-go-type: Username - x-go-type-skip-optional-pointer: true - volumes: - type: array - description: Status of volumes used by this application. - items: - $ref: '#/components/schemas/ApplicationVolumeStatus' - ApplicationVolumeStatus: - type: object - description: Status of a volume used by an application. - required: - - name - - reference - properties: - name: - type: string - description: Name of the volume. - reference: - type: string - description: Reference to the deployed OCI-compliant image or artifact backing the volume. - DeviceApplicationsSummaryStatus: - type: object - description: A summary of the health of applications on the device. - required: - - status - properties: - status: - $ref: '#/components/schemas/ApplicationsSummaryStatusType' - info: - type: string - description: Human readable information detailing the last application transition. - ApplicationsSummaryStatusType: - type: string - description: Status of all applications on the device. - enum: - - Healthy - - Degraded - - Error - - Unknown - - NoApplications - x-enum-varnames: - - ApplicationsSummaryStatusHealthy - - ApplicationsSummaryStatusDegraded - - ApplicationsSummaryStatusError - - ApplicationsSummaryStatusUnknown - - ApplicationsSummaryStatusNoApplications - ApplicationStatusType: - type: string - description: Status of a single application on the device. - enum: - - Preparing - - Starting - - Running - - Error - - Unknown - - Completed - - Stopped - - Stopping - x-enum-varnames: - - ApplicationStatusPreparing - - ApplicationStatusStarting - - ApplicationStatusRunning - - ApplicationStatusError - - ApplicationStatusUnknown - - ApplicationStatusCompleted - - ApplicationStatusStopped - - ApplicationStatusStopping - OsModeType: - type: string - description: OS management mode. "image" indicates the OS is managed via bootc or rpm-ostree image updates. "package" indicates no image-based OS management is available. - enum: - - image - - package - x-enum-varnames: - - OsModeImage - - OsModePackage - DeviceCapabilities: - type: object - description: Capabilities reported by the device agent. - properties: - osMode: - $ref: '#/components/schemas/OsModeType' - additionalProperties: false - DeviceOsStatus: - type: object - description: Current status of the device OS. - required: - - image - - imageDigest - properties: - image: - type: string - description: Version of the OS image. - imageDigest: - type: string - description: The digest of the OS image (e.g. sha256:a0...). - DeviceConfigStatus: - type: object - description: Current status of the device config. - required: - - renderedVersion - properties: - renderedVersion: - type: string - description: Rendered version of the device config. - DeviceSummaryStatus: - type: object - description: A summary of the health of the device hardware and operating system resources. - required: - - status - properties: - status: - $ref: '#/components/schemas/DeviceSummaryStatusType' - info: - type: string - description: Human readable information detailing the last device status transition. - DeviceSummaryStatusType: - type: string - description: Status of the device. - enum: - - Online - - Degraded - - Error - - Rebooting - - PoweredOff - - Unknown - - AwaitingReconnect - - ConflictPaused - x-enum-varnames: - - DeviceSummaryStatusOnline - - DeviceSummaryStatusDegraded - - DeviceSummaryStatusError - - DeviceSummaryStatusRebooting - - DeviceSummaryStatusPoweredOff - - DeviceSummaryStatusUnknown - - DeviceSummaryStatusAwaitingReconnect - - DeviceSummaryStatusConflictPaused - DeviceUpdatedStatus: - type: object - description: Current status of the device update. - required: - - status - properties: - status: - $ref: '#/components/schemas/DeviceUpdatedStatusType' - info: - type: string - description: Human readable information about the last device update transition. - DeviceUpdatedStatusType: - type: string - description: Status type of the device update. - enum: - - UpToDate - - OutOfDate - - Updating - - Unknown - x-enum-varnames: - - DeviceUpdatedStatusUpToDate - - DeviceUpdatedStatusOutOfDate - - DeviceUpdatedStatusUpdating - - DeviceUpdatedStatusUnknown - DeviceLifecycleStatus: - type: object - required: - - status - properties: - status: - $ref: '#/components/schemas/DeviceLifecycleStatusType' - info: - type: string - description: Human readable information about the device lifecycle status. - description: Current status of the device lifecycle. - DeviceIntegrityCheckStatus: - type: object - description: DeviceIntegrityCheckStatus represents the status of the integrity check performed on the device. - required: - - status - properties: - status: - $ref: '#/components/schemas/DeviceIntegrityCheckStatusType' - info: - type: string - description: Human-readable information about the integrity check status. - DeviceIntegrityCheckStatusType: - type: string - description: Status of the integrity check performed on the device. - enum: - - Unknown - - Unsupported - - Failed - - Verified - x-enum-varnames: - - DeviceIntegrityCheckStatusUnknown - - DeviceIntegrityCheckStatusUnsupported - - DeviceIntegrityCheckStatusFailed - - DeviceIntegrityCheckStatusVerified - DeviceLifecycleStatusType: - type: string - enum: - - Unknown - - Enrolled - - Decommissioning - - Decommissioned - x-enum-varnames: - - DeviceLifecycleStatusUnknown - - DeviceLifecycleStatusEnrolled - - DeviceLifecycleStatusDecommissioning - - DeviceLifecycleStatusDecommissioned - description: Status type of the device lifecycle. - DeviceIntegrityStatus: - type: object - description: Summary status of the integrity of the device. - required: - - status - properties: - deviceIdentity: - $ref: '#/components/schemas/DeviceIntegrityCheckStatus' - tpm: - $ref: '#/components/schemas/DeviceIntegrityCheckStatus' - status: - $ref: '#/components/schemas/DeviceIntegrityStatusSummaryType' - info: - type: string - description: Human readable information about the last integrity transition. - lastVerified: - type: string - format: date-time - description: Timestamp of the last integrity verification. - DeviceIntegrityStatusSummaryType: - type: string - description: Status of the integrity of the device. - enum: - - Verified - - Failed - - Unknown - - Unsupported - x-enum-varnames: - - DeviceIntegrityStatusVerified - - DeviceIntegrityStatusFailed - - DeviceIntegrityStatusUnknown - - DeviceIntegrityStatusUnsupported - DeviceResourceStatus: - type: object - description: Current status of the resources of the device. - required: - - cpu - - memory - - disk - properties: - cpu: - $ref: '#/components/schemas/DeviceResourceStatusType' - memory: - $ref: '#/components/schemas/DeviceResourceStatusType' - disk: - $ref: '#/components/schemas/DeviceResourceStatusType' - DeviceResourceStatusType: - type: string - description: The types of resource statuses. - enum: - - Healthy - - Warning - - Critical - - Error - - Unknown - x-enum-varnames: - - DeviceResourceStatusHealthy - - DeviceResourceStatusWarning - - DeviceResourceStatusCritical - - DeviceResourceStatusError - - DeviceResourceStatusUnknown - EnrollmentRequestApproval: - type: object - description: EnrollmentRequestApproval contains information about the approval of a device enrollment request. - properties: - labels: - type: object - additionalProperties: - type: string - description: Labels to set on the device. If replaceLabels is false (default), labels are merged with agent-provided labels from the enrollment request. If replaceLabels is true, labels are used as the complete final set ignoring agent-provided labels. - replaceLabels: - type: boolean - default: false - description: Controls whether labels are merged or replaced during approval. If false (default), labels are merged with agent-provided labels from the enrollment request. If true, labels are used as the complete final set and agent-provided labels are ignored. - approved: - type: boolean - description: Indicates whether the request has been approved. - required: - - approved - EnrollmentRequestApprovalStatus: - description: EnrollmentRequestApprovalStatus represents information about the status of a device enrollment request approval. - allOf: - - $ref: '#/components/schemas/EnrollmentRequestApproval' - - type: object - description: EnrollmentRequestApprovalStatus contains information about the status of approval of a device enrollment request. - properties: - approvedBy: - type: string - description: The name of the approver. - approvedAt: - type: string - format: date-time - description: The time at which the request was approved. - required: - - approvedBy - - approvedAt - EnrollmentServiceAuth: - type: object - description: EnrollmentServiceAuth contains the client authentication information for a Flight Control enrollment service. - properties: - client-certificate-data: - type: string - description: ClientCertificateData contains PEM-encoded data from a client cert file for TLS. - client-key-data: - type: string - description: ClientKeyData contains PEM-encoded data from a client key file for TLS. - required: - - client-certificate-data - - client-key-data - EnrollmentServiceService: - type: object - description: EnrollmentServiceService contains information about connecting to a Flight Control enrollment service. - properties: - certificate-authority-data: - type: string - description: CertificateAuthorityData contains PEM-encoded certificate authority certificates. - server: - type: string - description: Server is the address of the Flight Control enrollment service (https://hostname:port). - required: - - certificate-authority-data - - server - EnrollmentService: - type: object - description: EnrollmentService contains information about how to communicate with a Flight Control enrollment service. - properties: - authentication: - $ref: '#/components/schemas/EnrollmentServiceAuth' - service: - $ref: '#/components/schemas/EnrollmentServiceService' - enrollment-ui-endpoint: - type: string - description: The URL of the UI that the agent uses to print the QR code and link for enrolling the device. - required: - - authentication - - service - - enrollment-ui-endpoint - EnrollmentConfig: - type: object - properties: - enrollment-service: - $ref: '#/components/schemas/EnrollmentService' - required: - - enrollment-service - EnrollmentRequest: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/EnrollmentRequestSpec' - status: - $ref: '#/components/schemas/EnrollmentRequestStatus' - required: - - apiVersion - - kind - - metadata - - spec - description: EnrollmentRequest represents a request for approval to enroll a device. - example: - apiVersion: flightctl.io/v1beta1 - kind: EnrollmentRequest - metadata: - name: 13d632d86373caaeda64da4052f957faa742fc7050026748bc79065c8819d1b0 - spec: - csr: | - -----BEGIN CERTIFICATE REQUEST----- - MIIBBjCBrQIBADBLMUkwRwYDVQQDE0AxM2Q2MzJkODYzNzNjYWFlZGE2NGRhNDA1 - MmY5NTdmYWE3NDJmYzcwNTAwMjY3NDhiYzc5MDY1Yzg4MTlkMWIwMFkwEwYHKoZI - zj0CAQYIKoZIzj0DAQcDQgAEHBMC30NRJTJ3NWOlei9YWkBM/MzoNDGyMRKuzE0/ - cKkyXVJexHq0xIn22YCNN3ZDNxxwW6LlQg3ijGnvStQOb6AAMAoGCCqGSM49BAMC - A0gAMEUCIQDSrxi6krdCKcLChdMB3w7IqmDlZhREGbHMCESVn6ssPAIgZL+QrJtw - 8R+r4piaYvZktrsk3yCIuz3hI7loYmXP3d8= - -----END CERTIFICATE REQUEST----- - EnrollmentRequestList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 EnrollmentRequest. - items: - $ref: '#/components/schemas/EnrollmentRequest' - required: - - apiVersion - - kind - - metadata - - items - description: EnrollmentRequestList is a list of EnrollmentRequest. - EnrollmentRequestSpec: - required: - - csr - type: object - properties: - csr: - type: string - description: The PEM-encoded PKCS#10 certificate signing request. - deviceStatus: - $ref: '#/components/schemas/DeviceStatus' - labels: - type: object - 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). - osMode: - $ref: '#/components/schemas/OsModeType' - description: EnrollmentRequestSpec is a description of a EnrollmentRequest's target state. - EnrollmentRequestStatus: - type: object - properties: - certificate: - type: string - description: The PEM-encoded signed certificate. - conditions: - type: array - description: Current state of the EnrollmentRequest. - items: - $ref: '#/components/schemas/Condition' - approval: - $ref: '#/components/schemas/EnrollmentRequestApprovalStatus' - required: - - conditions - description: EnrollmentRequestStatus represents information about the status of a EnrollmentRequest. - ResourceSync: - type: object - description: ResourceSync represents a reference to one or more files in a repository to sync to resource definitions. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/ResourceSyncSpec' - status: - $ref: '#/components/schemas/ResourceSyncStatus' - required: - - apiVersion - - kind - - metadata - - spec - example: - apiVersion: flightctl.io/v1beta1 - kind: ResourceSync - metadata: - name: example-sync - spec: - repository: example-repo - targetRevision: main - path: /resources - status: - conditions: [] - ResourceSyncSpec: - type: object - description: ResourceSyncSpec describes the file(s) to sync from a repository. - properties: - type: - $ref: '#/components/schemas/ResourceSyncType' - repository: - type: string - minLength: 1 - description: The name of the repository resource to use as the sync source. - targetRevision: - type: string - minLength: 1 - maxLength: 244 - example: main - description: The desired revision in the repository. - path: - type: string - minLength: 0 - maxLength: 2048 - example: /resources - description: The path of a file or directory in the repository. If a directory, the directory should contain only resource definitions with no subdirectories. Each file should contain the definition of one or more resources. - required: - - repository - - targetRevision - - path - ResourceSyncType: - type: string - description: The type of resources this ResourceSync manages. Defaults to fleet if not specified. - default: fleet - enum: - - fleet - - catalog - x-enum-varnames: - - ResourceSyncTypeFleet - - ResourceSyncTypeCatalog - ResourceSyncStatus: - type: object - properties: - observedCommit: - type: string - description: The last commit hash that was synced. - observedGeneration: - type: integer - format: int64 - description: The last generation that was synced. - conditions: - type: array - description: Current state of a resourcesync. - items: - $ref: '#/components/schemas/Condition' - required: - - conditions - description: ResourceSyncStatus represents information about the status of a ResourceSync. - ResourceSyncList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 resourcesync. - items: - $ref: '#/components/schemas/ResourceSync' - required: - - apiVersion - - kind - - metadata - - items - Fleet: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/FleetSpec' - status: - $ref: '#/components/schemas/FleetStatus' - required: - - apiVersion - - kind - - metadata - - spec - additionalProperties: false - description: Fleet represents a set of devices. - FleetList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 Fleets. - items: - $ref: '#/components/schemas/Fleet' - required: - - apiVersion - - kind - - metadata - - items - description: FleetList is a list of Fleets. - DisruptionBudget: - type: object - properties: - groupBy: - type: array - items: - type: string - pattern: ^([A-Za-z0-9][-A-Za-z0-9_/.]*)?[A-Za-z0-9]$ - description: List of label keys to perform grouping for the disruption budget. - minAvailable: - type: integer - minimum: 1 - description: The maximum number of unavailable devices allowed during rollout. - maxUnavailable: - minimum: 1 - type: integer - description: The minimum number of required available devices during rollout. - description: DisruptionBudget defines the level of allowed disruption when rollout is in progress. - Percentage: - type: string - description: Percentage is the string format representing percentage string. - Batch: - type: object - properties: - selector: - $ref: '#/components/schemas/LabelSelector' - successThreshold: - $ref: '#/components/schemas/Percentage' - limit: - description: The maximum number or percentage of devices to update in the batch. - oneOf: - - $ref: '#/components/schemas/Percentage' - - type: integer - minimum: 1 - description: Batch is an element in batch sequence. - Duration: - 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.' - RolloutStrategy: - type: string - description: The strategy of choice for device selection in rollout policy. - enum: - - BatchSequence - BatchSequence: - type: object - description: BatchSequence defines the list of batches to be executed in sequence. - required: - - strategy - properties: - strategy: - $ref: '#/components/schemas/RolloutStrategy' - sequence: - type: array - description: A list of batch definitions. - minItems: 1 - items: - $ref: '#/components/schemas/Batch' - RolloutDeviceSelection: - type: object - description: Describes how to select devices for rollout. - oneOf: - - $ref: '#/components/schemas/BatchSequence' - discriminator: - propertyName: strategy - mapping: - BatchSequence: '#/components/schemas/BatchSequence' - RolloutPolicy: - type: object - properties: - disruptionBudget: - $ref: '#/components/schemas/DisruptionBudget' - deviceSelection: - $ref: '#/components/schemas/RolloutDeviceSelection' - successThreshold: - $ref: '#/components/schemas/Percentage' - defaultUpdateTimeout: - $ref: '#/components/schemas/Duration' - description: RolloutPolicy is the rollout policy of the fleet. - FleetSpec: - type: object - description: FleetSpec is a description of a fleet's target state. - properties: - selector: - $ref: '#/components/schemas/LabelSelector' - rolloutPolicy: - $ref: '#/components/schemas/RolloutPolicy' - template: - type: object - description: The template for the devices in the fleet. - properties: - metadata: - $ref: '#/components/schemas/ObjectMeta' - spec: - $ref: '#/components/schemas/DeviceSpec' - required: - - spec - additionalProperties: false - required: - - template - additionalProperties: false - DeviceSpec: - type: object - description: DeviceSpec describes a device. - properties: - updatePolicy: - $ref: '#/components/schemas/DeviceUpdatePolicySpec' - os: - $ref: '#/components/schemas/DeviceOsSpec' - config: - type: array - description: List of config providers. - items: - $ref: '#/components/schemas/ConfigProviderSpec' - applications: - type: array - description: List of application providers. - items: - $ref: '#/components/schemas/ApplicationProviderSpec' - systemd: - type: object - description: The systemd services to monitor. - properties: - matchPatterns: - type: array - description: A list of match patterns. - items: - type: string - description: A single systemd unit name, with or without suffix, or a shell-style glob pattern to match against currently loaded units. - pattern: ^[0-9a-zA-Z:\-_.\\\[\]!\-\*\?]+(@[0-9a-zA-Z:\-_.\\\[\]!\-\*\?]+)?(\.[a-zA-Z\[\]!\-\*\?]+)?$ - maxLength: 256 - additionalProperties: false - resources: - type: array - description: Array of resource monitor configurations. - items: - $ref: '#/components/schemas/ResourceMonitor' - consoles: - type: array - description: The list of active console sessions. - items: - $ref: '#/components/schemas/DeviceConsole' - decommissioning: - $ref: '#/components/schemas/DeviceDecommission' - FleetRolloutStatus: - type: object - description: FleetRolloutStatus represents information about the status of a fleet rollout. - properties: - currentBatch: - type: integer - description: The batch number currently being rolled out. - DependencySyncStatus: - type: object - description: DependencySyncStatus represents the synchronization fingerprints for external dependencies of a device, captured at render time. - properties: - configRefs: - type: array - description: Per-config-provider fingerprint and last update time, set when the device renders. - items: - $ref: '#/components/schemas/DependencySyncConfigRefStatus' - additionalProperties: false - DependencySyncConfigRefStatus: - type: object - description: DependencySyncConfigRefStatus represents the rendered fingerprint for a single config provider's external dependency. - required: - - configProviderName - properties: - configProviderName: - type: string - description: The name of the config provider (e.g. the git or HTTP config source name). - fingerprint: - type: string - description: The fingerprint of the rendered content (e.g. git commit SHA, sha256 of HTTP body, K8s secret ResourceVersion). - lastUpdatedAt: - type: string - format: date-time - description: The last time the fingerprint changed (i.e. the dependency content was updated). - additionalProperties: false - FleetStatus: - type: object - description: FleetStatus represents information about the status of a fleet. Status may trail the actual state of a fleet, especially if devices of a fleet have not contacted the management service in a while. - properties: - rollout: - $ref: '#/components/schemas/FleetRolloutStatus' - conditions: - type: array - description: Current state of the fleet. - items: - $ref: '#/components/schemas/Condition' - devicesSummary: - $ref: '#/components/schemas/DevicesSummary' - required: - - conditions - additionalProperties: false - DevicesSummary: - type: object - description: A summary of the devices in the fleet returned when fetching a single Fleet. - required: - - total - - applicationStatus - - summaryStatus - - updateStatus - properties: - total: - type: integer - format: int64 - description: The total number of devices in the fleet. - applicationStatus: - type: object - default: {} - additionalProperties: - type: integer - format: int64 - description: A breakdown of the devices in the fleet by "application" status. - summaryStatus: - type: object - default: {} - additionalProperties: - type: integer - format: int64 - description: A breakdown of the devices in the fleet by "summary" status. - updateStatus: - type: object - default: {} - additionalProperties: - type: integer - format: int64 - description: A breakdown of the devices in the fleet by "updated" status. - capabilities: - $ref: '#/components/schemas/DevicesSummaryCapabilities' - DevicesSummaryCapabilities: - type: object - description: Breakdowns of devices by status.capabilities fields. - properties: - osMode: - type: object - default: {} - additionalProperties: - type: integer - format: int64 - description: Counts by status.capabilities.osMode (e.g. image, package). The key "unknown" counts devices that have not reported the capability. - additionalProperties: false - TemplateVersion: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/TemplateVersionSpec' - status: - $ref: '#/components/schemas/TemplateVersionStatus' - required: - - apiVersion - - kind - - metadata - - spec - description: TemplateVersion represents a version of a template. - TemplateVersionSpec: - type: object - description: TemplateVersionSpec describes a version of a device template. - properties: - fleet: - type: string - description: The fleet whose template this refers to. - required: - - fleet - TemplateVersionStatus: - description: TemplateVersionStatus represents information about the status of a template version. - allOf: - - $ref: '#/components/schemas/DeviceSpec' - - type: object - properties: - updatedAt: - type: string - description: The time at which the template was last updated. - format: date-time - conditions: - type: array - description: Current state of the device. - items: - $ref: '#/components/schemas/Condition' - required: - - conditions - TemplateVersionList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 TemplateVersions. - items: - $ref: '#/components/schemas/TemplateVersion' - required: - - apiVersion - - kind - - metadata - - items - description: TemplateVersionList is a list of TemplateVersions. - AuthConfig: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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: - grant_type: - type: string - enum: - - refresh_token - - authorization_code - description: OAuth2 grant type. - x-oapi-codegen-extra-tags: - form: grant_type - client_id: - type: string - minLength: 1 - 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 - additionalProperties: false - TokenResponse: - type: object - properties: - 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 - additionalProperties: false - 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 - additionalProperties: false - ListMeta: - type: object - properties: - continue: - type: string - description: May be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. - remainingItemCount: - type: integer - description: The number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. - format: int64 - description: ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - ObjectMeta: - type: object - properties: - creationTimestamp: - type: string - description: The time the object was created. - format: date-time - deletionTimestamp: - type: string - description: The time the object will be deleted. - format: date-time - name: - type: string - maxLength: 253 - description: The name of the object. - labels: - type: object - description: Map of string keys and values that can be used to organize and categorize (scope and select) objects. - additionalProperties: - type: string - maxLength: 63 - generation: - type: integer - description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - format: int64 - owner: - type: string - description: A resource that owns this resource, in "kind/name" format. - annotations: - type: object - additionalProperties: - type: string - description: Properties set by the service. - resourceVersion: - type: string - description: An opaque string that identifies the server's internal version of an object. - description: ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - MatchExpression: - type: object - properties: - key: - type: string - description: The label key that the selector applies to. - operator: - type: string - description: The operation to apply when matching. - enum: - - In - - NotIn - - Exists - - DoesNotExist - values: - type: array - description: The list of values to match. - items: - type: string - required: - - key - - operator - MatchExpressions: - type: array - description: A list of match expressions. - minItems: 1 - items: - $ref: '#/components/schemas/MatchExpression' - LabelSelector: - type: object - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. Empty/null label selectors match nothing. - properties: - matchLabels: - type: object - description: A map of {key,value} pairs. - additionalProperties: - type: string - matchExpressions: - $ref: '#/components/schemas/MatchExpressions' - LabelList: - type: array - items: - type: string - description: | - A list of distinct labels, where each item is formatted as "key=value". - example: - - environment=production - - region=us-east-1 - - tier=backend - Status: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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.' - code: - type: integer - format: int32 - description: Suggested HTTP return code for this status, 0 if not set. - message: - type: string - description: A human-readable description of the status of this operation. - reason: - type: string - description: A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. - status: - type: string - description: 'Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.' - description: Status is a return value for calls that don't return other objects. - required: - - apiVersion - - kind - - status - - code - - reason - - message - ConditionBase: - type: object - description: Base condition structure following Kubernetes API conventions. Use with allOf to add a specific type enum. - required: - - status - - lastTransitionTime - - reason - - message - properties: - status: - $ref: '#/components/schemas/ConditionStatus' - observedGeneration: - type: integer - format: int64 - description: The .metadata.generation that the condition was set based upon. - lastTransitionTime: - type: string - format: date-time - description: The last time the condition transitioned from one status to another. - message: - type: string - description: Human readable message indicating details about last transition. - reason: - type: string - description: A (brief) reason for the condition's last transition. - Condition: - description: Condition contains details for one aspect of the current state of this API Resource. - allOf: - - $ref: '#/components/schemas/ConditionBase' - - type: object - required: - - type - properties: - type: - $ref: '#/components/schemas/ConditionType' - ConditionType: - type: string - description: Type of condition in CamelCase. - enum: - - Approved - - TPMVerified - - Approved - - Denied - - Failed - - TPMVerified - - Accessible - - Accessible - - ResourceParsed - - Synced - - Valid - - RolloutInProgress - - Updating - - SpecValid - - MultipleOwners - - DeviceDecommissioning - x-enum-varnames: - - EnrollmentRequestApproved - - EnrollmentRequestTPMVerified - - CertificateSigningRequestApproved - - CertificateSigningRequestDenied - - CertificateSigningRequestFailed - - CertificateSigningRequestTPMVerified - - RepositoryAccessible - - ResourceSyncAccessible - - ResourceSyncResourceParsed - - ResourceSyncSynced - - FleetValid - - FleetRolloutInProgress - - DeviceUpdating - - DeviceSpecValid - - DeviceMultipleOwners - - DeviceDecommissioning - ConditionStatus: - type: string - description: Status of the condition, one of True, False, Unknown. - enum: - - 'True' - - 'False' - - Unknown - x-enum-varnames: - - ConditionStatusTrue - - ConditionStatusFalse - - ConditionStatusUnknown - CertificateSigningRequest: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/CertificateSigningRequestSpec' - status: - $ref: '#/components/schemas/CertificateSigningRequestStatus' - required: - - apiVersion - - kind - - metadata - - spec - description: CertificateSigningRequest represents a request for a signed certificate from the CA. - CertificateSigningRequestList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 CertificateSigningRequest. - items: - $ref: '#/components/schemas/CertificateSigningRequest' - required: - - apiVersion - - kind - - metadata - - items - description: CertificateSigningRequestList is a list of CertificateSigningRequest. - CertificateSigningRequestSpec: - description: Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec. - properties: - expirationSeconds: - description: Requested duration of validity for the certificate. - format: int32 - type: integer - extra: - additionalProperties: - items: - type: string - type: array - description: Extra attributes of the user that created the CSR, populated by the API server on creation and immutable. - type: object - request: - description: The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource. - format: byte - type: string - signerName: - description: Indicates the requested signer, and is a qualified name. - type: string - minLength: 1 - uid: - description: UID of the user that created the CSR, populated by the API server on creation and immutable. - type: string - usages: - description: Usages specifies a set of key usages requested in the issued certificate. - items: - type: string - type: array - username: - description: Name of the user that created the CSR, populated by the API server on creation and immutable. - type: string - required: - - request - - signerName - type: object - CertificateSigningRequestStatus: - description: Indicates approval/denial/failure status of the CSR, and contains the issued certificate if any exists. - properties: - certificate: - description: The issued signed certificate, immutable once populated. - format: byte - type: string - conditions: - type: array - description: Conditions applied to the request. Known conditions are Approved, Denied, and Failed. - items: - $ref: '#/components/schemas/Condition' - required: - - conditions - type: object - Version: - type: object - properties: - version: - description: Git version of the service. - type: string - required: - - version - Event: - type: object - description: Event represents a single event that occurred in the system. - required: - - apiVersion - - kind - - metadata - - involvedObject - - reason - - message - - type - - source - - actor - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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' - involvedObject: - $ref: '#/components/schemas/ObjectReference' - reason: - type: string - description: A short, machine-readable string that describes the reason for the event. - enum: - - ResourceCreated - - ResourceCreationFailed - - ResourceUpdated - - ResourceUpdateFailed - - ResourceDeleted - - ResourceDeletionFailed - - DeviceDecommissioned - - DeviceDecommissionFailed - - DeviceCPUCritical - - DeviceCPUWarning - - DeviceCPUNormal - - DeviceMemoryCritical - - DeviceMemoryWarning - - DeviceMemoryNormal - - DeviceDiskCritical - - DeviceDiskWarning - - DeviceDiskNormal - - DeviceApplicationError - - DeviceApplicationDegraded - - DeviceApplicationHealthy - - DeviceDisconnected - - DeviceIsRebooting - - DeviceConflictPaused - - DeviceConflictResolved - - DeviceConnected - - DeviceContentUpToDate - - DeviceContentOutOfDate - - DeviceContentUpdating - - DeviceUpdateFailed - - DeviceVulnerabilityCVECritical - - DeviceVulnerabilityCVEResolved - - DeviceVulnerabilityCVEWarning - - DeviceOSImageChanged - - EnrollmentRequestApproved - - EnrollmentRequestApprovalFailed - - DeviceMultipleOwnersDetected - - DeviceMultipleOwnersResolved - - DeviceSpecValid - - DeviceSpecInvalid - - InternalTaskFailed - - InternalTaskPermanentlyFailed - - RepositoryAccessible - - RepositoryInaccessible - - ReferencedRepositoryUpdated - - FleetValid - - FleetInvalid - - FleetRolloutCreated - - FleetRolloutStarted - - FleetRolloutFailed - - FleetRolloutCompleted - - FleetRolloutBatchDispatched - - FleetRolloutDeviceSelected - - FleetRolloutBatchCompleted - - ResourceSyncCommitDetected - - ResourceSyncAccessible - - ResourceSyncInaccessible - - ResourceSyncParsed - - ResourceSyncParsingFailed - - ResourceSyncSynced - - ResourceSyncSyncFailed - - DependencyChangeDetected - - DependencySyncProbeFailed - - SystemRestored - - EncryptionMigrationStarted - - EncryptionMigrationCompleted - - ApplicationLifecycleChanged - message: - type: string - description: A human-readable description of the status of this operation. - details: - $ref: '#/components/schemas/EventDetails' - type: - type: string - description: The type of the event. One of Normal, Warning. - enum: - - Normal - - Warning - source: - $ref: '#/components/schemas/EventSource' - actor: - type: string - description: 'The name of the user or service that triggered the event. The value will be prefixed by either user: (for human users) or service: (for automated services).' - EventSource: - type: object - description: The component that is responsible for the event. - required: - - component - properties: - component: - type: string - description: The name of the component that is responsible for the event. - ObjectReference: - type: object - description: A reference to a resource. - required: - - kind - - name - properties: - 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.' - name: - type: string - description: The name of the referenced object. - EventList: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 Events. - items: - $ref: '#/components/schemas/Event' - required: - - apiVersion - - kind - - metadata - - items - description: EventList is a list of Events. - EventDetails: - type: object - required: - - detailType - description: Event-specific details, structured based on event type. - discriminator: - propertyName: detailType - mapping: - ResourceUpdated: '#/components/schemas/ResourceUpdatedDetails' - DeviceOwnershipChanged: '#/components/schemas/DeviceOwnershipChangedDetails' - DeviceMultipleOwnersDetected: '#/components/schemas/DeviceMultipleOwnersDetectedDetails' - DeviceMultipleOwnersResolved: '#/components/schemas/DeviceMultipleOwnersResolvedDetails' - InternalTaskFailed: '#/components/schemas/InternalTaskFailedDetails' - InternalTaskPermanentlyFailed: '#/components/schemas/InternalTaskPermanentlyFailedDetails' - ResourceSyncCompleted: '#/components/schemas/ResourceSyncCompletedDetails' - ReferencedRepositoryUpdated: '#/components/schemas/ReferencedRepositoryUpdatedDetails' - FleetRolloutStarted: '#/components/schemas/FleetRolloutStartedDetails' - FleetRolloutFailed: '#/components/schemas/FleetRolloutFailedDetails' - FleetRolloutCompleted: '#/components/schemas/FleetRolloutCompletedDetails' - FleetRolloutBatchDispatched: '#/components/schemas/FleetRolloutBatchDispatchedDetails' - FleetRolloutBatchCompleted: '#/components/schemas/FleetRolloutBatchCompletedDetails' - FleetRolloutDeviceSelected: '#/components/schemas/FleetRolloutDeviceSelectedDetails' - DeviceVulnerabilityCVE: '#/components/schemas/DeviceVulnerabilityCveDetails' - DependencyChangeDetected: '#/components/schemas/DependencyChangeDetectedDetails' - DependencySyncProbeFailed: '#/components/schemas/DependencySyncProbeFailedDetails' - ApplicationLifecycleChanged: '#/components/schemas/ApplicationLifecycleChangedDetails' - oneOf: - - $ref: '#/components/schemas/ResourceUpdatedDetails' - - $ref: '#/components/schemas/DeviceOwnershipChangedDetails' - - $ref: '#/components/schemas/DeviceMultipleOwnersDetectedDetails' - - $ref: '#/components/schemas/DeviceMultipleOwnersResolvedDetails' - - $ref: '#/components/schemas/InternalTaskFailedDetails' - - $ref: '#/components/schemas/InternalTaskPermanentlyFailedDetails' - - $ref: '#/components/schemas/ResourceSyncCompletedDetails' - - $ref: '#/components/schemas/ReferencedRepositoryUpdatedDetails' - - $ref: '#/components/schemas/FleetRolloutStartedDetails' - - $ref: '#/components/schemas/FleetRolloutFailedDetails' - - $ref: '#/components/schemas/FleetRolloutCompletedDetails' - - $ref: '#/components/schemas/FleetRolloutBatchDispatchedDetails' - - $ref: '#/components/schemas/FleetRolloutBatchCompletedDetails' - - $ref: '#/components/schemas/FleetRolloutDeviceSelectedDetails' - - $ref: '#/components/schemas/DeviceVulnerabilityCveDetails' - - $ref: '#/components/schemas/DependencyChangeDetectedDetails' - - $ref: '#/components/schemas/DependencySyncProbeFailedDetails' - - $ref: '#/components/schemas/ApplicationLifecycleChangedDetails' - DeviceVulnerabilityCveDetails: - type: object - description: Structured details for per-device CVE vulnerability events. - required: - - detailType - - cveId - properties: - detailType: - type: string - enum: - - DeviceVulnerabilityCVE - description: The type of detail for discriminator purposes. - cveId: - type: string - description: CVE identifier (e.g. CVE-2024-1234). MITRE-style CVE-YYYY-sequence identifier, matching device list filter validation. - pattern: ^CVE-[0-9]{4}-[0-9]{4,}$ - maxLength: 64 - firstImageRef: - type: string - description: Human-readable OS image reference when the CVE was first detected on this device (historical/audit field). - firstImageDigest: - type: string - description: Image digest when the CVE was first detected on this device (historical/audit field, e.g. sha256:...). - ResourceUpdatedDetails: - type: object - required: - - detailType - - updatedFields - properties: - detailType: - type: string - enum: - - ResourceUpdated - description: The type of detail for discriminator purposes. - updatedFields: - type: array - items: - type: string - enum: - - owner - - labels - - spec - - spec.selector - - spec.template - description: List of fields that were updated in the resource. - previousOwner: - type: string - nullable: true - description: The previous owner (if applicable). - newOwner: - type: string - nullable: true - description: The new owner (if applicable). - DeviceOwnershipChangedDetails: - type: object - required: - - detailType - properties: - detailType: - type: string - enum: - - DeviceOwnershipChanged - description: The type of detail for discriminator purposes. - previousOwner: - type: string - nullable: true - description: The previous owner fleet (null if none). - newOwner: - type: string - nullable: true - description: The new owner fleet (null if removed). - DeviceMultipleOwnersDetectedDetails: - type: object - required: - - detailType - - matchingFleets - properties: - detailType: - type: string - enum: - - DeviceMultipleOwnersDetected - description: The type of detail for discriminator purposes. - matchingFleets: - type: array - items: - type: string - description: List of fleet names that match the device. - DeviceMultipleOwnersResolvedDetails: - type: object - required: - - detailType - - resolutionType - properties: - detailType: - type: string - enum: - - DeviceMultipleOwnersResolved - description: The type of detail for discriminator purposes. - resolutionType: - type: string - enum: - - SingleMatch - - NoMatch - - FleetDeleted - description: How the conflict was resolved. - assignedOwner: - type: string - nullable: true - description: The fleet assigned as owner (null if no owner). - previousMatchingFleets: - type: array - items: - type: string - description: List of fleets that previously matched the device. - InternalTaskFailedDetails: - type: object - required: - - detailType - - errorMessage - - originalEvent - properties: - detailType: - type: string - enum: - - InternalTaskFailed - description: The type of detail for discriminator purposes. - errorMessage: - type: string - description: The error message describing the failure. - retryCount: - type: integer - description: Number of times the task has been retried. - originalEvent: - $ref: '#/components/schemas/Event' - InternalTaskPermanentlyFailedDetails: - type: object - required: - - detailType - - errorMessage - - retryCount - - originalEvent - properties: - detailType: - type: string - enum: - - InternalTaskPermanentlyFailed - description: The type of detail for discriminator purposes. - errorMessage: - type: string - description: The error message describing the permanent failure. - retryCount: - type: integer - description: Number of times the task was retried before being marked as permanently failed. - originalEvent: - $ref: '#/components/schemas/Event' - ResourceSyncCompletedDetails: - type: object - required: - - detailType - - commitHash - - changeCount - - errorCount - properties: - detailType: - type: string - enum: - - ResourceSyncCompleted - description: The type of detail for discriminator purposes. - commitHash: - type: string - description: Hash of the last commit. - changeCount: - type: integer - description: Number of changes introduced by this ResourceSync update. - errorCount: - type: integer - description: Number of errors encountered by this ResourceSync update. - FleetRolloutStartedDetails: - type: object - required: - - detailType - - templateVersion - - rolloutStrategy - properties: - detailType: - type: string - enum: - - FleetRolloutStarted - description: The type of detail for discriminator purposes. - templateVersion: - type: string - description: The name of the TemplateVersion that is rolling out. - rolloutStrategy: - type: string - enum: - - None - - Batched - description: Rollout strategy type. - FleetRolloutDeviceSelectedDetails: - type: object - required: - - detailType - - fleetName - - templateVersion - properties: - detailType: - type: string - enum: - - FleetRolloutDeviceSelected - description: The type of detail for discriminator purposes. - fleetName: - type: string - description: The name of the fleet that the device is being selected for. - templateVersion: - type: string - description: The name of the TemplateVersion that the device is being selected to render. - ApplicationLifecycleChangedDetails: - type: object - required: - - detailType - - appName - - action - properties: - detailType: - type: string - enum: - - ApplicationLifecycleChanged - x-enum-varnames: - - ApplicationLifecycleChangedDetailType - description: The type of detail for discriminator purposes. - appName: - type: string - description: The name of the application whose device-level lifecycle override changed. - action: - type: string - description: The lifecycle action that was requested. - enum: - - stop - - start - - restart - x-enum-varnames: - - ApplicationLifecycleActionStop - - ApplicationLifecycleActionStart - - ApplicationLifecycleActionRestart - FleetRolloutFailedDetails: - type: object - required: - - detailType - - templateVersion - properties: - detailType: - type: string - enum: - - FleetRolloutFailed - description: The type of detail for discriminator purposes. - templateVersion: - type: string - description: The name of the TemplateVersion that this fleet rollout failed for. - FleetRolloutCompletedDetails: - type: object - required: - - detailType - - templateVersion - properties: - detailType: - type: string - enum: - - FleetRolloutCompleted - description: The type of detail for discriminator purposes. - templateVersion: - type: string - description: The name of the TemplateVersion that this fleet rollout is completed for. - FleetRolloutBatchDispatchedDetails: - type: object - required: - - detailType - - templateVersion - - batch - properties: - detailType: - type: string - enum: - - FleetRolloutBatchDispatched - description: The type of detail for discriminator purposes. - templateVersion: - type: string - description: The name of the TemplateVersion that this batch is rolling out to. - batch: - type: string - description: The batch within the fleet rollout. - FleetRolloutBatchCompletedDetails: - type: object - required: - - detailType - - templateVersion - - batch - - successPercentage - - total - - successful - - failed - - timedOut - properties: - detailType: - type: string - enum: - - FleetRolloutBatchCompleted - description: The type of detail for discriminator purposes. - templateVersion: - type: string - description: The name of the TemplateVersion that this batch is rolling out to. - batch: - type: string - description: The batch within the fleet rollout. - successPercentage: - type: integer - format: int64 - description: The success percentage of the batch. - total: - type: integer - format: int64 - description: The total number of devices in the batch. - successful: - type: integer - format: int64 - description: The number of successful devices in the batch. - failed: - type: integer - format: int64 - description: The number of failed devices in the batch. - timedOut: - type: integer - format: int64 - description: The number of timed out devices in the batch. - ReferencedRepositoryUpdatedDetails: - type: object - required: - - detailType - - repository - properties: - detailType: - type: string - enum: - - ReferencedRepositoryUpdated - description: The type of detail for discriminator purposes. - repository: - type: string - description: The name of the repository that was updated. - DependencyChangeDetectedDetails: - type: object - required: - - detailType - - resourceKey - - fingerprint - properties: - detailType: - type: string - enum: - - DependencyChangeDetected - description: The type of detail for discriminator purposes. - resourceKey: - type: string - description: The resource key identifying the dependency that changed (e.g. "git:my-repo/main"). - fingerprint: - type: string - description: The new fingerprint (e.g. commit SHA) of the changed dependency. - DependencySyncProbeFailedDetails: - type: object - required: - - detailType - - resourceKey - - error - properties: - detailType: - type: string - enum: - - DependencySyncProbeFailed - description: The type of detail for discriminator purposes. - resourceKey: - type: string - description: The resource key identifying the dependency that failed (e.g. "git:my-repo/main"). - error: - type: string - description: The error message from the failed probe. - Organization: - type: object - required: - - apiVersion - - kind - - metadata - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/OrganizationSpec' - OrganizationSpec: - type: object - description: OrganizationSpec describes an organization. - properties: - displayName: - type: string - description: Human readable name shown to users. - externalId: - type: string - description: External ID of the organization. - OrganizationList: - type: object - required: - - apiVersion - - kind - - metadata - - items - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 Organizations. - items: - $ref: '#/components/schemas/Organization' - description: OrganizationList is a list of Organizations. - AuthProvider: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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. - 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. - 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. - 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-). - organizationNamePrefix: - type: string - description: Optional prefix for organization (project) names. Incoming names are exposed as prefix + name (e.g. 'ocp-' + project). - 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. - 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. - organizationNamePrefix: - type: string - description: Optional prefix for AAP organization names. Incoming names are exposed as prefix + name. - 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-). - organizationNamePrefix: - type: string - description: Optional prefix for the organization name. The default org name is exposed as prefix + 'default' when set. - required: - - providerType - - apiUrl - 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: - $ref: '#/components/schemas/ApiVersion' - 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 - CheckRepositoryOciTagRequest: - type: object - description: Request to check if a specific image tag exists in an OCI registry. - properties: - imageName: - type: string - description: The image name/path within the registry (e.g. "centos-bootc/centos-bootc"). Combined with the registry host from the Repository resource, this forms the full repository reference (e.g. "quay.io/centos-bootc/centos-bootc"). - minLength: 1 - maxLength: 255 - tag: - type: string - description: The image tag to check for existence (e.g. "9.5"). - minLength: 1 - maxLength: 128 - pattern: ^[\w][\w.-]{0,127}$ - required: - - imageName - - tag - additionalProperties: false - CheckRepositoryOciResult: - type: object - description: Result of an OCI registry check (tag existence or image accessibility). - properties: - accessible: - type: boolean - description: Whether the image or tag is accessible in the registry. - errorCode: - type: integer - description: HTTP status code returned by the OCI registry when accessible is false. Absent when the failure is not an HTTP-level error (e.g. network timeout). - errorMessage: - type: string - description: Error message describing why the image or tag is not accessible. - required: - - accessible - additionalProperties: false - CheckRepositoryOciImageRequest: - type: object - description: Request to check if a specific OCI image is accessible in a registry. - properties: - imageName: - type: string - description: The image name/path within the registry (e.g. "centos-bootc/centos-bootc"). Combined with the registry host from the Repository resource, this forms the full image reference (e.g. "quay.io/centos-bootc/centos-bootc"). - minLength: 1 - maxLength: 255 - required: - - imageName - additionalProperties: false - ImageSpec: - type: object - description: Reference to an OCI image or artifact with tag. - properties: - image: - description: Reference to an OCI image or artifact with tag. - type: string - required: - - image - CatalogItemRefSpec: - type: object - description: A reference to a catalog item, along with its configuration. - properties: - catalog: - type: string - description: The catalog name that the item is part of. - item: - type: string - description: The name of the catalog item itself. - version: - type: string - description: A valid version that currently exists in the catalog item. - channel: - type: string - description: An optional update channel which will be used to provide update cues when available. - required: - - catalog - - item - - version - additionalProperties: false diff --git a/api/bundled/imagebuilder-v1alpha1.yaml b/api/bundled/imagebuilder-v1alpha1.yaml deleted file mode 100644 index db69923..0000000 --- a/api/bundled/imagebuilder-v1alpha1.yaml +++ /dev/null @@ -1,2201 +0,0 @@ -openapi: 3.0.1 -info: - title: Flight Control Image Builder API - version: v1alpha1 - description: | - Image Builder service for Flight Control. - This service manages image build resources for building and pushing container images. - contact: - name: The Flight Control Team - url: https://flightctl.io - email: team@flightctl.io - license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html -servers: - - url: / -tags: - - name: imagebuild - description: Operations on ImageBuild resources. - - name: imageexport - description: Operations on ImageExport resources. - - name: imagepromotion - description: Operations on ImagePromotion resources. -paths: - /api/v1/imagebuilds: - x-resource: imagebuilds - get: - tags: - - imagebuild - description: List ImageBuild resources. - operationId: listImageBuilds - parameters: - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. - schema: - type: string - - name: fieldSelector - in: query - description: A selector to restrict the list of returned objects by their fields. - schema: - type: string - - name: limit - in: query - description: The maximum number of results returned in the list response. - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 - - name: continue - in: query - description: An optional parameter to query more results from the server. - schema: - type: string - - name: withExports - in: query - description: If true, includes related ImageExport resources in each ImageBuild in the response. - schema: - type: boolean - default: false - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImageBuildList' - '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: - - imagebuild - description: Create an ImageBuild resource. - operationId: createImageBuild - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ImageBuild' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/ImageBuild' - links: - GetImageBuild: - operationId: getImageBuild - parameters: - name: $response.body#/metadata/name - DeleteImageBuild: - operationId: deleteImageBuild - parameters: - name: $response.body#/metadata/name - GetImageBuildLog: - operationId: getImageBuildLog - parameters: - name: $response.body#/metadata/name - CancelImageBuild: - operationId: cancelImageBuild - parameters: - name: $response.body#/metadata/name - CreateImageExport: - operationId: createImageExport - requestBody: - apiVersion: flightctl.io/v1alpha1 - kind: ImageExport - metadata: - name: $response.body#/metadata/name - spec: - source: - type: imageBuild - imageBuildRef: $response.body#/metadata/name - format: qcow2 - '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/imagebuilds/{name}: - x-resource: imagebuilds - get: - tags: - - imagebuild - description: Get an ImageBuild resource. - operationId: getImageBuild - parameters: - - name: name - in: path - description: The name of the ImageBuild resource. - required: true - schema: - type: string - - name: withExports - in: query - description: If true, includes related ImageExport resources in the response. - schema: - type: boolean - default: false - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImageBuild' - '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' - '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: - - imagebuild - description: Delete an ImageBuild resource. - operationId: deleteImageBuild - parameters: - - name: name - in: path - description: The name of the ImageBuild resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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/imagebuilds/{name}/log: - x-resource: imagebuilds/log - get: - tags: - - imagebuild - description: Get logs for an ImageBuild resource. For active builds, streams logs live. For completed builds, returns last 500 lines. - operationId: getImageBuildLog - parameters: - - name: name - in: path - description: The name of the ImageBuild resource. - required: true - schema: - type: string - - name: follow - in: query - description: If true, stream logs continuously (like kubectl logs -f). For active builds, keeps connection open. For completed builds, returns all logs and closes. - schema: - type: boolean - default: false - responses: - '200': - description: OK - content: - text/plain: - schema: - type: string - description: Log output as plain text (when follow=false or for completed builds) - text/event-stream: - schema: - type: string - description: Log output as Server-Sent Events stream (when follow=true for active builds) - '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' - '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/imagebuilds/{name}/cancel: - x-resource: imagebuilds/cancel - post: - tags: - - imagebuild - description: Cancel a running ImageBuild. Only builds in Pending, Building, or Pushing state can be canceled. - operationId: cancelImageBuild - parameters: - - name: name - in: path - description: The name of the ImageBuild resource to cancel. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImageBuild' - '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 - Build not in cancelable state - 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/imagebuilds/{name}/newversion: - x-resource: imagebuilds/newversion - post: - tags: - - imagebuild - description: Create a new ImageBuild derived from an existing one, copying its spec with optional tag overrides. Sets flightctl.io/new-version-from annotation to record lineage. - operationId: createImageBuildNewVersion - parameters: - - name: name - in: path - description: The name of the parent ImageBuild resource. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ImageBuildNewVersionRequest' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/ImageBuild' - '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 - parent ImageBuild does not exist - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '409': - description: Conflict - ImageBuild with given name already exists - 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/imageexports: - x-resource: imageexports - get: - tags: - - imageexport - description: List ImageExport resources. - operationId: listImageExports - parameters: - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. - schema: - type: string - - name: fieldSelector - in: query - description: A selector to restrict the list of returned objects by their fields. - schema: - type: string - - name: limit - in: query - description: The maximum number of results returned in the list response. - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 - - name: continue - in: query - description: An optional parameter to query more results from the server. - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImageExportList' - '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: - - imageexport - description: Create an ImageExport resource. - operationId: createImageExport - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ImageExport' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/ImageExport' - links: - GetImageExport: - operationId: getImageExport - parameters: - name: $response.body#/metadata/name - DeleteImageExport: - operationId: deleteImageExport - parameters: - name: $response.body#/metadata/name - GetImageExportLog: - operationId: getImageExportLog - parameters: - name: $response.body#/metadata/name - CancelImageExport: - operationId: cancelImageExport - parameters: - name: $response.body#/metadata/name - DownloadImageExport: - operationId: downloadImageExport - parameters: - name: $response.body#/metadata/name - '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/imageexports/{name}: - x-resource: imageexports - get: - tags: - - imageexport - description: Get an ImageExport resource. - operationId: getImageExport - parameters: - - name: name - in: path - description: The name of the ImageExport resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImageExport' - '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' - '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: - - imageexport - description: Delete an ImageExport resource. - operationId: deleteImageExport - parameters: - - name: name - in: path - description: The name of the ImageExport resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' - '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/imageexports/{name}/cancel: - x-resource: imageexports/cancel - post: - tags: - - imageexport - description: Cancel a running ImageExport. Only exports in Pending, Converting, or Pushing state can be canceled. - operationId: cancelImageExport - parameters: - - name: name - in: path - description: The name of the ImageExport resource to cancel. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImageExport' - '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 - Export not in cancelable state - 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/imageexports/{name}/download: - x-resource: imageexports/download - get: - tags: - - imageexport - description: Download an ImageExport artifact from the registry. - operationId: downloadImageExport - parameters: - - name: name - in: path - description: The name of the ImageExport resource. - required: true - schema: - type: string - responses: - '200': - description: OK - Artifact blob content - content: - application/octet-stream: - schema: - type: string - format: binary - '302': - description: Found - Redirect to registry blob URL - headers: - Location: - schema: - type: string - '307': - description: Temporary Redirect - Redirect to registry blob URL - headers: - Location: - schema: - type: string - '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' - '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' - '503': - description: Service Unavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - /api/v1/imageexports/{name}/log: - x-resource: imageexports/log - get: - tags: - - imageexport - description: Get logs for an ImageExport resource. For active exports, streams logs live. For completed exports, returns last 500 lines. - operationId: getImageExportLog - parameters: - - name: name - in: path - description: The name of the ImageExport resource. - required: true - schema: - type: string - - name: follow - in: query - description: If true, stream logs continuously (like kubectl logs -f). For active exports, keeps connection open. For completed exports, returns all logs and closes. - schema: - type: boolean - default: false - responses: - '200': - description: OK - content: - text/plain: - schema: - type: string - description: Log output as plain text (when follow=false or for completed exports) - text/event-stream: - schema: - type: string - description: Log output as Server-Sent Events stream (when follow=true for active exports) - '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' - '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/imagepromotions: - x-resource: imagepromotions - get: - tags: - - imagepromotion - description: List ImagePromotion resources. - operationId: listImagePromotions - parameters: - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. - schema: - type: string - - name: fieldSelector - in: query - description: A selector to restrict the list of returned objects by their fields. - schema: - type: string - - name: limit - in: query - description: The maximum number of results returned in the list response. - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 - - name: continue - in: query - description: An optional parameter to query more results from the server. - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImagePromotionList' - '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: - - imagepromotion - description: Create an ImagePromotion resource to publish a completed image build to the software catalog. - operationId: createImagePromotion - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ImagePromotion' - required: true - responses: - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/ImagePromotion' - '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 - an ImagePromotion with the given name already exists. - 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/imagepromotions/{name}: - x-resource: imagepromotions - get: - tags: - - imagepromotion - description: Get an ImagePromotion resource. - operationId: getImagePromotion - parameters: - - name: name - in: path - description: The name of the ImagePromotion resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImagePromotion' - '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' - '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: - - imagepromotion - description: | - Replace an ImagePromotion resource. Only spec.source.exportFormats (append-only — the submitted list must be a superset of the current list) and metadata.labels may be changed. All other spec fields must be identical to the stored values or a 400 is returned. The promotion must not be in Failed or Publishing state. - operationId: replaceImagePromotion - parameters: - - name: name - in: path - description: The name of the ImagePromotion resource. - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ImagePromotion' - required: true - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ImagePromotion' - '201': - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/ImagePromotion' - '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 - concurrent update 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: - - imagepromotion - description: | - Patch an ImagePromotion resource using RFC 6902 JSON Patch. Only operations targeting /spec/source/exportFormats (or its children) and /metadata/labels are accepted. Export formats may only be added (append-only). The promotion must not be in Failed or Publishing state. - operationId: patchImagePromotion - parameters: - - name: name - in: path - description: The name of the ImagePromotion resource. - 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/ImagePromotion' - '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: - - imagepromotion - description: Delete an ImagePromotion resource. - operationId: deleteImagePromotion - parameters: - - name: name - in: path - description: The name of the ImagePromotion resource. - required: true - schema: - type: string - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - '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' -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: - ApiVersion: - type: string - x-go-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.' - enum: - - v1alpha1 - - flightctl.io/v1alpha1 - x-enum-varnames: - - ApiVersionV1alpha1 - - ApiVersionFlightctlIoV1alpha1 - ResourceKind: - type: string - enum: - - ImageBuild - - ImageExport - - ImagePromotion - description: Resource types exposed via the ImageBuilder API. - ImageBuild: - type: object - description: ImageBuild represents a build request for a container image. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/ImageBuildSpec' - status: - $ref: '#/components/schemas/ImageBuildStatus' - imageexports: - type: array - description: Array of ImageExport resources that reference this ImageBuild. Only populated when withExports query parameter is true. - items: - $ref: '#/components/schemas/ImageExport' - required: - - apiVersion - - kind - - metadata - - spec - example: - apiVersion: flightctl.io/v1alpha1 - kind: ImageBuild - metadata: - name: centos-bootc-stream9-build - spec: - source: - repository: quay-io - imageName: centos-bootc/centos-bootc - imageTag: stream9 - destination: - repository: my-registry - imageName: my-user/centos-bootc-custom - imageTag: v1.0.0 - binding: - type: late - additionalProperties: false - ImageBuildList: - type: object - description: ImageBuildList is a list of ImageBuild resources. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 ImageBuild resources. - items: - $ref: '#/components/schemas/ImageBuild' - required: - - apiVersion - - kind - - metadata - - items - ImageBuildSpec: - type: object - description: ImageBuildSpec describes the specification for an image build. - properties: - source: - $ref: '#/components/schemas/ImageBuildSource' - destination: - $ref: '#/components/schemas/ImageBuildDestination' - binding: - $ref: '#/components/schemas/ImageBuildBinding' - userConfiguration: - $ref: '#/components/schemas/ImageBuildUserConfiguration' - onboarding: - type: boolean - description: When true, installs the flightctl-onboarding RPM and enables flightctl-onboarding-setup.service for first-boot device configuration via a Cockpit-based onboarding wizard. Compatible with both early and late binding. Defaults to false. - required: - - source - - destination - - binding - additionalProperties: false - ImageBuildSource: - type: object - description: ImageBuildSource specifies the source image for the build. - properties: - repository: - type: string - minLength: 1 - description: The name of the Repository resource of type OCI containing the source image. - imageName: - type: string - minLength: 1 - maxLength: 255 - description: The name of the source image. - imageTag: - type: string - minLength: 1 - maxLength: 128 - pattern: ^[\w][\w.-]{0,127}$ - description: The tag of the source image. - required: - - repository - - imageName - - imageTag - ImageBuildDestination: - type: object - description: ImageBuildDestination specifies the destination for the built image. - properties: - repository: - type: string - minLength: 1 - description: The name of the Repository resource of type OCI to push the built image to. - imageName: - type: string - minLength: 1 - maxLength: 255 - description: The name of the output image. - imageTag: - type: string - minLength: 1 - maxLength: 128 - pattern: ^[\w][\w.-]{0,127}$ - description: The tag of the output image. - required: - - repository - - imageName - - imageTag - ImageBuildBinding: - description: ImageBuildBinding specifies binding configuration for the build. - oneOf: - - $ref: '#/components/schemas/EarlyBinding' - - $ref: '#/components/schemas/LateBinding' - discriminator: - propertyName: type - mapping: - early: '#/components/schemas/EarlyBinding' - late: '#/components/schemas/LateBinding' - ImageBuildUserConfiguration: - type: object - description: ImageBuildUserConfiguration specifies user configuration for the build. - properties: - username: - type: string - description: The username for the user configuration. - publickey: - type: string - description: The public key for the user configuration. - required: - - username - - publickey - EarlyBinding: - type: object - description: Early binding configuration - embeds certificate in the image. - required: - - type - properties: - type: - type: string - enum: - - early - description: The type of binding. - LateBinding: - type: object - description: Late binding configuration - device binds at first boot. - required: - - type - properties: - type: - type: string - enum: - - late - description: The type of binding. - BindingType: - type: string - description: The type of binding for the image build. - enum: - - early - - late - x-enum-varnames: - - BindingTypeEarly - - BindingTypeLate - ImageBuildStatus: - type: object - description: ImageBuildStatus represents the current status of an ImageBuild. - properties: - conditions: - type: array - description: Current conditions of the ImageBuild. - items: - $ref: '#/components/schemas/ImageBuildCondition' - imageReference: - type: string - description: The full image reference of the built image (e.g., quay.io/org/imagename:tag). - architecture: - type: string - description: The architecture of the built image. - manifestDigest: - type: string - description: The digest of the built image manifest. - lastSeen: - type: string - format: date-time - description: The last time the build was seen (heartbeat). - ImageBuildCondition: - description: Condition for ImageBuild resources. - allOf: - - $ref: '#/components/schemas/ConditionBase' - - type: object - required: - - type - properties: - type: - $ref: '#/components/schemas/ImageBuildConditionType' - ImageBuildConditionType: - type: string - description: Type of ImageBuild condition. - enum: - - Ready - x-enum-varnames: - - ImageBuildConditionTypeReady - ImageBuildConditionReason: - type: string - description: Reason for the ImageBuild Ready condition. - enum: - - Pending - - Building - - Pushing - - GeneratingSBOM - - Completed - - Failed - - Canceling - - Canceled - x-enum-varnames: - - ImageBuildConditionReasonPending - - ImageBuildConditionReasonBuilding - - ImageBuildConditionReasonPushing - - ImageBuildConditionReasonGeneratingSBOM - - ImageBuildConditionReasonCompleted - - ImageBuildConditionReasonFailed - - ImageBuildConditionReasonCanceling - - ImageBuildConditionReasonCanceled - ImageExport: - type: object - description: ImageExport represents an export request to convert and push images to different formats. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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/ImageExportSpec' - status: - $ref: '#/components/schemas/ImageExportStatus' - required: - - apiVersion - - kind - - metadata - - spec - example: - apiVersion: flightctl.io/v1alpha1 - kind: ImageExport - metadata: - name: my-edge-export-from-build - spec: - source: - type: imageBuild - imageBuildRef: centos-bootc-stream9-build - format: qcow2 - additionalProperties: false - ImageExportList: - type: object - description: ImageExportList is a list of ImageExport resources. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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 ImageExport resources. - items: - $ref: '#/components/schemas/ImageExport' - required: - - apiVersion - - kind - - metadata - - items - ImageExportSpec: - type: object - description: ImageExportSpec describes the specification for an image export. - properties: - source: - $ref: '#/components/schemas/ImageExportSource' - format: - $ref: '#/components/schemas/ExportFormatType' - required: - - source - - format - additionalProperties: false - ImageExportSource: - description: ImageExportSource specifies the source image for the export. - oneOf: - - $ref: '#/components/schemas/ImageBuildRefSource' - discriminator: - propertyName: type - mapping: - imageBuild: '#/components/schemas/ImageBuildRefSource' - ImageBuildRefSource: - type: object - description: ImageBuildRefSource specifies a source image from an ImageBuild resource. - required: - - type - - imageBuildRef - properties: - type: - type: string - enum: - - imageBuild - description: The type of source. - imageBuildRef: - type: string - minLength: 1 - description: The name of the ImageBuild resource to use as source. - ImageExportSourceType: - type: string - description: The type of source for the image export. - enum: - - imageBuild - x-enum-varnames: - - ImageExportSourceTypeImageBuild - ExportFormatType: - type: string - description: The type of format to export the image to. - enum: - - vmdk - - qcow2 - - iso - - qcow2-disk-container - x-enum-varnames: - - ExportFormatTypeVMDK - - ExportFormatTypeQCOW2 - - ExportFormatTypeISO - - ExportFormatTypeQCOW2DiskContainer - ImageExportStatus: - type: object - description: ImageExportStatus represents the current status of an ImageExport. - properties: - conditions: - type: array - description: Current conditions of the ImageExport. - items: - $ref: '#/components/schemas/ImageExportCondition' - manifestDigest: - type: string - description: The digest of the exported image manifest for this format. - lastSeen: - type: string - format: date-time - description: The last time the export was seen (heartbeat). - ImageExportCondition: - description: Condition for ImageExport resources. - allOf: - - $ref: '#/components/schemas/ConditionBase' - - type: object - required: - - type - properties: - type: - $ref: '#/components/schemas/ImageExportConditionType' - ImageExportConditionType: - type: string - description: Type of ImageExport condition. - enum: - - Ready - x-enum-varnames: - - ImageExportConditionTypeReady - ImageExportConditionReason: - type: string - description: Reason for the ImageExport Ready condition. - enum: - - Pending - - Converting - - Pushing - - Completed - - Failed - - Canceling - - Canceled - x-enum-varnames: - - ImageExportConditionReasonPending - - ImageExportConditionReasonConverting - - ImageExportConditionReasonPushing - - ImageExportConditionReasonCompleted - - ImageExportConditionReasonFailed - - ImageExportConditionReasonCanceling - - ImageExportConditionReasonCanceled - ImageExportFormatPhase: - type: string - description: The phase of a single format conversion. - enum: - - queued - - converting - - pushing - - complete - - failed - x-enum-varnames: - - ImageExportFormatPhaseQueued - - ImageExportFormatPhaseConverting - - ImageExportFormatPhasePushing - - ImageExportFormatPhaseComplete - - ImageExportFormatPhaseFailed - Status: - type: object - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - 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.' - code: - type: integer - format: int32 - description: Suggested HTTP return code for this status, 0 if not set. - message: - type: string - description: A human-readable description of the status of this operation. - reason: - type: string - description: A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. - status: - type: string - description: 'Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.' - description: Status is a return value for calls that don't return other objects. - required: - - apiVersion - - kind - - status - - code - - reason - - message - ImageBuildNewVersionRequest: - type: object - description: Request body for the newversion subresource endpoint. - properties: - name: - type: string - minLength: 1 - maxLength: 253 - description: Name for the new ImageBuild resource. - sourceImageTag: - type: string - minLength: 1 - maxLength: 128 - pattern: ^[\w][\w.-]{0,127}$ - description: Override for spec.source.imageTag. If omitted, the parent's tag is used. - destinationImageTag: - type: string - minLength: 1 - maxLength: 128 - pattern: ^[\w][\w.-]{0,127}$ - description: Override for spec.destination.imageTag. If omitted, the parent's tag is used. - required: - - name - additionalProperties: false - ImagePromotion: - type: object - description: ImagePromotion tracks a single publish attempt from an ImageBuild to a CatalogItem. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource this object represents. - metadata: - $ref: '#/components/schemas/ObjectMeta' - spec: - $ref: '#/components/schemas/ImagePromotionSpec' - status: - $ref: '#/components/schemas/ImagePromotionStatus' - required: - - apiVersion - - kind - - metadata - - spec - additionalProperties: false - ImagePromotionList: - type: object - description: ImagePromotionList is a list of ImagePromotion resources. - properties: - apiVersion: - $ref: '#/components/schemas/ApiVersion' - kind: - type: string - description: Kind is a string value representing the REST resource this object represents. - metadata: - $ref: '#/components/schemas/ListMeta' - items: - type: array - description: List of ImagePromotion resources. - items: - $ref: '#/components/schemas/ImagePromotion' - required: - - apiVersion - - kind - - metadata - - items - ImagePromotionSpec: - type: object - description: Desired state of an ImagePromotion resource. - properties: - source: - $ref: '#/components/schemas/ImagePromotionSource' - target: - $ref: '#/components/schemas/ImagePromotionTarget' - required: - - source - - target - additionalProperties: false - ImagePromotionSource: - type: object - description: Identifies the artifact(s) to publish. - properties: - imageBuildRef: - type: string - minLength: 1 - description: Name of the ImageBuild resource this promotion is linked to. The container/bootc artifact produced by this build is always included in the CatalogItem version entry. - exportFormats: - type: array - description: Optional list of additional artifact formats to include in the CatalogItem version entry. The promotion waits in WaitingForArtifacts until at least one successful ImageExport exists for every requested format. - items: - $ref: '#/components/schemas/ExportFormatType' - required: - - imageBuildRef - additionalProperties: false - ImagePromotionTarget: - description: Specifies where and how to publish the artifact(s). The type field is the discriminator. - oneOf: - - $ref: '#/components/schemas/NewCatalogItemTarget' - - $ref: '#/components/schemas/ExistingCatalogItemTarget' - discriminator: - propertyName: type - mapping: - NewCatalogItem: '#/components/schemas/NewCatalogItemTarget' - ExistingCatalogItem: '#/components/schemas/ExistingCatalogItemTarget' - ImagePromotionTargetBase: - type: object - description: Common fields shared by all ImagePromotionTarget variants. - properties: - type: - type: string - description: Discriminator for the target type. - catalogName: - type: string - minLength: 1 - description: Name of the parent Catalog resource. - catalogItemName: - type: string - minLength: 1 - description: Name of the CatalogItem to create or update. - version: - type: string - description: Semver version string for the new CatalogItem version entry. - required: - - type - - catalogName - - catalogItemName - - version - NewCatalogItemTarget: - description: Publish target that creates a new CatalogItem. Rejected immediately if a CatalogItem with the given catalogItemName already exists. - allOf: - - $ref: '#/components/schemas/ImagePromotionTargetBase' - - type: object - additionalProperties: false - properties: - type: - type: string - enum: - - NewCatalogItem - description: Discriminator for the target type. - catalogName: - type: string - description: Name of the parent Catalog resource. - catalogItemName: - type: string - description: Name of the CatalogItem to create. - version: - type: string - description: Semver version string for the new CatalogItem version entry. - readme: - type: string - description: Optional item-level readme for the new CatalogItem. Markdown is supported. - displayName: - type: string - description: Optional human-readable display name for the new CatalogItem. - ExistingCatalogItemTarget: - description: Publish target that appends a version to an existing CatalogItem. Rejected immediately if the CatalogItem does not exist. - allOf: - - $ref: '#/components/schemas/ImagePromotionTargetBase' - - type: object - additionalProperties: false - properties: - type: - type: string - enum: - - ExistingCatalogItem - description: Discriminator for the target type. - catalogName: - type: string - description: Name of the parent Catalog resource. - catalogItemName: - type: string - description: Name of the CatalogItem to update. - version: - type: string - description: Semver version string for the new CatalogItem version entry. - readme: - type: string - description: Optional version-level readme for this version entry. Markdown is supported. - replaces: - type: string - description: The single version this one replaces, defining the primary upgrade edge. - skips: - type: array - items: - type: string - description: Additional versions that can upgrade directly to this one. - skipRange: - type: string - description: Semver range of versions that can upgrade directly to this one (e.g. ">=1.0.0 <1.3.0"). - ImagePromotionStatus: - type: object - description: Observed state of an ImagePromotion resource. - properties: - conditions: - type: array - description: Conditions describing the current state of the promotion lifecycle. - items: - $ref: '#/components/schemas/ImagePromotionCondition' - publishedAt: - type: string - format: date-time - description: Timestamp of the initial successful promotion. Set once when the promotion first reaches Completed state. Not updated by subsequent amendments. - lastAmendedAt: - type: string - format: date-time - description: Timestamp of the most recent successful amendment (i.e., when the last additional export format was written to the CatalogItemVersion). Absent if the promotion has never been amended. - artifactStatuses: - type: array - description: Per-artifact readiness summary. One entry for the ImageBuild (container artifact) and one entry per requested exportFormat. Updated as artifacts become available or as new formats are added via PATCH/PUT. - items: - $ref: '#/components/schemas/ArtifactPromotionStatus' - ArtifactPromotionStatus: - type: object - properties: - format: - type: string - description: Artifact format. "container" for the ImageBuild artifact; one of the exportFormats values for additional artifacts. - ready: - type: boolean - description: True when at least one successful artifact of this format is available. - published: - type: boolean - description: True when this format's artifact reference has been successfully written to the CatalogItemVersion. For the initial publish, all formats are published atomically. For amendments, formats added via PATCH/PUT start as published=false and transition to published=true when their CatalogItem patch succeeds. - resolvedExport: - type: string - description: Name of the ImageExport resource that will be (or was) used for this format. Absent for the container artifact and for formats not yet ready. - required: - - format - - ready - - published - additionalProperties: false - ImagePromotionCondition: - description: Condition for ImagePromotion resources. - allOf: - - $ref: '#/components/schemas/ConditionBase' - - type: object - required: - - type - properties: - type: - $ref: '#/components/schemas/ImagePromotionConditionType' - ImagePromotionConditionType: - type: string - description: Type of ImagePromotion condition. - enum: - - Ready - x-enum-varnames: - - ImagePromotionConditionTypeReady - ImagePromotionConditionReason: - type: string - description: Reason for the ImagePromotion Ready condition. - enum: - - WaitingForArtifacts - - Publishing - - Completed - - Failed - - BuildFailed - - BuildCanceled - - AmendmentFailed - x-enum-varnames: - - ImagePromotionConditionReasonWaitingForArtifacts - - ImagePromotionConditionReasonPublishing - - ImagePromotionConditionReasonCompleted - - ImagePromotionConditionReasonFailed - - ImagePromotionConditionReasonBuildFailed - - ImagePromotionConditionReasonBuildCanceled - - ImagePromotionConditionReasonAmendmentFailed - ImagePromotionTargetType: - type: string - description: Discriminator for the promotion target type. - enum: - - NewCatalogItem - - ExistingCatalogItem - x-enum-varnames: - - ImagePromotionTargetTypeNewCatalogItem - - ImagePromotionTargetTypeExistingCatalogItem - ListMeta: - type: object - properties: - continue: - type: string - description: May be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. - remainingItemCount: - type: integer - description: The number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. - format: int64 - description: ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. - ObjectMeta: - type: object - properties: - creationTimestamp: - type: string - description: The time the object was created. - format: date-time - deletionTimestamp: - type: string - description: The time the object will be deleted. - format: date-time - name: - type: string - maxLength: 253 - description: The name of the object. - labels: - type: object - description: Map of string keys and values that can be used to organize and categorize (scope and select) objects. - additionalProperties: - type: string - maxLength: 63 - generation: - type: integer - description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. - format: int64 - owner: - type: string - description: A resource that owns this resource, in "kind/name" format. - annotations: - type: object - additionalProperties: - type: string - description: Properties set by the service. - resourceVersion: - type: string - description: An opaque string that identifies the server's internal version of an object. - description: ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. - ConditionStatus: - type: string - description: Status of the condition, one of True, False, Unknown. - enum: - - 'True' - - 'False' - - Unknown - x-enum-varnames: - - ConditionStatusTrue - - ConditionStatusFalse - - ConditionStatusUnknown - ConditionBase: - type: object - description: Base condition structure following Kubernetes API conventions. Use with allOf to add a specific type enum. - required: - - status - - lastTransitionTime - - reason - - message - properties: - status: - $ref: '#/components/schemas/ConditionStatus' - observedGeneration: - type: integer - format: int64 - description: The .metadata.generation that the condition was set based upon. - lastTransitionTime: - type: string - format: date-time - description: The last time the condition transitioned from one status to another. - message: - type: string - description: Human readable message indicating details about last transition. - reason: - type: string - description: A (brief) reason for the condition's last transition. - 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 diff --git a/api/core/v1alpha1/openapi.yaml b/api/core/v1alpha1/openapi.yaml index 34de767..c516ad1 100644 --- a/api/core/v1alpha1/openapi.yaml +++ b/api/core/v1alpha1/openapi.yaml @@ -1727,8 +1727,8 @@ components: SemVerRange: type: string x-go-type: string - description: 'Semver range constraint (e.g., >=1.0.0 <2.0.0). Space-separated terms, each with optional operator (>=, <=, >, <, =, ~, ^) followed by a version.' - pattern: '^[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*$' + description: 'Semver range constraint (e.g., >=1.0.0 <2.0.0 or 1.0.0 || 3.0.0). Each alternative is a space-separated list of terms, with optional operators (>=, <=, >, <, =, ~, ^) before each version.' + pattern: '^[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*( *\|\| *[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*)*$' example: ">=1.0.0 <2.0.0" # Catalog-specific schemas (shared types come from v1beta1 via external refs) Catalog: @@ -2030,6 +2030,10 @@ components: example: ">=1.0.0 <1.3.0" deprecation: $ref: '#/components/schemas/CatalogItemDeprecation' + deviceFeatures: + allOf: + - $ref: '#/components/schemas/DeviceFeatures' + description: 'Device feature requirements that a target device must satisfy for this version to be considered compatible.' required: - version - channels @@ -2169,6 +2173,35 @@ components: required: - message additionalProperties: false + DeviceFeatureBoolean: + type: string + description: 'Value of a boolean device feature requirement, expressed as the string "true" or "false".' + enum: + - "true" + - "false" + x-enum-varnames: + - DeviceFeatureBooleanTrue + - DeviceFeatureBooleanFalse + DeviceFeatures: + type: object + description: >- + Device feature requirements declared by a catalog item version. Each field names a + device feature that a target device must provide with a matching value for this + version to be considered compatible. + properties: + gpu.present: + allOf: + - $ref: '#/components/schemas/DeviceFeatureBoolean' + description: 'Whether the target device is required to have a GPU present.' + kvm.enabled: + allOf: + - $ref: '#/components/schemas/DeviceFeatureBoolean' + description: 'Whether the target device is required to have KVM enabled.' + os.mode: + allOf: + - $ref: '../v1beta1/openapi.yaml#/components/schemas/OsModeType' + description: 'The OS management mode the target device is required to run.' + additionalProperties: true Status: type: object properties: @@ -2297,9 +2330,14 @@ components: type: integer format: int64 description: Count of distinct CVEs with unknown or unscored severity. + VulnerabilitySource: + type: string + description: The vulnerability backend that produced the finding. + enum: [trustify, quay] + x-enum-varnames: [Trustify, Quay] Vulnerability: type: object - description: A single vulnerability (CVE) finding. Vulnerabilities are global CVE records from Trustify; they are not tenant-owned resources. Tenancy is determined by the device or fleet context through which they are queried. + description: A single vulnerability (CVE) finding. Vulnerabilities are global CVE records produced by the configured vulnerability scanner; they are not tenant-owned resources. Tenancy is determined by the device or fleet context through which they are queried. additionalProperties: false required: - apiVersion @@ -2339,6 +2377,8 @@ components: type: string format: date-time description: Advisory publish time when known. + source: + $ref: '#/components/schemas/VulnerabilitySource' image: type: string description: Image reference (name or URL) from the device context. @@ -2410,6 +2450,8 @@ components: type: string description: Severity of this CVE for this digest. enum: [Critical, High, Medium, Low, None, Unknown] + source: + $ref: '#/components/schemas/VulnerabilitySource' cvssScore: type: number format: float @@ -2664,4 +2706,4 @@ components: type: array description: Per-digest findings within this fleet or fleetless group. items: - $ref: '#/components/schemas/VulnerabilityGroupItem' \ No newline at end of file + $ref: '#/components/schemas/VulnerabilityGroupItem' diff --git a/api/core/v1beta1/openapi.yaml b/api/core/v1beta1/openapi.yaml index 36a9fd1..dfbb487 100644 --- a/api/core/v1beta1/openapi.yaml +++ b/api/core/v1beta1/openapi.yaml @@ -24,6 +24,8 @@ tags: description: Operations on Device resources. - name: deviceactions description: Operations for device actions. + - name: enrollmenthookpolicy + description: Operations on EnrollmentHookPolicy resources. - name: enrollmentrequest description: Operations on EnrollmentRequest resources. - name: event @@ -32,6 +34,8 @@ tags: description: Operations on Fleet resources. - name: label description: Operations for retrieving labels across different resources. + - name: labelsyncmapping + description: Operations on LabelSyncMapping resources. - name: organization description: Operations for retrieving Organization resources. - name: repository @@ -1852,6 +1856,82 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /devices/{name}/enrollmenthooks/override: + x-resource: devices/enrollmenthooks/override + post: + tags: + - device + description: > + Manually override a failed enrollment hook condition. Only admin and operator roles + may perform this action. Sets the EnrollmentHooks condition to True with reason + ManualOverride, clearing the Failed state and unblocking fleet match and rendered GET. + Does NOT re-approve, rotate management cert, or re-run notify. + operationId: overrideDeviceEnrollmentHook + x-rbac: + resource: devices/enrollmenthooks/override + action: update + parameters: + - name: name + in: path + description: The name of the Device resource. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Device' + "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' + "500": + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "503": + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Status' /devices/{name}/applications/{appname}/actions/stop: x-resource: devices/applications/lifecycle post: @@ -2158,6 +2238,67 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + /devices/{name}/labelsyncprovenance: + x-resource: devices + get: + tags: + - device + description: >- + Get current LabelSyncMapping ownership for a Device. Return only keys + with current DeviceLabel ownership by active mappings, sorted by key. + An existing Device with no currently owned keys returns an empty items + array. Label values are not returned. + operationId: getDeviceLabelSyncProvenance + parameters: + - name: name + in: path + description: The name of the Device resource. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncProvenanceList' + "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' + "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' /devices/{name}/lastseen: x-resource: devices/lastseen get: @@ -3079,13 +3220,13 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /certificatesigningrequests: - x-resource: certificatesigningrequests + /enrollmenthookpolicies: + x-resource: enrollmenthookpolicies get: tags: - - certificatesigningrequest - description: List CertificateSigningRequest resources. - operationId: listCertificateSigningRequests + - enrollmenthookpolicy + description: List EnrollmentHookPolicy resources. + operationId: listEnrollmentHookPolicies parameters: - name: continue in: query @@ -3118,7 +3259,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequestList' + $ref: '#/components/schemas/EnrollmentHookPolicyList' "400": description: Bad Request content: @@ -3151,14 +3292,14 @@ paths: $ref: '#/components/schemas/Status' post: tags: - - certificatesigningrequest - description: Create a CertificateSigningRequest resource. - operationId: createCertificateSigningRequest + - enrollmenthookpolicy + description: Create an EnrollmentHookPolicy resource. + operationId: createEnrollmentHookPolicy requestBody: content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/EnrollmentHookPolicy' required: true responses: "201": @@ -3166,22 +3307,18 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/EnrollmentHookPolicy' links: - GetCertificateSigningRequest: - operationId: getCertificateSigningRequest - parameters: - name: '$response.body#/metadata/name' - DeleteCertificateSigningRequest: - operationId: deleteCertificateSigningRequest + GetEnrollmentHookPolicy: + operationId: getEnrollmentHookPolicy parameters: name: '$response.body#/metadata/name' - UpdateCertificateSigningRequestApproval: - operationId: updateCertificateSigningRequestApproval + DeleteEnrollmentHookPolicy: + operationId: deleteEnrollmentHookPolicy parameters: name: '$response.body#/metadata/name' - ReplaceCertificateSigningRequest: - operationId: replaceCertificateSigningRequest + ReplaceEnrollmentHookPolicy: + operationId: replaceEnrollmentHookPolicy parameters: name: '$response.body#/metadata/name' "400": @@ -3220,95 +3357,27 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /certificatesigningrequests/{name}: - x-resource: certificatesigningrequests - patch: - tags: - - certificatesigningrequest - description: Patch a CertificateSigningRequest resource. - operationId: patchCertificateSigningRequest - parameters: - - name: name - in: path - description: The name of the CertificateSigningRequest 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/CertificateSigningRequest' - "400": - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "404": - description: Not Found - 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' + /enrollmenthookpolicies/{name}: + x-resource: enrollmenthookpolicies get: tags: - - certificatesigningrequest - description: read the specified certificateSigningRequest - operationId: getCertificateSigningRequest + - enrollmenthookpolicy + description: Get an EnrollmentHookPolicy resource. + operationId: getEnrollmentHookPolicy parameters: - name: name in: path - description: The name of the CertificateSigningRequest resource to get. + description: The name of the EnrollmentHookPolicy resource to get. required: true schema: type: string - uniqueItems: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/EnrollmentHookPolicy' "400": description: Bad Request content: @@ -3347,13 +3416,13 @@ paths: $ref: '#/components/schemas/Status' put: tags: - - certificatesigningrequest - description: replace the specified CertificateSigningRequest - operationId: replaceCertificateSigningRequest + - enrollmenthookpolicy + description: Update an EnrollmentHookPolicy resource. + operationId: replaceEnrollmentHookPolicy parameters: - name: name in: path - description: The name of the CertificateSigningRequest resource to update. + description: The name of the EnrollmentHookPolicy resource to update. required: true schema: type: string @@ -3361,7 +3430,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/EnrollmentHookPolicy' required: true responses: "200": @@ -3369,13 +3438,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/EnrollmentHookPolicy' "201": description: Created content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/EnrollmentHookPolicy' "400": description: Bad Request content: @@ -3420,13 +3489,13 @@ paths: $ref: '#/components/schemas/Status' delete: tags: - - certificatesigningrequest - description: delete a Certificate Signing Request - operationId: deleteCertificateSigningRequest + - enrollmenthookpolicy + description: Delete an EnrollmentHookPolicy resource. + operationId: deleteEnrollmentHookPolicy parameters: - name: name in: path - description: The name of the CertificateSigningRequest resource to delete. + description: The name of the EnrollmentHookPolicy resource to delete. required: true schema: type: string @@ -3473,25 +3542,23 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /certificatesigningrequests/{name}/approval: - x-resource: certificatesigningrequests/approval - put: + patch: tags: - - certificatesigningrequest - description: Approve or deny a CertificateSigningRequest. - operationId: updateCertificateSigningRequestApproval + - enrollmenthookpolicy + description: Patch an EnrollmentHookPolicy resource. + operationId: patchEnrollmentHookPolicy parameters: - name: name in: path - description: The name of the CertificateSigningRequest to approve or deny. + description: The name of the EnrollmentHookPolicy resource to patch. required: true schema: type: string requestBody: content: - application/json: + application/json-patch+json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/PatchRequest' required: true responses: "200": @@ -3499,7 +3566,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' + $ref: '#/components/schemas/EnrollmentHookPolicy' "400": description: Bad Request content: @@ -3542,13 +3609,13 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /fleets: - x-resource: fleets + /certificatesigningrequests: + x-resource: certificatesigningrequests get: tags: - - fleet - description: List Fleet resources. - operationId: listFleets + - certificatesigningrequest + description: List CertificateSigningRequest resources. + operationId: listCertificateSigningRequests parameters: - name: continue in: query @@ -3575,19 +3642,13 @@ paths: format: int32 minimum: 0 maximum: 1000 - - name: addDevicesSummary - in: query - description: Include a summary of the devices in the fleet. - required: false - schema: - type: boolean responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/FleetList' + $ref: '#/components/schemas/CertificateSigningRequestList' "400": description: Bad Request content: @@ -3620,14 +3681,14 @@ paths: $ref: '#/components/schemas/Status' post: tags: - - fleet - description: Create a Fleet resource. - operationId: createFleet + - certificatesigningrequest + description: Create a CertificateSigningRequest resource. + operationId: createCertificateSigningRequest requestBody: content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/CertificateSigningRequest' required: true responses: "201": @@ -3635,30 +3696,22 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/CertificateSigningRequest' links: - GetFleet: - operationId: getFleet - parameters: - name: '$response.body#/metadata/name' - DeleteFleet: - operationId: deleteFleet + GetCertificateSigningRequest: + operationId: getCertificateSigningRequest parameters: name: '$response.body#/metadata/name' - ListTemplateVersions: - operationId: listTemplateVersions - parameters: - fleet: '$response.body#/metadata/name' - ReplaceFleet: - operationId: replaceFleet + DeleteCertificateSigningRequest: + operationId: deleteCertificateSigningRequest parameters: name: '$response.body#/metadata/name' - GetFleetStatus: - operationId: getFleetStatus + UpdateCertificateSigningRequestApproval: + operationId: updateCertificateSigningRequestApproval parameters: name: '$response.body#/metadata/name' - ReplaceFleetStatus: - operationId: replaceFleetStatus + ReplaceCertificateSigningRequest: + operationId: replaceCertificateSigningRequest parameters: name: '$response.body#/metadata/name' "400": @@ -3697,33 +3750,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /fleets/{name}: - x-resource: fleets - get: + /certificatesigningrequests/{name}: + x-resource: certificatesigningrequests + patch: tags: - - fleet - description: Get a Fleet resource. - operationId: getFleet + - certificatesigningrequest + description: Patch a CertificateSigningRequest resource. + operationId: patchCertificateSigningRequest parameters: - name: name in: path - description: The name of the Fleet resource to get. + description: The name of the CertificateSigningRequest resource to patch. required: true schema: type: string - - name: addDevicesSummary - in: query - description: Include a summary of the devices in the fleet. - required: false - schema: - type: boolean + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/CertificateSigningRequest' "400": description: Bad Request content: @@ -3736,14 +3789,20 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + "404": + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "403": description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Status' - "404": - description: Not Found + "409": + description: Conflict content: application/json: schema: @@ -3760,37 +3819,26 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - put: + get: tags: - - fleet - description: Update a Fleet resource. - operationId: replaceFleet + - certificatesigningrequest + description: read the specified certificateSigningRequest + operationId: getCertificateSigningRequest parameters: - name: name in: path - description: The name of the Fleet resource to update. + description: The name of the CertificateSigningRequest resource to get. required: true schema: type: string - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' - required: true + uniqueItems: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/Fleet' - "201": - description: Created - content: - application/json: - schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/CertificateSigningRequest' "400": description: Bad Request content: @@ -3803,20 +3851,14 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - "404": - description: Not Found - content: - application/json: - schema: - $ref: '#/components/schemas/Status' "403": description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Status' - "409": - description: Conflict + "404": + description: Not Found content: application/json: schema: @@ -3833,23 +3875,23 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - patch: + put: tags: - - fleet - description: Patch a Fleet resource. - operationId: patchFleet + - certificatesigningrequest + description: replace the specified CertificateSigningRequest + operationId: replaceCertificateSigningRequest parameters: - name: name in: path - description: The name of the Fleet resource to patch. + description: The name of the CertificateSigningRequest resource to update. required: true schema: type: string requestBody: content: - application/json-patch+json: + application/json: schema: - $ref: '#/components/schemas/PatchRequest' + $ref: '#/components/schemas/CertificateSigningRequest' required: true responses: "200": @@ -3857,7 +3899,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/CertificateSigningRequest' + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/CertificateSigningRequest' "400": description: Bad Request content: @@ -3902,13 +3950,13 @@ paths: $ref: '#/components/schemas/Status' delete: tags: - - fleet - description: Delete a Fleet resource. - operationId: deleteFleet + - certificatesigningrequest + description: delete a Certificate Signing Request + operationId: deleteCertificateSigningRequest parameters: - name: name in: path - description: The name of the Fleet resource to delete. + description: The name of the CertificateSigningRequest resource to delete. required: true schema: type: string @@ -3955,27 +4003,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /fleets/{name}/status: - x-resource: fleets/status - get: + /certificatesigningrequests/{name}/approval: + x-resource: certificatesigningrequests/approval + put: tags: - - fleet - description: read status of the specified Fleet - operationId: getFleetStatus + - certificatesigningrequest + description: Approve or deny a CertificateSigningRequest. + operationId: updateCertificateSigningRequestApproval parameters: - name: name in: path - description: The name of the Fleet resource to get. + description: The name of the CertificateSigningRequest to approve or deny. required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CertificateSigningRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/CertificateSigningRequest' "400": description: Bad Request content: @@ -4000,6 +4054,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' + "409": + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "429": description: Too Many Requests content: @@ -4012,31 +4072,52 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - patch: + /fleets: + x-resource: fleets + get: tags: - fleet - description: Patch the status of a Fleet resource. - operationId: patchFleetStatus + description: List Fleet resources. + operationId: listFleets parameters: - - name: name - in: path - description: The name of the Fleet resource to patch. - required: true + - 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 - requestBody: - content: - application/json-patch+json: - schema: - $ref: '#/components/schemas/PatchRequest' - required: true + - name: labelSelector + in: query + description: A selector to restrict the list of returned objects by their labels. Defaults to everything. + schema: + type: string + - 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 + minimum: 0 + maximum: 1000 + - name: addDevicesSummary + in: query + description: Include a summary of the devices in the fleet. + required: false + schema: + type: boolean responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/Fleet' + $ref: '#/components/schemas/FleetList' "400": description: Bad Request content: @@ -4055,12 +4136,6 @@ paths: 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: @@ -4073,18 +4148,11 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - put: + post: tags: - fleet - description: replace status of the specified Fleet - operationId: replaceFleetStatus - parameters: - - name: name - in: path - description: The name of the Fleet resource to update. - required: true - schema: - type: string + description: Create a Fleet resource. + operationId: createFleet requestBody: content: application/json: @@ -4092,32 +4160,57 @@ paths: $ref: '#/components/schemas/Fleet' required: true responses: - "200": - description: OK + "201": + description: Created content: application/json: schema: $ref: '#/components/schemas/Fleet' - "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: + links: + GetFleet: + operationId: getFleet + parameters: + name: '$response.body#/metadata/name' + DeleteFleet: + operationId: deleteFleet + parameters: + name: '$response.body#/metadata/name' + ListTemplateVersions: + operationId: listTemplateVersions + parameters: + fleet: '$response.body#/metadata/name' + ReplaceFleet: + operationId: replaceFleet + parameters: + name: '$response.body#/metadata/name' + GetFleetStatus: + operationId: getFleetStatus + parameters: + name: '$response.body#/metadata/name' + ReplaceFleetStatus: + operationId: replaceFleetStatus + parameters: + name: '$response.body#/metadata/name' + "400": + description: Bad Request + content: application/json: schema: $ref: '#/components/schemas/Status' - "404": - description: Not Found + "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: @@ -4134,36 +4227,26 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /fleets/{name}/applications/{appname}/actions/stop: - x-resource: fleets/applications/lifecycle - post: + /fleets/{name}: + x-resource: fleets + get: tags: - fleet - description: > - Stop an application across every device currently owned by this fleet. Sets a - fleet-level lifecycle default (independent of the application's declarative spec) - that is applied on top of the rendered application spec of each member device at - render time, and is automatically inherited by devices that join the fleet later. If a - specific device also has its own override for this application (see - /devices/{name}/applications/{appname}/actions/stop or .../start), whichever of the two - actions was issued most recently takes effect for that device. - operationId: stopFleetApplication - x-rbac: - resource: fleets/applications/lifecycle - action: update + description: Get a Fleet resource. + operationId: getFleet parameters: - name: name in: path - description: The name of the Fleet resource. + description: The name of the Fleet resource to get. required: true schema: type: string - - name: appname - in: path - description: The name of the application, as defined in the fleet's device template. - required: true + - name: addDevicesSummary + in: query + description: Include a summary of the devices in the fleet. + required: false schema: - type: string + type: boolean responses: "200": description: OK @@ -4195,12 +4278,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - "409": - description: Conflict - content: - application/json: - schema: - $ref: '#/components/schemas/Status' "429": description: Too Many Requests content: @@ -4213,36 +4290,24 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /fleets/{name}/applications/{appname}/actions/start: - x-resource: fleets/applications/lifecycle - post: + put: tags: - fleet - description: > - Start an application across every device currently owned by this fleet. Sets a - fleet-level lifecycle default (independent of the application's declarative spec) - that is applied on top of the rendered application spec of each member device at - render time, and is automatically inherited by devices that join the fleet later. If a - specific device also has its own override for this application (see - /devices/{name}/applications/{appname}/actions/stop or .../start), whichever of the two - actions was issued most recently takes effect for that device. - operationId: startFleetApplication - x-rbac: - resource: fleets/applications/lifecycle - action: update + description: Update a Fleet resource. + operationId: replaceFleet parameters: - name: name in: path - description: The name of the Fleet resource. - required: true - schema: - type: string - - name: appname - in: path - description: The name of the application, as defined in the fleet's device template. + description: The name of the Fleet resource to update. required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Fleet' + required: true responses: "200": description: OK @@ -4250,6 +4315,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Fleet' + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/Fleet' "400": description: Bad Request content: @@ -4262,14 +4333,14 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - "403": - description: Forbidden + "404": + description: Not Found content: application/json: schema: $ref: '#/components/schemas/Status' - "404": - description: Not Found + "403": + description: Forbidden content: application/json: schema: @@ -4292,52 +4363,31 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /fleets/{fleet}/templateversions: - x-resource: fleets/templateversions - get: + patch: tags: - fleet - description: list template versions - operationId: listTemplateVersions + description: Patch a Fleet resource. + operationId: patchFleet parameters: - - name: fleet + - name: name in: path - description: The owner of the template versions. + description: The name of the Fleet resource to patch. required: true schema: type: string - - 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 - - name: labelSelector - in: query - description: A selector to restrict the list of returned objects by their labels. Defaults to everything. - schema: - type: string - - 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 - minimum: 0 - maximum: 1000 + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchRequest' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/TemplateVersionList' + $ref: '#/components/schemas/Fleet' "400": description: Bad Request content: @@ -4356,6 +4406,18 @@ paths: 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: @@ -4368,23 +4430,15 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /fleets/{fleet}/templateversions/{name}: - x-resource: fleets/templateversions - get: + delete: tags: - fleet - description: read the specified template version - operationId: getTemplateVersion + description: Delete a Fleet resource. + operationId: deleteFleet parameters: - - name: fleet - in: path - description: The owner of the template version. - required: true - schema: - type: string - name: name in: path - description: The name of the template version. + description: The name of the Fleet resource to delete. required: true schema: type: string @@ -4394,7 +4448,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TemplateVersion' + $ref: '#/components/schemas/Status' "400": description: Bad Request content: @@ -4431,21 +4485,17 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: + /fleets/{name}/status: + x-resource: fleets/status + get: tags: - fleet - description: delete a template version - operationId: deleteTemplateVersion + description: read status of the specified Fleet + operationId: getFleetStatus parameters: - - name: fleet - in: path - description: The owner of the template version. - required: true - schema: - type: string - name: name in: path - description: The name of the template version. + description: The name of the Fleet resource to get. required: true schema: type: string @@ -4455,7 +4505,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Status' + $ref: '#/components/schemas/Fleet' "400": description: Bad Request content: @@ -4492,56 +4542,969 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /labels: - x-resource: labels - get: + patch: tags: - - label - description: | - Retrieves a distinct list of labels for the specified resource type. - operationId: listLabels + - fleet + description: Patch the status of a Fleet resource. + operationId: patchFleetStatus parameters: - - name: kind - in: query - description: The type of resource to retrieve labels from. + - name: name + in: path + description: The name of the Fleet resource to patch. required: true schema: type: string - enum: - - Device - - name: labelSelector - in: query - description: A filter to retrieve labels only from resources that match the given label selector. - schema: - type: string - - name: fieldSelector - in: query - description: A filter to retrieve labels only from resources that match the given field selector. + requestBody: + content: + application/json-patch+json: + schema: + $ref: '#/components/schemas/PatchRequest' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Fleet' + "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' + "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: + - fleet + description: replace status of the specified Fleet + operationId: replaceFleetStatus + parameters: + - name: name + in: path + description: The name of the Fleet resource to update. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Fleet' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Fleet' + "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' + "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' + /fleets/{name}/applications/{appname}/actions/stop: + x-resource: fleets/applications/lifecycle + post: + tags: + - fleet + description: > + Stop an application across every device currently owned by this fleet. Sets a + fleet-level lifecycle default (independent of the application's declarative spec) + that is applied on top of the rendered application spec of each member device at + render time, and is automatically inherited by devices that join the fleet later. If a + specific device also has its own override for this application (see + /devices/{name}/applications/{appname}/actions/stop or .../start), whichever of the two + actions was issued most recently takes effect for that device. + operationId: stopFleetApplication + x-rbac: + resource: fleets/applications/lifecycle + action: update + parameters: + - name: name + in: path + description: The name of the Fleet resource. + required: true + schema: + type: string + - name: appname + in: path + description: The name of the application, as defined in the fleet's device template. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Fleet' + "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' + /fleets/{name}/applications/{appname}/actions/start: + x-resource: fleets/applications/lifecycle + post: + tags: + - fleet + description: > + Start an application across every device currently owned by this fleet. Sets a + fleet-level lifecycle default (independent of the application's declarative spec) + that is applied on top of the rendered application spec of each member device at + render time, and is automatically inherited by devices that join the fleet later. If a + specific device also has its own override for this application (see + /devices/{name}/applications/{appname}/actions/stop or .../start), whichever of the two + actions was issued most recently takes effect for that device. + operationId: startFleetApplication + x-rbac: + resource: fleets/applications/lifecycle + action: update + parameters: + - name: name + in: path + description: The name of the Fleet resource. + required: true + schema: + type: string + - name: appname + in: path + description: The name of the application, as defined in the fleet's device template. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Fleet' + "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' + /fleets/{fleet}/templateversions: + x-resource: fleets/templateversions + get: + tags: + - fleet + description: list template versions + operationId: listTemplateVersions + parameters: + - name: fleet + in: path + description: The owner of the template versions. + required: true + schema: + type: string + - 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 + - name: labelSelector + in: query + description: A selector to restrict the list of returned objects by their labels. Defaults to everything. + schema: + type: string + - 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 + minimum: 0 + maximum: 1000 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateVersionList' + "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' + /fleets/{fleet}/templateversions/{name}: + x-resource: fleets/templateversions + get: + tags: + - fleet + description: read the specified template version + operationId: getTemplateVersion + parameters: + - name: fleet + in: path + description: The owner of the template version. + required: true + schema: + type: string + - name: name + in: path + description: The name of the template version. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TemplateVersion' + "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' + "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: + - fleet + description: delete a template version + operationId: deleteTemplateVersion + parameters: + - name: fleet + in: path + description: The owner of the template version. + required: true + schema: + type: string + - name: name + in: path + description: The name of the template version. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Status' + "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' + "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' + /labels: + x-resource: labels + get: + tags: + - label + description: | + Retrieves a distinct list of labels for the specified resource type. + operationId: listLabels + parameters: + - name: kind + in: query + description: The type of resource to retrieve labels from. + required: true + schema: + type: string + enum: + - Device + - name: labelSelector + in: query + description: A filter to retrieve labels only from resources that match the given label selector. + schema: + type: string + - name: fieldSelector + in: query + description: A filter to retrieve labels only from resources that match the given field selector. + schema: + type: string + - name: limit + in: query + description: The maximum number of distinct labels to return in the response. + required: false + schema: + type: integer + format: int32 + minimum: 0 + maximum: 1000 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LabelList' + examples: + labelsExample: + summary: Example response for labels + value: + - "environment=production" + - "region=us-east-1" + - "tier=backend" + "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' + /events: + x-resource: events + get: + tags: + - event + description: | + Retrieves a list of events. + operationId: listEvents + 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 + - name: order + in: query + description: Sort order for the results by timestamp. Defaults to 'desc' (newest first). + schema: + type: string + enum: + - asc + - desc + default: desc + - name: limit + in: query + description: The maximum number of events to return in the response. + schema: + type: integer + format: int32 + minimum: 0 + maximum: 1000 + - 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 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/EventList' + "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' + /organizations: + x-resource: organizations + get: + tags: + - organization + 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 + content: + application/json: + schema: + $ref: '#/components/schemas/OrganizationList' + "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' + /labelsyncprovenance: + x-resource: labelsyncmappings + get: + tags: + - labelsyncmapping + description: >- + Resolve exact label keys to their current owning LabelSyncMapping names + in the request organization. Return one item per supplied key in request + order, including repeated keys. Keys with no current mapping owner have + an empty owners array. Label values are not returned. + operationId: getLabelSyncProvenance + parameters: + - name: labelKeys + in: query + description: >- + Exact label keys to resolve. Supply between 1 and 50 repeated + labelKeys parameters. Repeated key values are preserved as repeated + response items in request order. + required: true + style: form + explode: true + schema: + type: array + minItems: 1 + maxItems: 50 + items: + type: string + minLength: 1 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncProvenanceList' + "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' + /labelsyncmappings: + x-resource: labelsyncmappings + get: + tags: + - labelsyncmapping + description: List LabelSyncMapping resources. + operationId: listLabelSyncMappings + parameters: + - name: continue + in: query + description: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. + required: false + schema: + type: string + - name: limit + in: query + description: The maximum number of results returned in the list response. + schema: + type: integer + format: int32 + minimum: 0 + maximum: 1000 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncMappingList' + "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' + "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: + - labelsyncmapping + description: Create a LabelSyncMapping resource. + operationId: createLabelSyncMapping + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncMapping' + required: true + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncMapping' + "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' + "422": + description: Unprocessable Content + 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' + /labelsyncmappings/{name}: + x-resource: labelsyncmappings + get: + tags: + - labelsyncmapping + description: Get a LabelSyncMapping resource. + operationId: getLabelSyncMapping + parameters: + - name: name + in: path + description: The name of the LabelSyncMapping resource to get. + required: true + schema: + type: string + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncMapping' + "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' + "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: + - labelsyncmapping + description: Update a LabelSyncMapping resource. + operationId: replaceLabelSyncMapping + parameters: + - name: name + in: path + description: The name of the LabelSyncMapping resource to update. + required: true schema: type: string - - name: limit - in: query - description: The maximum number of distinct labels to return in the response. - required: false - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncMapping' + required: true responses: "200": description: OK content: application/json: schema: - $ref: '#/components/schemas/LabelList' - examples: - labelsExample: - summary: Example response for labels - value: - - "environment=production" - - "region=us-east-1" - - "tier=backend" + $ref: '#/components/schemas/LabelSyncMapping' + "201": + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/LabelSyncMapping' "400": description: Bad Request content: @@ -4560,6 +5523,24 @@ paths: 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' + "422": + description: Unprocessable Content + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "429": description: Too Many Requests content: @@ -4572,41 +5553,16 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /events: - x-resource: events - get: + delete: tags: - - event - description: | - Retrieves a list of events. - operationId: listEvents + - labelsyncmapping + description: Delete a LabelSyncMapping resource. + operationId: deleteLabelSyncMapping 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 - - name: order - in: query - description: Sort order for the results by timestamp. Defaults to 'desc' (newest first). - schema: - type: string - enum: - - asc - - desc - default: desc - - name: limit - in: query - description: The maximum number of events to return in the response. - schema: - type: integer - format: int32 - minimum: 0 - maximum: 1000 - - 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 + - name: name + in: path + description: The name of the LabelSyncMapping resource to delete. + required: true schema: type: string responses: @@ -4615,7 +5571,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/EventList' + $ref: '#/components/schemas/Status' "400": description: Bad Request content: @@ -4634,6 +5590,12 @@ paths: 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: @@ -4646,27 +5608,31 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - /organizations: - x-resource: organizations - get: + patch: tags: - - organization - summary: List organizations - description: Retrieves a list of organizations. Only returns organizations that the user has access to. - operationId: listOrganizations + - labelsyncmapping + description: Patch a LabelSyncMapping resource. + operationId: patchLabelSyncMapping 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"). + - name: name + in: path + description: The name of the LabelSyncMapping 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/OrganizationList' + $ref: '#/components/schemas/LabelSyncMapping' "400": description: Bad Request content: @@ -4685,6 +5651,24 @@ paths: 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' + "422": + description: Unprocessable Content + content: + application/json: + schema: + $ref: '#/components/schemas/Status' "429": description: Too Many Requests content: @@ -5412,6 +6396,28 @@ components: skipServerVerification: type: boolean description: Skip remote server verification. + repository: + type: string + description: >- + Optional OCI repository path under spec.registry + (e.g. my-org/diffs). When set, this object is that repo + (`my-registry.com/my-org/diffs`), not only a registry. + Mutually exclusive with namespace. ImageBuild destination + imageName must equal this value. + namespace: + type: string + description: >- + Optional org/subpath under spec.registry (e.g. my-org). + Concrete names are spec.registry/namespace/. + Mutually exclusive with repository. Used by delta push + (`{registry}/{namespace}/{imageName}`). Invalid on an + ImageBuild or ImageExport destination Repository. + deltaStorageTarget: + type: boolean + description: >- + When true, generated deltas are pushed to this object + (at most one per org). Auth is the existing ociAuth / accessMode. + Placement follows repository / namespace / registry-only as above. baseImages: type: array description: Curated list of trusted base images available in this registry. When present, the Image Builder source picker surfaces these entries as selectable options. @@ -5826,8 +6832,6 @@ components: example: - "values-production.yaml" - "values-overrides.yml" - required: - - image VmApplication: type: object @@ -5838,6 +6842,7 @@ components: file named vm.yaml. allOf: - $ref: '#/components/schemas/ApplicationProviderBase' + - $ref: '#/components/schemas/ApplicationUser' - type: object properties: publishPorts: @@ -5899,6 +6904,17 @@ components: description: A list of application content. items: $ref: "#/components/schemas/ApplicationContent" + deltaImages: + type: array + readOnly: true + description: >- + Optional hints for nested OCI images referenced by this inline + application. Each entry identifies a target image reference and + digest and names its delta artifact. Read-only: generated by the + control plane and only present in the rendered application spec + delivered to the agent. + items: + $ref: '#/components/schemas/ImageDeltaHint' required: - inline ApplicationVolumeProviderSpec: @@ -6139,11 +7155,15 @@ components: - 'AfterUpdating' - 'BeforeRebooting' - 'AfterRebooting' + - 'BeforeEnrolling' + - 'AfterEnrolling' x-enum-varnames: - "DeviceLifecycleHookBeforeUpdating" - "DeviceLifecycleHookAfterUpdating" - "DeviceLifecycleHookBeforeRebooting" - "DeviceLifecycleHookAfterRebooting" + - "DeviceLifecycleHookBeforeEnrolling" + - "DeviceLifecycleHookAfterEnrolling" HookAction: allOf: - type: object @@ -6289,7 +7309,23 @@ components: - metadata - items DeviceOsSpec: - $ref: '#/components/schemas/ImageOrCatalogItemRefSpec' + description: Either a specific OCI image reference, or a reference to a catalog item version that can be resolved to an OCI image ref. + allOf: + - $ref: '#/components/schemas/ImageOrCatalogItemRefSpec' + - type: object + properties: + deltaImage: + type: string + readOnly: true + description: >- + Optional hint: a reference to a delta artifact the control + plane's generation records indicate may be applicable to reach + `image` from this device's current image. Absent does not imply + no delta exists — the device independently discovers candidate + delta artifacts (e.g. deltas published by a customer's own CI) + regardless of this field, and falls back to a full pull only if + none is usable. Read-only: generated by the control plane and + only present in the rendered device spec delivered to the agent. DeviceStatus: type: object description: DeviceStatus represents information about the status of a device. Status may trail the actual state of a device. @@ -6348,6 +7384,12 @@ components: $ref: '#/components/schemas/DependencySyncStatus' capabilities: $ref: '#/components/schemas/DeviceCapabilities' + deltaGeneration: + $ref: '#/components/schemas/DeltaGenerationStatus' + enrollmentHooks: + $ref: '#/components/schemas/DeviceEnrollmentHooksStatus' + systemInfoStatus: + $ref: '#/components/schemas/DeviceSystemInfoStatus' additionalProperties: false DeviceLastSeen: type: object @@ -6380,19 +7422,193 @@ components: agentVersion: type: string description: The Agent version. + bootcVersion: + type: string + description: >- + Version reported by `bootc --version`. Absent when bootc is not + installed or the version command fails. + ociDeltaVersion: + type: string + description: >- + Version reported by `oci-delta --version`, or from Go module build + information when that flag is unsupported. Absent when oci-delta is + not installed or its version cannot be determined. + deltaEligible: + type: boolean + description: >- + Whether this device can consume OCI deltas. True when the oci-delta + binary is present. False when it is not. Omitted when an older + agent does not report the field. customInfo: $ref: "#/components/schemas/CustomDeviceInfo" + gpus: + type: array + description: List of GPU devices discovered on the device. + items: + $ref: "#/components/schemas/DeviceGpu" + kvm: + $ref: "#/components/schemas/DeviceKvm" + osMode: + $ref: '#/components/schemas/OsModeType' additionalProperties: type: string description: | Optional system attributes exposed by the agent. Each key corresponds to a configurable internal capability. + DeviceGpu: + type: object + description: Information about a GPU device discovered on the device. + required: + - index + properties: + index: + type: integer + format: int32 + description: >- + Zero-based enumeration index of the GPU on the system, + assigned in PCI bus discovery order. + vendor: + type: string + description: The GPU vendor name (e.g., "NVIDIA", "AMD", "Intel"). + model: + type: string + description: The GPU model name (e.g., "RTX 4090", "GA10B"). + pciDeviceId: + type: string + description: >- + PCI device ID of the GPU, as read from the PCI configuration + register (e.g., "0x2717"). + pciAddress: + type: string + description: >- + PCI bus address in BDF notation (e.g., "0000:01:00.0"). + pciRevisionId: + type: string + description: >- + PCI revision ID of the GPU (e.g., "0xa1"). + pciVendorId: + type: string + description: >- + PCI vendor ID of the GPU (e.g., "0x10de" for NVIDIA). + memoryBytes: + type: integer + format: int64 + description: The amount of GPU memory in bytes. + arch: + type: string + description: >- + GPU microarchitecture generation name as defined in the + hardware map or platform lookup table (e.g., "Ada", + "Ampere", "Volta", "Maxwell" for NVIDIA; "RDNA3", "CDNA3" + for AMD). This is the vendor marketing name for the GPU + microarchitecture, not the host CPU ISA or a + compute-capability version string. + features: + type: array + description: >- + Vendor-specific GPU capability identifiers sourced from the + hardware map. Values are lowercase tokens describing + supported compute or display features (e.g., "cuda", "rocm", + "opencl", "sriov", "mig"). The vocabulary is extensible and + determined by the hardware map; no fixed enum is enforced. + items: + type: string + DeviceKvm: + type: object + description: KVM virtualization information reported by the device. + properties: + enabled: + type: boolean + description: >- + Whether KVM virtualization is active and available on the + device. CustomDeviceInfo: type: object description: User-defined information about the device. additionalProperties: type: string description: A user-defined custom property value. + DeviceSystemInfoStatus: + type: object + description: Status of the system information collection sources for a device. + required: + - summary + - statuses + properties: + summary: + $ref: '#/components/schemas/DeviceSystemInfoSummaryStatus' + statuses: + $ref: '#/components/schemas/DeviceSystemInfoStatuses' + additionalProperties: false + DeviceSystemInfoStatuses: + type: object + description: Collection statuses for built-in and custom information sources. + required: + - systemInfo + - customInfo + properties: + systemInfo: + type: object + description: Per-source collection status for built-in system information. + additionalProperties: + $ref: '#/components/schemas/SystemInfoSourceStatus' + customInfo: + type: object + description: Per-source collection status for custom device information. + additionalProperties: + $ref: '#/components/schemas/SystemInfoSourceStatus' + additionalProperties: false + DeviceSystemInfoSummaryStatus: + type: object + description: Aggregate summary of the system information collection health. + required: + - status + properties: + status: + $ref: '#/components/schemas/SystemInfoSummaryStatusType' + additionalProperties: false + SystemInfoSummaryStatusType: + type: string + description: Aggregate health of the system information collection. + enum: + - "Healthy" + - "Degraded" + - "Error" + - "Unknown" + x-enum-varnames: + - "SystemInfoSummaryStatusHealthy" + - "SystemInfoSummaryStatusDegraded" + - "SystemInfoSummaryStatusError" + - "SystemInfoSummaryStatusUnknown" + SystemInfoSourceStatus: + type: object + description: Collection status for a single system information source. + required: + - status + - lastTransitionTime + properties: + status: + $ref: '#/components/schemas/SystemInfoSourceStatusType' + lastTransitionTime: + type: string + format: date-time + description: The last time the collection status of this source changed. + message: + type: string + maxLength: 260 + description: Human readable message providing details about the source status. + additionalProperties: false + SystemInfoSourceStatusType: + type: string + description: Collection health of a single system information source. + enum: + - "Healthy" + - "Error" + - "Unknown" + x-enum-varnames: + - "SystemInfoSourceStatusHealthy" + - "SystemInfoSourceStatusError" + - "SystemInfoSourceStatusUnknown" SystemdUnitStatus: type: object required: @@ -6539,6 +7755,35 @@ components: description: Status of volumes used by this application. items: $ref: "#/components/schemas/ApplicationVolumeStatus" + lastDelta: + $ref: "#/components/schemas/DeviceDeltaApplyStatus" + imageDigests: + type: array + description: "Image references this application uses and the registry digest associated with each image. image is the ref from the current rendered spec (tag or digest). For a multi-platform index, digest is the platform-specific manifest selected by the runtime when available; if the runtime exposes only an opaque ID, an immutable image reference's digest may be reported. digest is omitted when no registry digest is known." + items: + $ref: "#/components/schemas/ApplicationImageDigest" + deltaSize: + type: string + description: >- + Expected total size of control-plane generated delta images for + this application update in IEC units (e.g. "245.3 MiB", "1 GiB"). + Computed as the sum of generated delta image sizes across the + application. Absent when no delta image was generated or any + generated delta image size is unknown. Full image sizes are not + included. + ApplicationImageDigest: + type: object + description: An image reference and its known registry image digest. + required: + - image + properties: + image: + type: string + description: Image reference as it appears in the rendered application spec. + digest: + type: string + description: Registry digest associated with this image. If the runtime identifies a platform-specific image, this may differ from the digest in the image reference. Omitted when unavailable. + x-go-type-skip-optional-pointer: true ApplicationVolumeStatus: type: object description: Status of a volume used by an application. @@ -6616,8 +7861,60 @@ components: description: Capabilities reported by the device agent. properties: osMode: - $ref: '#/components/schemas/OsModeType' + allOf: + - $ref: '#/components/schemas/OsModeType' + deprecated: true + x-deprecated-reason: >- + Deprecated since v1.4 and will be removed in a future release. Use + status.systemInfo.osMode instead. + description: >- + Deprecated since v1.4 and will be removed in a future release. + Use status.systemInfo.osMode instead. The service reads + status.systemInfo.osMode and only falls back to this field for + devices reported by older agents that do not populate systemInfo. additionalProperties: false + DeviceDeltaApplyStatus: + type: object + description: >- + Agent-reported result for delta apply attempts for this update target. + For an application with multiple image targets, the outcome is + aggregated across image targets. The lastDelta field is omitted until + the agent reports an outcome; server-side delta preparation is reported + separately. + additionalProperties: false + required: + - outcome + properties: + outcome: + $ref: "#/components/schemas/DeviceDeltaApplyOutcomeType" + fallbackReason: + type: string + description: >- + Set when one or more delta attempts failed and the agent attempted + a full image pull. For an application with multiple image targets, + this reports one representative failure reason. + DeviceDeltaApplyOutcomeType: + type: string + description: >- + Result reported by the agent for an update target. NotRequired means the existing target image satisfies the agent's image pull rules, so no delta or pull was needed. + NotUsed means the agent skipped delta + application without a delta-apply failure; it may still use a full image + pull. Applied means all delta work for the target succeeded. Fallback + means a delta attempt failed and the agent attempted a full image pull. + Partial means an application applied at least one delta while another + image target used a full image pull or skipped delta application. + enum: + - NotUsed + - NotRequired + - Applied + - Fallback + - Partial + x-enum-varnames: + - DeviceDeltaApplyOutcomeNotUsed + - DeviceDeltaApplyOutcomeNotRequired + - DeviceDeltaApplyOutcomeApplied + - DeviceDeltaApplyOutcomeFallback + - DeviceDeltaApplyOutcomePartial DeviceOsStatus: type: object description: Current status of the device OS. @@ -6631,6 +7928,14 @@ components: imageDigest: type: string description: The digest of the OS image (e.g. sha256:a0...). + deltaSize: + type: string + description: >- + Size of the control-plane generated OS delta image in IEC units + (e.g. "245.3 MiB", "1 GiB"). Absent when no delta image was + generated or its size is unknown. + lastDelta: + $ref: "#/components/schemas/DeviceDeltaApplyStatus" DeviceConfigStatus: type: object description: Current status of the device config. @@ -6965,6 +8270,8 @@ components: description: 'The rendered version of the device from desired.json (optional).' osMode: $ref: '#/components/schemas/OsModeType' + preEnrollment: + $ref: '#/components/schemas/PreEnrollmentResult' description: EnrollmentRequestSpec is a description of a EnrollmentRequest's target state. EnrollmentRequestStatus: type: object @@ -6983,6 +8290,43 @@ components: - conditions description: EnrollmentRequestStatus represents information about the status of a EnrollmentRequest. + PreEnrollmentActionResult: + type: object + description: Result of a single executed pre-enrollment hook action, agent-populated. + required: + - source + - exitCode + properties: + source: + type: string + description: >- + Path to the hook definition YAML that contained this action (for + example /etc/flightctl/hooks.d/beforeenrolling/10-network.yaml). + exitCode: + type: integer + description: Process exit code from the hook action. + output: + type: string + description: >- + Redacted stdout/stderr from this action. The total size across all + actions is capped at 4KiB. Secret patterns (PEM blocks, Bearer + prefixes, known token env names) are redacted before persistence. + + PreEnrollmentResult: + type: object + description: Result of pre-enrollment hook execution, agent-populated. + required: + - success + properties: + success: + type: boolean + description: Whether all pre-enrollment hooks completed with exit code 0. + actions: + type: array + description: Per-action results in execution order. + items: + $ref: '#/components/schemas/PreEnrollmentActionResult' + ResourceSync: type: object description: ResourceSync represents a reference to one or more files in a repository to sync to resource definitions. @@ -7203,6 +8547,22 @@ components: mapping: BatchSequence: '#/components/schemas/BatchSequence' + RolloutPolicyDeltaGeneration: + type: object + description: Controls OS delta generation for this fleet rollout. + properties: + generateDelta: + type: boolean + description: When false, skip control-plane OS delta generation for this fleet. Omitted means true. + maxWaitForDelta: + allOf: + - $ref: '#/components/schemas/Duration' + description: How long a prepare may wait before periodic resume. Omitted uses DeltaGeneration.maxWaitForDelta. Ignored when generateDelta is false. 0s still generates then resumes immediately. + deltaGenerationTimeout: + allOf: + - $ref: '#/components/schemas/Duration' + description: Context deadline for each generation job. Omitted uses DeltaGeneration.timeout. + RolloutPolicy: type: object properties: @@ -7214,6 +8574,8 @@ components: $ref: '#/components/schemas/Percentage' defaultUpdateTimeout: $ref: '#/components/schemas/Duration' + deltaGeneration: + $ref: '#/components/schemas/RolloutPolicyDeltaGeneration' description: RolloutPolicy is the rollout policy of the fleet. FleetSpec: @@ -7331,9 +8693,46 @@ components: $ref: '#/components/schemas/Condition' devicesSummary: $ref: '#/components/schemas/DevicesSummary' + deltaGeneration: + $ref: '#/components/schemas/DeltaGenerationStatus' required: - conditions additionalProperties: false + DeltaGenerationPhase: + type: string + description: Current step of control-plane delta generation for the in-flight pair. + enum: + - checkingExisting + - pullSource + - pullTarget + - createDelta + - push + x-enum-varnames: + - DeltaGenerationPhaseCheckingExisting + - DeltaGenerationPhasePullSource + - DeltaGenerationPhasePullTarget + - DeltaGenerationPhaseCreateDelta + - DeltaGenerationPhasePush + DeltaGenerationStatus: + type: object + description: Pair counts (completed/total) for a prepare in flight. Per-pair phase is one DeltaGenerationProgress event per step, not a percent heartbeat. Condition messages carry the same completed/total counts. + properties: + completed: + type: integer + format: int64 + description: Number of joined generation pairs that are already terminal. + total: + type: integer + format: int64 + description: Number of unique generation pairs in this prepare. + lastUpdated: + type: string + format: date-time + description: Time of the last completed/total write for this prepare. + required: + - completed + - total + additionalProperties: false DevicesSummary: type: object description: A summary of the devices in the fleet returned when fetching a single Fleet. @@ -7372,7 +8771,7 @@ components: $ref: '#/components/schemas/DevicesSummaryCapabilities' DevicesSummaryCapabilities: type: object - description: Breakdowns of devices by status.capabilities fields. + description: Breakdowns of devices by status.systemInfo fields, falling back to the deprecated status.capabilities fields when unavailable. properties: osMode: type: object @@ -7380,7 +8779,7 @@ components: additionalProperties: type: integer format: int64 - description: Counts by status.capabilities.osMode (e.g. image, package). The key "unknown" counts devices that have not reported the capability. + description: Counts by device OS mode (e.g. image, package), taken from status.systemInfo.osMode with fallback to the deprecated status.capabilities.osMode. The key "unknown" counts devices that have not reported an OS mode. additionalProperties: false TemplateVersion: type: object @@ -7488,30 +8887,35 @@ components: refresh_token: type: string nullable: true + x-omitempty: false description: Refresh token for refresh_token grant. x-oapi-codegen-extra-tags: form: refresh_token,omitempty code: type: string nullable: true + x-omitempty: false description: Authorization code for authorization_code grant. x-oapi-codegen-extra-tags: form: code,omitempty scope: type: string nullable: true + x-omitempty: false description: OAuth2 scope. x-oapi-codegen-extra-tags: form: scope,omitempty code_verifier: type: string nullable: true + x-omitempty: false description: PKCE code verifier. x-oapi-codegen-extra-tags: form: code_verifier,omitempty redirect_uri: type: string nullable: true + x-omitempty: false description: OAuth2 redirect URI (required for authorization_code grant if included in authorization request). x-oapi-codegen-extra-tags: form: redirect_uri,omitempty @@ -7713,10 +9117,10 @@ components: description: The last time the condition transitioned from one status to another. message: type: string - description: Human readable message indicating details about last transition. + description: A human-readable message describing the condition, including details or progress. Consumers should not parse this field. reason: type: string - description: A (brief) reason for the condition's last transition. + description: A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. Condition: description: Condition contains details for one aspect of the current state of this API Resource. allOf: @@ -7741,12 +9145,17 @@ components: - 'Accessible' # ResourceSync - 'ResourceParsed' # ResourceSync - 'Synced' # ResourceSync + - 'Ready' # LabelSyncMapping - 'Valid' # Fleet - 'RolloutInProgress' # Fleet - 'Updating' # Device - 'SpecValid' # Device (service condition) - 'MultipleOwners' # Device (service condition) + - 'LabelsSynced' # Device (service condition) - 'DeviceDecommissioning' # Device + - 'FleetDeltaPreparing' # Fleet + - 'DeviceDeltaPreparing' # Device + - 'EnrollmentHooks' # Device x-enum-varnames: - EnrollmentRequestApproved - EnrollmentRequestTPMVerified @@ -7758,12 +9167,17 @@ components: - ResourceSyncAccessible - ResourceSyncResourceParsed - ResourceSyncSynced + - LabelSyncMappingReady - FleetValid - FleetRolloutInProgress - DeviceUpdating - DeviceSpecValid - DeviceMultipleOwners + - DeviceLabelsSynced - DeviceDecommissioning + - FleetDeltaPreparing + - DeviceDeltaPreparing + - DeviceEnrollmentHooks ConditionStatus: type: string description: Status of the condition, one of True, False, Unknown. @@ -7969,6 +9383,13 @@ components: - EncryptionMigrationStarted - EncryptionMigrationCompleted - ApplicationLifecycleChanged + - PrepareDeltas + - DeltaGenerationProgress + - DeltaGenerationCompleted + - EnrollmentHookSucceeded + - EnrollmentHookFailed + - EnrollmentHookNotifyFailed + - EnrollmentHookManualOverride message: type: string description: A human-readable description of the status of this operation. @@ -8054,6 +9475,8 @@ components: DependencyChangeDetected: "#/components/schemas/DependencyChangeDetectedDetails" DependencySyncProbeFailed: "#/components/schemas/DependencySyncProbeFailedDetails" ApplicationLifecycleChanged: "#/components/schemas/ApplicationLifecycleChangedDetails" + PrepareDeltas: "#/components/schemas/PrepareDeltasDetails" + DeltaGenerationProgress: "#/components/schemas/DeltaGenerationProgressDetails" oneOf: - $ref: "#/components/schemas/ResourceUpdatedDetails" - $ref: "#/components/schemas/DeviceOwnershipChangedDetails" @@ -8073,6 +9496,8 @@ components: - $ref: "#/components/schemas/DependencyChangeDetectedDetails" - $ref: "#/components/schemas/DependencySyncProbeFailedDetails" - $ref: "#/components/schemas/ApplicationLifecycleChangedDetails" + - $ref: "#/components/schemas/PrepareDeltasDetails" + - $ref: "#/components/schemas/DeltaGenerationProgressDetails" DeviceVulnerabilityCveDetails: type: object description: Structured details for per-device CVE vulnerability events. @@ -8110,15 +9535,17 @@ components: type: array items: type: string - enum: [owner, labels, spec, spec.selector, spec.template] + enum: [owner, labels, spec, spec.selector, spec.template, status.conditions.EnrollmentHooks] description: List of fields that were updated in the resource. previousOwner: type: string nullable: true + x-omitempty: false description: The previous owner (if applicable). newOwner: type: string nullable: true + x-omitempty: false description: The new owner (if applicable). DeviceOwnershipChangedDetails: type: object @@ -8132,10 +9559,12 @@ components: previousOwner: type: string nullable: true + x-omitempty: false description: The previous owner fleet (null if none). newOwner: type: string nullable: true + x-omitempty: false description: The new owner fleet (null if removed). DeviceMultipleOwnersDetectedDetails: type: object @@ -8169,6 +9598,7 @@ components: assignedOwner: type: string nullable: true + x-omitempty: false description: The fleet assigned as owner (null if no owner). previousMatchingFleets: type: array @@ -8235,6 +9665,78 @@ components: errorCount: type: integer description: Number of errors encountered by this ResourceSync update. + PrepareDeltasDetails: + type: object + description: Structured details for PrepareDeltas events. + required: + - detailType + properties: + detailType: + type: string + enum: [PrepareDeltas] + x-enum-varnames: + - PrepareDeltas + description: The type of detail for discriminator purposes. + templateVersion: + type: string + description: Fleet only. The TemplateVersion this prepare is for. Required when involvedObject.kind is Fleet; omitted for Device. + generation: + type: integer + format: int64 + minimum: 1 + description: Device only. The desired spec generation this prepare is for. Required when involvedObject.kind is Device; omitted for Fleet. + resourceVersion: + type: string + description: The resource version of the involved Fleet or Device when this prepare event was created. Used to ignore stale prepare events. May be omitted for retained events created before this field was introduced. + DeltaGenerationProgressDetails: + type: object + description: Structured details for DeltaGenerationProgress events. One event when a pair enters a phase or becomes terminal, fanned out to each waiting Fleet or standalone Device. Not a percent heartbeat. + additionalProperties: false + required: + - detailType + - imageRepository + - sourceDigest + - targetDigest + - generationStatus + properties: + detailType: + type: string + enum: [DeltaGenerationProgress] + x-enum-varnames: + - DeltaGenerationProgress + description: The type of detail for discriminator purposes. + imageRepository: + type: string + description: Image repository (host/namespace/name) for this pair. + sourceDigest: + type: string + description: Current image digest. + targetDigest: + type: string + description: Target image digest. + generationStatus: + type: string + description: Generation row status for this pair. + enum: + - in_progress + - succeeded + - failed + - rejected + x-enum-varnames: + - DeltaGenerationProgressInProgress + - DeltaGenerationProgressSucceeded + - DeltaGenerationProgressFailed + - DeltaGenerationProgressRejected + phase: + $ref: '#/components/schemas/DeltaGenerationPhase' + templateVersion: + type: string + description: Fleet only. The TemplateVersion this prepare is for. + generation: + type: integer + format: int64 + minimum: 1 + description: Device only. The desired spec generation this prepare is for. FleetRolloutStartedDetails: type: object required: @@ -8540,6 +10042,17 @@ components: items: type: string description: List of OIDC scopes to request. + prompt: + type: string + nullable: true + pattern: '^(| *[!-~]+( +[!-~]+)* *)$' + description: >- + Space-separated, case-sensitive authorization prompt values, such as login, consent, + select_account, none, or provider-specific values. Omitted and null values are preserved + in AuthProvider resources and exposed as select_account in public authentication + configuration. An empty string instructs clients to omit the prompt parameter. Values must + be printable ASCII separated by spaces; none cannot accompany a different value. + Accepted values are preserved, including extra spaces and duplicates. organizationAssignment: $ref: '#/components/schemas/AuthOrganizationAssignment' usernameClaim: @@ -8595,6 +10108,17 @@ components: items: type: string description: List of OAuth2 scopes to request. + prompt: + type: string + nullable: true + pattern: '^(| *[!-~]+( +[!-~]+)* *)$' + description: >- + Space-separated, case-sensitive authorization prompt values, such as login, consent, + select_account, none, or provider-specific values. Omitted and null values are preserved + in AuthProvider resources and exposed as select_account in public authentication + configuration. An empty string instructs clients to omit the prompt parameter. Values must + be printable ASCII separated by spaces; none cannot accompany a different value. + Accepted values are preserved, including extra spaces and duplicates. organizationAssignment: $ref: '#/components/schemas/AuthOrganizationAssignment' usernameClaim: @@ -8945,6 +10469,274 @@ components: - metadata - items description: AuthProviderList is a list of auth providers. + EnrollmentHookPolicy: + type: object + properties: + apiVersion: + $ref: '#/components/schemas/ApiVersion' + kind: + type: string + description: 'Kind is a string value representing the REST resource this object represents.' + metadata: + $ref: '#/components/schemas/ObjectMeta' + spec: + $ref: '#/components/schemas/EnrollmentHookPolicySpec' + status: + $ref: '#/components/schemas/EnrollmentHookPolicyStatus' + required: + - apiVersion + - kind + - metadata + - spec + description: EnrollmentHookPolicy defines an org-scoped enrollment hook policy. + EnrollmentHookPolicySpec: + type: object + description: Specification for an enrollment hook policy. + properties: + afterEnrolling: + $ref: '#/components/schemas/EnrollmentHookStageSpec' + required: + - afterEnrolling + EnrollmentHookStageSpec: + type: object + description: Configuration for a stage of enrollment hooks. + properties: + failurePolicy: + $ref: '#/components/schemas/FailurePolicyType' + controlPlaneActions: + type: array + description: List of HTTP actions to execute during this enrollment stage. + items: + $ref: '#/components/schemas/EnrollmentHookHttpAction' + FailurePolicyType: + type: string + description: Determines behavior when a hook action fails. + enum: + - Block + - Continue + x-enum-varnames: + - FailurePolicyBlock + - FailurePolicyContinue + EnrollmentHookHttpAction: + type: object + description: An HTTP action to execute as part of an enrollment hook. + properties: + url: + type: string + description: The HTTPS URL to call. + minLength: 1 + timeout: + type: string + description: Timeout duration (e.g. "30s"). Defaults to 30s, max 5m. + retry: + $ref: '#/components/schemas/EnrollmentHookRetryPolicy' + auth: + $ref: '#/components/schemas/EnrollmentHookAuth' + required: + - url + EnrollmentHookRetryPolicy: + type: object + description: Retry policy for an enrollment hook action. + properties: + maxAttempts: + type: integer + description: Maximum number of retry attempts. Defaults to 5, max 20. + minimum: 1 + maximum: 20 + backoffPolicy: + type: string + description: Backoff strategy (e.g. "exponential"). Defaults to "exponential". + backoffDelay: + type: string + description: Initial backoff delay duration (e.g. "2s"). Defaults to "2s". + maxBackoff: + type: string + description: Maximum backoff duration (e.g. "2m"). Defaults to "2m". + deadline: + type: string + description: Overall deadline for all retry attempts (e.g. "10m"). Defaults to "10m". + EnrollmentHookAuth: + type: object + description: Authentication configuration for an enrollment hook action. + properties: + bearerToken: + type: string + description: Bearer token for HTTP authentication. + format: password + DeviceEnrollmentHooksStatus: + type: object + description: Enrollment hooks state for a device. + properties: + snapshot: + $ref: '#/components/schemas/EnrollmentHookSnapshot' + EnrollmentHookSnapshot: + type: object + description: Immutable non-secret copy of EnrollmentHookPolicy fields captured at approval time. + required: + - failurePolicy + properties: + failurePolicy: + $ref: '#/components/schemas/FailurePolicyType' + controlPlaneActions: + type: array + description: Non-secret copies of control-plane actions from the policy at approval time. + items: + $ref: '#/components/schemas/EnrollmentHookSnapshotAction' + EnrollmentHookSnapshotAction: + type: object + description: Non-secret copy of an enrollment hook HTTP action. Excludes auth/bearerToken. + required: + - index + - url + properties: + index: + type: integer + description: Original action index in the policy. + url: + type: string + description: The HTTPS URL to call. + timeout: + type: string + description: Timeout duration (e.g. "30s"). + retry: + $ref: '#/components/schemas/EnrollmentHookRetryPolicy' + EnrollmentHookPolicyStatus: + type: object + description: Status of an enrollment hook policy. + properties: + conditions: + type: array + description: Current conditions of the enrollment hook policy. + items: + $ref: '#/components/schemas/Condition' + EnrollmentHookPolicyList: + type: object + properties: + apiVersion: + $ref: '#/components/schemas/ApiVersion' + kind: + type: string + description: 'Kind is a string value representing the REST resource this object represents.' + metadata: + $ref: '#/components/schemas/ListMeta' + items: + type: array + description: List of enrollment hook policies. + items: + $ref: '#/components/schemas/EnrollmentHookPolicy' + required: + - apiVersion + - kind + - metadata + - items + description: EnrollmentHookPolicyList is a list of EnrollmentHookPolicy resources. + LabelSyncMapping: + type: object + properties: + apiVersion: + $ref: '#/components/schemas/ApiVersion' + kind: + type: string + enum: + - LabelSyncMapping + x-enum-varnames: + - LabelSyncMappingKindLabelSyncMapping + description: Kind is a string value representing this resource type. + metadata: + $ref: '#/components/schemas/ObjectMeta' + spec: + $ref: '#/components/schemas/LabelSyncMappingSpec' + status: + $ref: '#/components/schemas/LabelSyncMappingStatus' + required: + - apiVersion + - kind + - metadata + - spec + description: LabelSyncMapping defines an organization-scoped device label mapping. + LabelSyncMappingSpec: + type: object + description: Desired state for a label synchronization mapping. + properties: + resourceType: + type: string + enum: + - Device + x-enum-varnames: + - LabelSyncMappingSpecResourceTypeDevice + description: Immutable resource type evaluated by the mapping. + key: + type: string + nullable: true + maxLength: 317 + pattern: '^(?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*/)?[A-Za-z0-9](?:[-A-Za-z0-9_.]*[A-Za-z0-9])?$' + description: Complete destination label key for scalar mode. Omitted or null selects map mode; no prefix is added. + expression: + type: string + minLength: 1 + description: CEL expression evaluated for the selected resource type. + required: + - resourceType + - expression + LabelSyncMappingStatus: + type: object + description: Current propagation state for a label synchronization mapping. + properties: + conditions: + type: array + description: The Ready condition reports Pending, Degraded, or Success state. + items: + $ref: '#/components/schemas/Condition' + LabelSyncMappingList: + type: object + properties: + apiVersion: + $ref: '#/components/schemas/ApiVersion' + kind: + type: string + description: Kind is a string value representing the REST resource this object represents. + metadata: + $ref: '#/components/schemas/ListMeta' + items: + type: array + description: List of LabelSyncMapping resources. + items: + $ref: '#/components/schemas/LabelSyncMapping' + required: + - apiVersion + - kind + - metadata + - items + description: LabelSyncMappingList is a list of LabelSyncMapping resources. + LabelSyncProvenanceList: + type: object + description: Current LabelSyncMapping ownership grouped by exact label key. + properties: + items: + type: array + description: >- + For organization queries, one item per supplied key in request + order, including duplicates. For Device queries, one item per + currently owned key, sorted by key. + items: + $ref: '#/components/schemas/LabelSyncProvenanceItem' + required: + - items + LabelSyncProvenanceItem: + type: object + description: Current owning LabelSyncMapping names for one exact label key. + properties: + key: + type: string + description: Exact label key. + owners: + type: array + description: Names of current owning LabelSyncMapping resources. An empty array means the key has no current mapping owner. + items: + type: string + required: + - key + - owners PermissionList: type: object description: List of available permissions for a user. @@ -9033,8 +10825,50 @@ components: image: description: Reference to an OCI image or artifact with tag. type: string + deltaImage: + readOnly: true + description: >- + Optional hint: a reference to a delta artifact for the main + image. Set by the control plane when a successful delta + generation record exists for the current-to-target digest + transition. Read-only: generated by the control plane and only + present in the rendered application spec delivered to the agent. + type: string + deltaImages: + readOnly: true + description: >- + Optional hints for nested images within this application + (e.g. service images in a compose app, OCI volume images). + Each entry identifies a target image reference and digest and names + its delta artifact reference. Read-only: generated by the control + plane and only present in the rendered application spec delivered + to the agent. + type: array + items: + $ref: '#/components/schemas/ImageDeltaHint' required: - image + ImageDeltaHint: + type: object + description: >- + A control-plane-generated delta hint for a nested image within an + application. Present only in rendered application specs delivered to + the agent. + properties: + targetImage: + description: The target image reference this delta applies to. + type: string + targetDigest: + description: The content digest of the target image. + type: string + deltaImage: + description: Reference to the delta artifact for this nested image. + type: string + required: + - targetImage + - targetDigest + - deltaImage + additionalProperties: false CatalogItemRefSpec: type: object description: A reference to a catalog item, along with its configuration. @@ -9055,4 +10889,4 @@ components: - catalog - item - version - additionalProperties: false \ No newline at end of file + additionalProperties: false diff --git a/api/imagebuilder/v1alpha1/openapi.yaml b/api/imagebuilder/v1alpha1/openapi.yaml index 36a16a6..8a0d5cb 100644 --- a/api/imagebuilder/v1alpha1/openapi.yaml +++ b/api/imagebuilder/v1alpha1/openapi.yaml @@ -1543,7 +1543,7 @@ components: type: string enum: [early] description: The type of binding. - + LateBinding: type: object description: Late binding configuration - device binds at first boot. @@ -2140,4 +2140,3 @@ components: x-enum-varnames: - ImagePromotionTargetTypeNewCatalogItem - ImagePromotionTargetTypeExistingCatalogItem - diff --git a/docs/ApplicationImageDigest.md b/docs/ApplicationImageDigest.md new file mode 100644 index 0000000..c6fc964 --- /dev/null +++ b/docs/ApplicationImageDigest.md @@ -0,0 +1,29 @@ +# ApplicationImageDigest + +An image reference and its known registry image digest. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | **str** | Image reference as it appears in the rendered application spec. | +**digest** | **str** | Registry digest associated with this image. If the runtime identifies a platform-specific image, this may differ from the digest in the image reference. Omitted when unavailable. | [optional] + +## Example + +```python +from flightctl.models.application_image_digest import ApplicationImageDigest + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationImageDigest from a JSON string +application_image_digest_instance = ApplicationImageDigest.from_json(json) +# print the JSON string representation of the object +print(ApplicationImageDigest.to_json()) + +# convert the object into a dict +application_image_digest_dict = application_image_digest_instance.to_dict() +# create an instance of ApplicationImageDigest from a dict +application_image_digest_from_dict = ApplicationImageDigest.from_dict(application_image_digest_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/ApplicationProviderSpec.md b/docs/ApplicationProviderSpec.md index 91e958a..b31fc25 100644 --- a/docs/ApplicationProviderSpec.md +++ b/docs/ApplicationProviderSpec.md @@ -13,6 +13,8 @@ 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] **volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] **image** | **str** | Reference to an OCI image or artifact with tag. | +**delta_image** | **str** | Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] **catalog_item_ref** | [**CatalogItemRefSpec**](CatalogItemRefSpec.md) | | **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | **run_as** | **str** | The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified. | [optional] diff --git a/docs/AuthProviderSpec.md b/docs/AuthProviderSpec.md index a137999..44f3e8c 100644 --- a/docs/AuthProviderSpec.md +++ b/docs/AuthProviderSpec.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **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. | +**prompt** | **str** | Space-separated, case-sensitive authorization prompt values, such as login, consent, select_account, none, or provider-specific values. Omitted and null values are preserved in AuthProvider resources and exposed as select_account in public authentication configuration. An empty string instructs clients to omit the prompt parameter. Values must be printable ASCII separated by spaces; none cannot accompany a different value. Accepted values are preserved, including extra spaces and duplicates. | [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) | | diff --git a/docs/ComposeApplication.md b/docs/ComposeApplication.md index adfe168..900c320 100644 --- a/docs/ComposeApplication.md +++ b/docs/ComposeApplication.md @@ -13,6 +13,8 @@ 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] **volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] **image** | **str** | Reference to an OCI image or artifact with tag. | +**delta_image** | **str** | Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] **catalog_item_ref** | [**CatalogItemRefSpec**](CatalogItemRefSpec.md) | | **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | diff --git a/docs/Condition.md b/docs/Condition.md index 8620861..8e8ea71 100644 --- a/docs/Condition.md +++ b/docs/Condition.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | **type** | [**ConditionType**](ConditionType.md) | | ## Example diff --git a/docs/ConditionBase.md b/docs/ConditionBase.md index cc4d0d5..b355966 100644 --- a/docs/ConditionBase.md +++ b/docs/ConditionBase.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | ## Example diff --git a/docs/ConditionType.md b/docs/ConditionType.md index c8b86ef..f5d4853 100644 --- a/docs/ConditionType.md +++ b/docs/ConditionType.md @@ -24,6 +24,8 @@ Type of condition in CamelCase. * `ResourceSyncSynced` (value: `'Synced'`) +* `LabelSyncMappingReady` (value: `'Ready'`) + * `FleetValid` (value: `'Valid'`) * `FleetRolloutInProgress` (value: `'RolloutInProgress'`) @@ -34,8 +36,16 @@ Type of condition in CamelCase. * `DeviceMultipleOwners` (value: `'MultipleOwners'`) +* `DeviceLabelsSynced` (value: `'LabelsSynced'`) + * `DeviceDecommissioning` (value: `'DeviceDecommissioning'`) +* `FleetDeltaPreparing` (value: `'FleetDeltaPreparing'`) + +* `DeviceDeltaPreparing` (value: `'DeviceDeltaPreparing'`) + +* `DeviceEnrollmentHooks` (value: `'EnrollmentHooks'`) + [[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/ContainerApplication.md b/docs/ContainerApplication.md index 96719d4..a7a14b8 100644 --- a/docs/ContainerApplication.md +++ b/docs/ContainerApplication.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **run_as** | **str** | The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified. | [optional] **volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] **image** | **str** | Reference to an OCI image or artifact with tag. | +**delta_image** | **str** | Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry identifies a target image reference and digest and names its delta artifact reference. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] **catalog_item_ref** | [**CatalogItemRefSpec**](CatalogItemRefSpec.md) | | **ports** | **List[str]** | Port mappings. | [optional] **resources** | [**ApplicationResources**](ApplicationResources.md) | | [optional] diff --git a/docs/DeltaGenerationPhase.md b/docs/DeltaGenerationPhase.md new file mode 100644 index 0000000..6a67146 --- /dev/null +++ b/docs/DeltaGenerationPhase.md @@ -0,0 +1,17 @@ +# DeltaGenerationPhase + +Current step of control-plane delta generation for the in-flight pair. + +## Enum + +* `DeltaGenerationPhaseCheckingExisting` (value: `'checkingExisting'`) + +* `DeltaGenerationPhasePullSource` (value: `'pullSource'`) + +* `DeltaGenerationPhasePullTarget` (value: `'pullTarget'`) + +* `DeltaGenerationPhaseCreateDelta` (value: `'createDelta'`) + +* `DeltaGenerationPhasePush` (value: `'push'`) + +[[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/DeltaGenerationProgressDetails.md b/docs/DeltaGenerationProgressDetails.md new file mode 100644 index 0000000..bdc3a35 --- /dev/null +++ b/docs/DeltaGenerationProgressDetails.md @@ -0,0 +1,35 @@ +# DeltaGenerationProgressDetails + +Structured details for DeltaGenerationProgress events. One event when a pair enters a phase or becomes terminal, fanned out to each waiting Fleet or standalone Device. Not a percent heartbeat. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail_type** | **str** | The type of detail for discriminator purposes. | +**image_repository** | **str** | Image repository (host/namespace/name) for this pair. | +**source_digest** | **str** | Current image digest. | +**target_digest** | **str** | Target image digest. | +**generation_status** | **str** | Generation row status for this pair. | +**phase** | [**DeltaGenerationPhase**](DeltaGenerationPhase.md) | | [optional] +**template_version** | **str** | Fleet only. The TemplateVersion this prepare is for. | [optional] +**generation** | **int** | Device only. The desired spec generation this prepare is for. | [optional] + +## Example + +```python +from flightctl.models.delta_generation_progress_details import DeltaGenerationProgressDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of DeltaGenerationProgressDetails from a JSON string +delta_generation_progress_details_instance = DeltaGenerationProgressDetails.from_json(json) +# print the JSON string representation of the object +print(DeltaGenerationProgressDetails.to_json()) + +# convert the object into a dict +delta_generation_progress_details_dict = delta_generation_progress_details_instance.to_dict() +# create an instance of DeltaGenerationProgressDetails from a dict +delta_generation_progress_details_from_dict = DeltaGenerationProgressDetails.from_dict(delta_generation_progress_details_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/DeltaGenerationStatus.md b/docs/DeltaGenerationStatus.md new file mode 100644 index 0000000..4010179 --- /dev/null +++ b/docs/DeltaGenerationStatus.md @@ -0,0 +1,30 @@ +# DeltaGenerationStatus + +Pair counts (completed/total) for a prepare in flight. Per-pair phase is one DeltaGenerationProgress event per step, not a percent heartbeat. Condition messages carry the same completed/total counts. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completed** | **int** | Number of joined generation pairs that are already terminal. | +**total** | **int** | Number of unique generation pairs in this prepare. | +**last_updated** | **datetime** | Time of the last completed/total write for this prepare. | [optional] + +## Example + +```python +from flightctl.models.delta_generation_status import DeltaGenerationStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of DeltaGenerationStatus from a JSON string +delta_generation_status_instance = DeltaGenerationStatus.from_json(json) +# print the JSON string representation of the object +print(DeltaGenerationStatus.to_json()) + +# convert the object into a dict +delta_generation_status_dict = delta_generation_status_instance.to_dict() +# create an instance of DeltaGenerationStatus from a dict +delta_generation_status_from_dict = DeltaGenerationStatus.from_dict(delta_generation_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/DeviceApi.md b/docs/DeviceApi.md index b538885..b97b295 100644 --- a/docs/DeviceApi.md +++ b/docs/DeviceApi.md @@ -10,10 +10,12 @@ Method | HTTP request | Description [**get_device**](DeviceApi.md#get_device) | **GET** /devices/{name} | [**get_device_application_console**](DeviceApi.md#get_device_application_console) | **GET** /ws/v1/devices/{name}/applications/{appname}/console | [**get_device_console**](DeviceApi.md#get_device_console) | **GET** /ws/v1/devices/{name}/console | +[**get_device_label_sync_provenance**](DeviceApi.md#get_device_label_sync_provenance) | **GET** /devices/{name}/labelsyncprovenance | [**get_device_last_seen**](DeviceApi.md#get_device_last_seen) | **GET** /devices/{name}/lastseen | [**get_device_status**](DeviceApi.md#get_device_status) | **GET** /devices/{name}/status | [**get_rendered_device**](DeviceApi.md#get_rendered_device) | **GET** /devices/{name}/rendered | [**list_devices**](DeviceApi.md#list_devices) | **GET** /devices | +[**override_device_enrollment_hook**](DeviceApi.md#override_device_enrollment_hook) | **POST** /devices/{name}/enrollmenthooks/override | [**patch_device**](DeviceApi.md#patch_device) | **PATCH** /devices/{name} | [**patch_device_status**](DeviceApi.md#patch_device_status) | **PATCH** /devices/{name}/status | [**replace_device**](DeviceApi.md#replace_device) | **PUT** /devices/{name} | @@ -456,6 +458,77 @@ No authorization required [[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_device_label_sync_provenance** +> LabelSyncProvenanceList get_device_label_sync_provenance(name) + +Get current LabelSyncMapping ownership for a Device. Return only keys with current DeviceLabel ownership by active mappings, sorted by key. An existing Device with no currently owned keys returns an empty items array. Label values are not returned. + +### Example + + +```python +import flightctl +from flightctl.models.label_sync_provenance_list import LabelSyncProvenanceList +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.DeviceApi(api_client) + name = 'name_example' # str | The name of the Device resource. + + try: + api_response = api_instance.get_device_label_sync_provenance(name) + print("The response of DeviceApi->get_device_label_sync_provenance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DeviceApi->get_device_label_sync_provenance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the Device resource. | + +### Return type + +[**LabelSyncProvenanceList**](LabelSyncProvenanceList.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 | - | +**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_device_last_seen** > DeviceLastSeen get_device_last_seen(name) @@ -754,6 +827,80 @@ No authorization required [[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) +# **override_device_enrollment_hook** +> Device override_device_enrollment_hook(name) + +Manually override a failed enrollment hook condition. Only admin and operator roles may perform this action. Sets the EnrollmentHooks condition to True with reason ManualOverride, clearing the Failed state and unblocking fleet match and rendered GET. Does NOT re-approve, rotate management cert, or re-run notify. + + +### Example + + +```python +import flightctl +from flightctl.models.device import Device +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.DeviceApi(api_client) + name = 'name_example' # str | The name of the Device resource. + + try: + api_response = api_instance.override_device_enrollment_hook(name) + print("The response of DeviceApi->override_device_enrollment_hook:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DeviceApi->override_device_enrollment_hook: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the Device resource. | + +### Return type + +[**Device**](Device.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 | - | +**404** | Not Found | - | +**409** | Conflict | - | +**429** | Too Many Requests | - | +**500** | Internal Server Error | - | +**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_device** > Device patch_device(name, patch_request_inner) diff --git a/docs/DeviceApplicationStatus.md b/docs/DeviceApplicationStatus.md index 8e9a4ba..0aefba8 100644 --- a/docs/DeviceApplicationStatus.md +++ b/docs/DeviceApplicationStatus.md @@ -13,6 +13,9 @@ Name | Type | Description | Notes **app_type** | [**AppType**](AppType.md) | | **run_as** | **str** | The username of the system user this application is runing under. If blank, the application is run as the same user as the agent (generally root). | [optional] **volumes** | [**List[ApplicationVolumeStatus]**](ApplicationVolumeStatus.md) | Status of volumes used by this application. | [optional] +**last_delta** | [**DeviceDeltaApplyStatus**](DeviceDeltaApplyStatus.md) | | [optional] +**image_digests** | [**List[ApplicationImageDigest]**](ApplicationImageDigest.md) | Image references this application uses and the registry digest associated with each image. image is the ref from the current rendered spec (tag or digest). For a multi-platform index, digest is the platform-specific manifest selected by the runtime when available; if the runtime exposes only an opaque ID, an immutable image reference's digest may be reported. digest is omitted when no registry digest is known. | [optional] +**delta_size** | **str** | Expected total size of control-plane generated delta images for this application update in IEC units (e.g. \"245.3 MiB\", \"1 GiB\"). Computed as the sum of generated delta image sizes across the application. Absent when no delta image was generated or any generated delta image size is unknown. Full image sizes are not included. | [optional] ## Example diff --git a/docs/DeviceCapabilities.md b/docs/DeviceCapabilities.md index 62e5d8b..eda687f 100644 --- a/docs/DeviceCapabilities.md +++ b/docs/DeviceCapabilities.md @@ -6,7 +6,7 @@ Capabilities reported by the device agent. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**os_mode** | [**OsModeType**](OsModeType.md) | | [optional] +**os_mode** | [**OsModeType**](OsModeType.md) | Deprecated since v1.4 and will be removed in a future release. Use status.systemInfo.osMode instead. The service reads status.systemInfo.osMode and only falls back to this field for devices reported by older agents that do not populate systemInfo. | [optional] ## Example diff --git a/docs/DeviceDeltaApplyOutcomeType.md b/docs/DeviceDeltaApplyOutcomeType.md new file mode 100644 index 0000000..327998f --- /dev/null +++ b/docs/DeviceDeltaApplyOutcomeType.md @@ -0,0 +1,17 @@ +# DeviceDeltaApplyOutcomeType + +Result reported by the agent for an update target. NotRequired means the existing target image satisfies the agent's image pull rules, so no delta or pull was needed. NotUsed means the agent skipped delta application without a delta-apply failure; it may still use a full image pull. Applied means all delta work for the target succeeded. Fallback means a delta attempt failed and the agent attempted a full image pull. Partial means an application applied at least one delta while another image target used a full image pull or skipped delta application. + +## Enum + +* `DeviceDeltaApplyOutcomeNotUsed` (value: `'NotUsed'`) + +* `DeviceDeltaApplyOutcomeNotRequired` (value: `'NotRequired'`) + +* `DeviceDeltaApplyOutcomeApplied` (value: `'Applied'`) + +* `DeviceDeltaApplyOutcomeFallback` (value: `'Fallback'`) + +* `DeviceDeltaApplyOutcomePartial` (value: `'Partial'`) + +[[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/DeviceDeltaApplyStatus.md b/docs/DeviceDeltaApplyStatus.md new file mode 100644 index 0000000..012e2d8 --- /dev/null +++ b/docs/DeviceDeltaApplyStatus.md @@ -0,0 +1,29 @@ +# DeviceDeltaApplyStatus + +Agent-reported result for delta apply attempts for this update target. For an application with multiple image targets, the outcome is aggregated across image targets. The lastDelta field is omitted until the agent reports an outcome; server-side delta preparation is reported separately. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**outcome** | [**DeviceDeltaApplyOutcomeType**](DeviceDeltaApplyOutcomeType.md) | | +**fallback_reason** | **str** | Set when one or more delta attempts failed and the agent attempted a full image pull. For an application with multiple image targets, this reports one representative failure reason. | [optional] + +## Example + +```python +from flightctl.models.device_delta_apply_status import DeviceDeltaApplyStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDeltaApplyStatus from a JSON string +device_delta_apply_status_instance = DeviceDeltaApplyStatus.from_json(json) +# print the JSON string representation of the object +print(DeviceDeltaApplyStatus.to_json()) + +# convert the object into a dict +device_delta_apply_status_dict = device_delta_apply_status_instance.to_dict() +# create an instance of DeviceDeltaApplyStatus from a dict +device_delta_apply_status_from_dict = DeviceDeltaApplyStatus.from_dict(device_delta_apply_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/DeviceEnrollmentHooksStatus.md b/docs/DeviceEnrollmentHooksStatus.md new file mode 100644 index 0000000..d2c9a9a --- /dev/null +++ b/docs/DeviceEnrollmentHooksStatus.md @@ -0,0 +1,28 @@ +# DeviceEnrollmentHooksStatus + +Enrollment hooks state for a device. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**snapshot** | [**EnrollmentHookSnapshot**](EnrollmentHookSnapshot.md) | | [optional] + +## Example + +```python +from flightctl.models.device_enrollment_hooks_status import DeviceEnrollmentHooksStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceEnrollmentHooksStatus from a JSON string +device_enrollment_hooks_status_instance = DeviceEnrollmentHooksStatus.from_json(json) +# print the JSON string representation of the object +print(DeviceEnrollmentHooksStatus.to_json()) + +# convert the object into a dict +device_enrollment_hooks_status_dict = device_enrollment_hooks_status_instance.to_dict() +# create an instance of DeviceEnrollmentHooksStatus from a dict +device_enrollment_hooks_status_from_dict = DeviceEnrollmentHooksStatus.from_dict(device_enrollment_hooks_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/DeviceGpu.md b/docs/DeviceGpu.md new file mode 100644 index 0000000..9ecacf1 --- /dev/null +++ b/docs/DeviceGpu.md @@ -0,0 +1,37 @@ +# DeviceGpu + +Information about a GPU device discovered on the device. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | Zero-based enumeration index of the GPU on the system, assigned in PCI bus discovery order. | +**vendor** | **str** | The GPU vendor name (e.g., \"NVIDIA\", \"AMD\", \"Intel\"). | [optional] +**model** | **str** | The GPU model name (e.g., \"RTX 4090\", \"GA10B\"). | [optional] +**pci_device_id** | **str** | PCI device ID of the GPU, as read from the PCI configuration register (e.g., \"0x2717\"). | [optional] +**pci_address** | **str** | PCI bus address in BDF notation (e.g., \"0000:01:00.0\"). | [optional] +**pci_revision_id** | **str** | PCI revision ID of the GPU (e.g., \"0xa1\"). | [optional] +**pci_vendor_id** | **str** | PCI vendor ID of the GPU (e.g., \"0x10de\" for NVIDIA). | [optional] +**memory_bytes** | **int** | The amount of GPU memory in bytes. | [optional] +**arch** | **str** | GPU microarchitecture generation name as defined in the hardware map or platform lookup table (e.g., \"Ada\", \"Ampere\", \"Volta\", \"Maxwell\" for NVIDIA; \"RDNA3\", \"CDNA3\" for AMD). This is the vendor marketing name for the GPU microarchitecture, not the host CPU ISA or a compute-capability version string. | [optional] +**features** | **List[str]** | Vendor-specific GPU capability identifiers sourced from the hardware map. Values are lowercase tokens describing supported compute or display features (e.g., \"cuda\", \"rocm\", \"opencl\", \"sriov\", \"mig\"). The vocabulary is extensible and determined by the hardware map; no fixed enum is enforced. | [optional] + +## Example + +```python +from flightctl.models.device_gpu import DeviceGpu + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceGpu from a JSON string +device_gpu_instance = DeviceGpu.from_json(json) +# print the JSON string representation of the object +print(DeviceGpu.to_json()) + +# convert the object into a dict +device_gpu_dict = device_gpu_instance.to_dict() +# create an instance of DeviceGpu from a dict +device_gpu_from_dict = DeviceGpu.from_dict(device_gpu_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/DeviceKvm.md b/docs/DeviceKvm.md new file mode 100644 index 0000000..1c31643 --- /dev/null +++ b/docs/DeviceKvm.md @@ -0,0 +1,28 @@ +# DeviceKvm + +KVM virtualization information reported by the device. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enabled** | **bool** | Whether KVM virtualization is active and available on the device. | [optional] + +## Example + +```python +from flightctl.models.device_kvm import DeviceKvm + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceKvm from a JSON string +device_kvm_instance = DeviceKvm.from_json(json) +# print the JSON string representation of the object +print(DeviceKvm.to_json()) + +# convert the object into a dict +device_kvm_dict = device_kvm_instance.to_dict() +# create an instance of DeviceKvm from a dict +device_kvm_from_dict = DeviceKvm.from_dict(device_kvm_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/DeviceLifecycleHookType.md b/docs/DeviceLifecycleHookType.md index 68a2cd6..8673f37 100644 --- a/docs/DeviceLifecycleHookType.md +++ b/docs/DeviceLifecycleHookType.md @@ -11,6 +11,10 @@ * `DeviceLifecycleHookAfterRebooting` (value: `'AfterRebooting'`) +* `DeviceLifecycleHookBeforeEnrolling` (value: `'BeforeEnrolling'`) + +* `DeviceLifecycleHookAfterEnrolling` (value: `'AfterEnrolling'`) + [[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/DeviceOsSpec.md b/docs/DeviceOsSpec.md index 049c685..4761b9e 100644 --- a/docs/DeviceOsSpec.md +++ b/docs/DeviceOsSpec.md @@ -1,12 +1,14 @@ # DeviceOsSpec -DeviceOsSpec describes the target OS for the device. +Either a specific OCI image reference, or a reference to a catalog item version that can be resolved to an OCI image ref. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**image** | **str** | The target OS image name or URL. | +**image** | **str** | Reference to an OCI image or artifact with tag. | [optional] +**catalog_item_ref** | [**CatalogItemRefSpec**](CatalogItemRefSpec.md) | | [optional] +**delta_image** | **str** | Optional hint: a reference to a delta artifact the control plane's generation records indicate may be applicable to reach `image` from this device's current image. Absent does not imply no delta exists — the device independently discovers candidate delta artifacts (e.g. deltas published by a customer's own CI) regardless of this field, and falls back to a full pull only if none is usable. Read-only: generated by the control plane and only present in the rendered device spec delivered to the agent. | [optional] [readonly] ## Example diff --git a/docs/DeviceOsStatus.md b/docs/DeviceOsStatus.md index 4a57de3..dbb05ce 100644 --- a/docs/DeviceOsStatus.md +++ b/docs/DeviceOsStatus.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **image** | **str** | Version of the OS image. | **image_digest** | **str** | The digest of the OS image (e.g. sha256:a0...). | +**delta_size** | **str** | Size of the control-plane generated OS delta image in IEC units (e.g. \"245.3 MiB\", \"1 GiB\"). Absent when no delta image was generated or its size is unknown. | [optional] +**last_delta** | [**DeviceDeltaApplyStatus**](DeviceDeltaApplyStatus.md) | | [optional] ## Example diff --git a/docs/DeviceSpec.md b/docs/DeviceSpec.md index b21e800..c4aad86 100644 --- a/docs/DeviceSpec.md +++ b/docs/DeviceSpec.md @@ -7,7 +7,7 @@ DeviceSpec describes a device. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **update_policy** | [**DeviceUpdatePolicySpec**](DeviceUpdatePolicySpec.md) | | [optional] -**os** | [**ImageOrCatalogItemRefSpec**](ImageOrCatalogItemRefSpec.md) | | [optional] +**os** | [**DeviceOsSpec**](DeviceOsSpec.md) | | [optional] **config** | [**List[ConfigProviderSpec]**](ConfigProviderSpec.md) | List of config providers. | [optional] **applications** | [**List[ApplicationProviderSpec]**](ApplicationProviderSpec.md) | List of application providers. | [optional] **systemd** | [**DeviceSpecSystemd**](DeviceSpecSystemd.md) | | [optional] diff --git a/docs/DeviceStatus.md b/docs/DeviceStatus.md index c10b1b7..3371e03 100644 --- a/docs/DeviceStatus.md +++ b/docs/DeviceStatus.md @@ -21,6 +21,9 @@ Name | Type | Description | Notes **lifecycle** | [**DeviceLifecycleStatus**](DeviceLifecycleStatus.md) | | **dependency_sync** | [**DependencySyncStatus**](DependencySyncStatus.md) | | [optional] **capabilities** | [**DeviceCapabilities**](DeviceCapabilities.md) | | [optional] +**delta_generation** | [**DeltaGenerationStatus**](DeltaGenerationStatus.md) | | [optional] +**enrollment_hooks** | [**DeviceEnrollmentHooksStatus**](DeviceEnrollmentHooksStatus.md) | | [optional] +**system_info_status** | [**DeviceSystemInfoStatus**](DeviceSystemInfoStatus.md) | | [optional] ## Example diff --git a/docs/DeviceSystemInfo.md b/docs/DeviceSystemInfo.md index f94078a..cdb2eb6 100644 --- a/docs/DeviceSystemInfo.md +++ b/docs/DeviceSystemInfo.md @@ -10,7 +10,13 @@ Name | Type | Description | Notes **boot_id** | **str** | Boot ID reported by the device. | **operating_system** | **str** | The Operating System reported by the device. | **agent_version** | **str** | The Agent version. | +**bootc_version** | **str** | Version reported by `bootc --version`. Absent when bootc is not installed or the version command fails. | [optional] +**oci_delta_version** | **str** | Version reported by `oci-delta --version`, or from Go module build information when that flag is unsupported. Absent when oci-delta is not installed or its version cannot be determined. | [optional] +**delta_eligible** | **bool** | Whether this device can consume OCI deltas. True when the oci-delta binary is present. False when it is not. Omitted when an older agent does not report the field. | [optional] **custom_info** | **Dict[str, str]** | User-defined information about the device. | [optional] +**gpus** | [**List[DeviceGpu]**](DeviceGpu.md) | List of GPU devices discovered on the device. | [optional] +**kvm** | [**DeviceKvm**](DeviceKvm.md) | | [optional] +**os_mode** | [**OsModeType**](OsModeType.md) | | [optional] ## Example diff --git a/docs/DeviceSystemInfoStatus.md b/docs/DeviceSystemInfoStatus.md new file mode 100644 index 0000000..7b2fa30 --- /dev/null +++ b/docs/DeviceSystemInfoStatus.md @@ -0,0 +1,29 @@ +# DeviceSystemInfoStatus + +Status of the system information collection sources for a device. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**summary** | [**DeviceSystemInfoSummaryStatus**](DeviceSystemInfoSummaryStatus.md) | | +**statuses** | [**DeviceSystemInfoStatuses**](DeviceSystemInfoStatuses.md) | | + +## Example + +```python +from flightctl.models.device_system_info_status import DeviceSystemInfoStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceSystemInfoStatus from a JSON string +device_system_info_status_instance = DeviceSystemInfoStatus.from_json(json) +# print the JSON string representation of the object +print(DeviceSystemInfoStatus.to_json()) + +# convert the object into a dict +device_system_info_status_dict = device_system_info_status_instance.to_dict() +# create an instance of DeviceSystemInfoStatus from a dict +device_system_info_status_from_dict = DeviceSystemInfoStatus.from_dict(device_system_info_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/DeviceSystemInfoStatuses.md b/docs/DeviceSystemInfoStatuses.md new file mode 100644 index 0000000..dce14f6 --- /dev/null +++ b/docs/DeviceSystemInfoStatuses.md @@ -0,0 +1,29 @@ +# DeviceSystemInfoStatuses + +Collection statuses for built-in and custom information sources. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**system_info** | [**Dict[str, SystemInfoSourceStatus]**](SystemInfoSourceStatus.md) | Per-source collection status for built-in system information. | +**custom_info** | [**Dict[str, SystemInfoSourceStatus]**](SystemInfoSourceStatus.md) | Per-source collection status for custom device information. | + +## Example + +```python +from flightctl.models.device_system_info_statuses import DeviceSystemInfoStatuses + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceSystemInfoStatuses from a JSON string +device_system_info_statuses_instance = DeviceSystemInfoStatuses.from_json(json) +# print the JSON string representation of the object +print(DeviceSystemInfoStatuses.to_json()) + +# convert the object into a dict +device_system_info_statuses_dict = device_system_info_statuses_instance.to_dict() +# create an instance of DeviceSystemInfoStatuses from a dict +device_system_info_statuses_from_dict = DeviceSystemInfoStatuses.from_dict(device_system_info_statuses_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/DeviceSystemInfoSummaryStatus.md b/docs/DeviceSystemInfoSummaryStatus.md new file mode 100644 index 0000000..b362a40 --- /dev/null +++ b/docs/DeviceSystemInfoSummaryStatus.md @@ -0,0 +1,28 @@ +# DeviceSystemInfoSummaryStatus + +Aggregate summary of the system information collection health. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**SystemInfoSummaryStatusType**](SystemInfoSummaryStatusType.md) | | + +## Example + +```python +from flightctl.models.device_system_info_summary_status import DeviceSystemInfoSummaryStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceSystemInfoSummaryStatus from a JSON string +device_system_info_summary_status_instance = DeviceSystemInfoSummaryStatus.from_json(json) +# print the JSON string representation of the object +print(DeviceSystemInfoSummaryStatus.to_json()) + +# convert the object into a dict +device_system_info_summary_status_dict = device_system_info_summary_status_instance.to_dict() +# create an instance of DeviceSystemInfoSummaryStatus from a dict +device_system_info_summary_status_from_dict = DeviceSystemInfoSummaryStatus.from_dict(device_system_info_summary_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/DevicesSummaryCapabilities.md b/docs/DevicesSummaryCapabilities.md index c946450..f7f65d0 100644 --- a/docs/DevicesSummaryCapabilities.md +++ b/docs/DevicesSummaryCapabilities.md @@ -1,12 +1,12 @@ # DevicesSummaryCapabilities -Breakdowns of devices by status.capabilities fields. +Breakdowns of devices by status.systemInfo fields, falling back to the deprecated status.capabilities fields when unavailable. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**os_mode** | **Dict[str, int]** | Counts by status.capabilities.osMode (e.g. image, package). The key \"unknown\" counts devices that have not reported the capability. | [optional] +**os_mode** | **Dict[str, int]** | Counts by device OS mode (e.g. image, package), taken from status.systemInfo.osMode with fallback to the deprecated status.capabilities.osMode. The key \"unknown\" counts devices that have not reported an OS mode. | [optional] ## Example diff --git a/docs/EnrollmentHookAuth.md b/docs/EnrollmentHookAuth.md new file mode 100644 index 0000000..1158e38 --- /dev/null +++ b/docs/EnrollmentHookAuth.md @@ -0,0 +1,28 @@ +# EnrollmentHookAuth + +Authentication configuration for an enrollment hook action. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bearer_token** | **str** | Bearer token for HTTP authentication. | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_auth import EnrollmentHookAuth + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookAuth from a JSON string +enrollment_hook_auth_instance = EnrollmentHookAuth.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookAuth.to_json()) + +# convert the object into a dict +enrollment_hook_auth_dict = enrollment_hook_auth_instance.to_dict() +# create an instance of EnrollmentHookAuth from a dict +enrollment_hook_auth_from_dict = EnrollmentHookAuth.from_dict(enrollment_hook_auth_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/EnrollmentHookHttpAction.md b/docs/EnrollmentHookHttpAction.md new file mode 100644 index 0000000..160de27 --- /dev/null +++ b/docs/EnrollmentHookHttpAction.md @@ -0,0 +1,31 @@ +# EnrollmentHookHttpAction + +An HTTP action to execute as part of an enrollment hook. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | The HTTPS URL to call. | +**timeout** | **str** | Timeout duration (e.g. \"30s\"). Defaults to 30s, max 5m. | [optional] +**retry** | [**EnrollmentHookRetryPolicy**](EnrollmentHookRetryPolicy.md) | | [optional] +**auth** | [**EnrollmentHookAuth**](EnrollmentHookAuth.md) | | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_http_action import EnrollmentHookHttpAction + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookHttpAction from a JSON string +enrollment_hook_http_action_instance = EnrollmentHookHttpAction.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookHttpAction.to_json()) + +# convert the object into a dict +enrollment_hook_http_action_dict = enrollment_hook_http_action_instance.to_dict() +# create an instance of EnrollmentHookHttpAction from a dict +enrollment_hook_http_action_from_dict = EnrollmentHookHttpAction.from_dict(enrollment_hook_http_action_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/EnrollmentHookPolicy.md b/docs/EnrollmentHookPolicy.md new file mode 100644 index 0000000..20a8270 --- /dev/null +++ b/docs/EnrollmentHookPolicy.md @@ -0,0 +1,32 @@ +# EnrollmentHookPolicy + +EnrollmentHookPolicy defines an org-scoped enrollment hook policy. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | [**ApiVersion**](ApiVersion.md) | | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. | +**metadata** | [**ObjectMeta**](ObjectMeta.md) | | +**spec** | [**EnrollmentHookPolicySpec**](EnrollmentHookPolicySpec.md) | | +**status** | [**EnrollmentHookPolicyStatus**](EnrollmentHookPolicyStatus.md) | | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookPolicy from a JSON string +enrollment_hook_policy_instance = EnrollmentHookPolicy.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookPolicy.to_json()) + +# convert the object into a dict +enrollment_hook_policy_dict = enrollment_hook_policy_instance.to_dict() +# create an instance of EnrollmentHookPolicy from a dict +enrollment_hook_policy_from_dict = EnrollmentHookPolicy.from_dict(enrollment_hook_policy_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/EnrollmentHookPolicyList.md b/docs/EnrollmentHookPolicyList.md new file mode 100644 index 0000000..9b55b57 --- /dev/null +++ b/docs/EnrollmentHookPolicyList.md @@ -0,0 +1,31 @@ +# EnrollmentHookPolicyList + +EnrollmentHookPolicyList is a list of EnrollmentHookPolicy resources. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | [**ApiVersion**](ApiVersion.md) | | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. | +**metadata** | [**ListMeta**](ListMeta.md) | | +**items** | [**List[EnrollmentHookPolicy]**](EnrollmentHookPolicy.md) | List of enrollment hook policies. | + +## Example + +```python +from flightctl.models.enrollment_hook_policy_list import EnrollmentHookPolicyList + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookPolicyList from a JSON string +enrollment_hook_policy_list_instance = EnrollmentHookPolicyList.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookPolicyList.to_json()) + +# convert the object into a dict +enrollment_hook_policy_list_dict = enrollment_hook_policy_list_instance.to_dict() +# create an instance of EnrollmentHookPolicyList from a dict +enrollment_hook_policy_list_from_dict = EnrollmentHookPolicyList.from_dict(enrollment_hook_policy_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/EnrollmentHookPolicySpec.md b/docs/EnrollmentHookPolicySpec.md new file mode 100644 index 0000000..f8cfeed --- /dev/null +++ b/docs/EnrollmentHookPolicySpec.md @@ -0,0 +1,28 @@ +# EnrollmentHookPolicySpec + +Specification for an enrollment hook policy. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**after_enrolling** | [**EnrollmentHookStageSpec**](EnrollmentHookStageSpec.md) | | + +## Example + +```python +from flightctl.models.enrollment_hook_policy_spec import EnrollmentHookPolicySpec + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookPolicySpec from a JSON string +enrollment_hook_policy_spec_instance = EnrollmentHookPolicySpec.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookPolicySpec.to_json()) + +# convert the object into a dict +enrollment_hook_policy_spec_dict = enrollment_hook_policy_spec_instance.to_dict() +# create an instance of EnrollmentHookPolicySpec from a dict +enrollment_hook_policy_spec_from_dict = EnrollmentHookPolicySpec.from_dict(enrollment_hook_policy_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/EnrollmentHookPolicyStatus.md b/docs/EnrollmentHookPolicyStatus.md new file mode 100644 index 0000000..4671781 --- /dev/null +++ b/docs/EnrollmentHookPolicyStatus.md @@ -0,0 +1,28 @@ +# EnrollmentHookPolicyStatus + +Status of an enrollment hook policy. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conditions** | [**List[Condition]**](Condition.md) | Current conditions of the enrollment hook policy. | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_policy_status import EnrollmentHookPolicyStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookPolicyStatus from a JSON string +enrollment_hook_policy_status_instance = EnrollmentHookPolicyStatus.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookPolicyStatus.to_json()) + +# convert the object into a dict +enrollment_hook_policy_status_dict = enrollment_hook_policy_status_instance.to_dict() +# create an instance of EnrollmentHookPolicyStatus from a dict +enrollment_hook_policy_status_from_dict = EnrollmentHookPolicyStatus.from_dict(enrollment_hook_policy_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/EnrollmentHookRetryPolicy.md b/docs/EnrollmentHookRetryPolicy.md new file mode 100644 index 0000000..86e119c --- /dev/null +++ b/docs/EnrollmentHookRetryPolicy.md @@ -0,0 +1,32 @@ +# EnrollmentHookRetryPolicy + +Retry policy for an enrollment hook action. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**max_attempts** | **int** | Maximum number of retry attempts. Defaults to 5, max 20. | [optional] +**backoff_policy** | **str** | Backoff strategy (e.g. \"exponential\"). Defaults to \"exponential\". | [optional] +**backoff_delay** | **str** | Initial backoff delay duration (e.g. \"2s\"). Defaults to \"2s\". | [optional] +**max_backoff** | **str** | Maximum backoff duration (e.g. \"2m\"). Defaults to \"2m\". | [optional] +**deadline** | **str** | Overall deadline for all retry attempts (e.g. \"10m\"). Defaults to \"10m\". | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_retry_policy import EnrollmentHookRetryPolicy + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookRetryPolicy from a JSON string +enrollment_hook_retry_policy_instance = EnrollmentHookRetryPolicy.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookRetryPolicy.to_json()) + +# convert the object into a dict +enrollment_hook_retry_policy_dict = enrollment_hook_retry_policy_instance.to_dict() +# create an instance of EnrollmentHookRetryPolicy from a dict +enrollment_hook_retry_policy_from_dict = EnrollmentHookRetryPolicy.from_dict(enrollment_hook_retry_policy_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/EnrollmentHookSnapshot.md b/docs/EnrollmentHookSnapshot.md new file mode 100644 index 0000000..1a335bc --- /dev/null +++ b/docs/EnrollmentHookSnapshot.md @@ -0,0 +1,29 @@ +# EnrollmentHookSnapshot + +Immutable non-secret copy of EnrollmentHookPolicy fields captured at approval time. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**failure_policy** | [**FailurePolicyType**](FailurePolicyType.md) | | +**control_plane_actions** | [**List[EnrollmentHookSnapshotAction]**](EnrollmentHookSnapshotAction.md) | Non-secret copies of control-plane actions from the policy at approval time. | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_snapshot import EnrollmentHookSnapshot + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookSnapshot from a JSON string +enrollment_hook_snapshot_instance = EnrollmentHookSnapshot.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookSnapshot.to_json()) + +# convert the object into a dict +enrollment_hook_snapshot_dict = enrollment_hook_snapshot_instance.to_dict() +# create an instance of EnrollmentHookSnapshot from a dict +enrollment_hook_snapshot_from_dict = EnrollmentHookSnapshot.from_dict(enrollment_hook_snapshot_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/EnrollmentHookSnapshotAction.md b/docs/EnrollmentHookSnapshotAction.md new file mode 100644 index 0000000..c65275e --- /dev/null +++ b/docs/EnrollmentHookSnapshotAction.md @@ -0,0 +1,31 @@ +# EnrollmentHookSnapshotAction + +Non-secret copy of an enrollment hook HTTP action. Excludes auth/bearerToken. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **int** | Original action index in the policy. | +**url** | **str** | The HTTPS URL to call. | +**timeout** | **str** | Timeout duration (e.g. \"30s\"). | [optional] +**retry** | [**EnrollmentHookRetryPolicy**](EnrollmentHookRetryPolicy.md) | | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_snapshot_action import EnrollmentHookSnapshotAction + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookSnapshotAction from a JSON string +enrollment_hook_snapshot_action_instance = EnrollmentHookSnapshotAction.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookSnapshotAction.to_json()) + +# convert the object into a dict +enrollment_hook_snapshot_action_dict = enrollment_hook_snapshot_action_instance.to_dict() +# create an instance of EnrollmentHookSnapshotAction from a dict +enrollment_hook_snapshot_action_from_dict = EnrollmentHookSnapshotAction.from_dict(enrollment_hook_snapshot_action_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/EnrollmentHookStageSpec.md b/docs/EnrollmentHookStageSpec.md new file mode 100644 index 0000000..b1fd543 --- /dev/null +++ b/docs/EnrollmentHookStageSpec.md @@ -0,0 +1,29 @@ +# EnrollmentHookStageSpec + +Configuration for a stage of enrollment hooks. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**failure_policy** | [**FailurePolicyType**](FailurePolicyType.md) | | [optional] +**control_plane_actions** | [**List[EnrollmentHookHttpAction]**](EnrollmentHookHttpAction.md) | List of HTTP actions to execute during this enrollment stage. | [optional] + +## Example + +```python +from flightctl.models.enrollment_hook_stage_spec import EnrollmentHookStageSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of EnrollmentHookStageSpec from a JSON string +enrollment_hook_stage_spec_instance = EnrollmentHookStageSpec.from_json(json) +# print the JSON string representation of the object +print(EnrollmentHookStageSpec.to_json()) + +# convert the object into a dict +enrollment_hook_stage_spec_dict = enrollment_hook_stage_spec_instance.to_dict() +# create an instance of EnrollmentHookStageSpec from a dict +enrollment_hook_stage_spec_from_dict = EnrollmentHookStageSpec.from_dict(enrollment_hook_stage_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/EnrollmentRequestSpec.md b/docs/EnrollmentRequestSpec.md index 05489e5..5621c61 100644 --- a/docs/EnrollmentRequestSpec.md +++ b/docs/EnrollmentRequestSpec.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **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] **os_mode** | [**OsModeType**](OsModeType.md) | | [optional] +**pre_enrollment** | [**PreEnrollmentResult**](PreEnrollmentResult.md) | | [optional] ## Example diff --git a/docs/EnrollmenthookpolicyApi.md b/docs/EnrollmenthookpolicyApi.md new file mode 100644 index 0000000..eef0e01 --- /dev/null +++ b/docs/EnrollmenthookpolicyApi.md @@ -0,0 +1,452 @@ +# flightctl.EnrollmenthookpolicyApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_enrollment_hook_policy**](EnrollmenthookpolicyApi.md#create_enrollment_hook_policy) | **POST** /enrollmenthookpolicies | +[**delete_enrollment_hook_policy**](EnrollmenthookpolicyApi.md#delete_enrollment_hook_policy) | **DELETE** /enrollmenthookpolicies/{name} | +[**get_enrollment_hook_policy**](EnrollmenthookpolicyApi.md#get_enrollment_hook_policy) | **GET** /enrollmenthookpolicies/{name} | +[**list_enrollment_hook_policies**](EnrollmenthookpolicyApi.md#list_enrollment_hook_policies) | **GET** /enrollmenthookpolicies | +[**patch_enrollment_hook_policy**](EnrollmenthookpolicyApi.md#patch_enrollment_hook_policy) | **PATCH** /enrollmenthookpolicies/{name} | +[**replace_enrollment_hook_policy**](EnrollmenthookpolicyApi.md#replace_enrollment_hook_policy) | **PUT** /enrollmenthookpolicies/{name} | + + +# **create_enrollment_hook_policy** +> EnrollmentHookPolicy create_enrollment_hook_policy(enrollment_hook_policy) + +Create an EnrollmentHookPolicy resource. + +### Example + + +```python +import flightctl +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.EnrollmenthookpolicyApi(api_client) + enrollment_hook_policy = flightctl.EnrollmentHookPolicy() # EnrollmentHookPolicy | + + try: + api_response = api_instance.create_enrollment_hook_policy(enrollment_hook_policy) + print("The response of EnrollmenthookpolicyApi->create_enrollment_hook_policy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnrollmenthookpolicyApi->create_enrollment_hook_policy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enrollment_hook_policy** | [**EnrollmentHookPolicy**](EnrollmentHookPolicy.md)| | + +### Return type + +[**EnrollmentHookPolicy**](EnrollmentHookPolicy.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_enrollment_hook_policy** +> Status delete_enrollment_hook_policy(name) + +Delete an EnrollmentHookPolicy 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 /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.EnrollmenthookpolicyApi(api_client) + name = 'name_example' # str | The name of the EnrollmentHookPolicy resource to delete. + + try: + api_response = api_instance.delete_enrollment_hook_policy(name) + print("The response of EnrollmenthookpolicyApi->delete_enrollment_hook_policy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnrollmenthookpolicyApi->delete_enrollment_hook_policy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the EnrollmentHookPolicy 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 | - | +**400** | Bad Request | - | +**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_enrollment_hook_policy** +> EnrollmentHookPolicy get_enrollment_hook_policy(name) + +Get an EnrollmentHookPolicy resource. + +### Example + + +```python +import flightctl +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.EnrollmenthookpolicyApi(api_client) + name = 'name_example' # str | The name of the EnrollmentHookPolicy resource to get. + + try: + api_response = api_instance.get_enrollment_hook_policy(name) + print("The response of EnrollmenthookpolicyApi->get_enrollment_hook_policy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnrollmenthookpolicyApi->get_enrollment_hook_policy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the EnrollmentHookPolicy resource to get. | + +### Return type + +[**EnrollmentHookPolicy**](EnrollmentHookPolicy.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 | - | +**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_enrollment_hook_policies** +> EnrollmentHookPolicyList list_enrollment_hook_policies(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + +List EnrollmentHookPolicy resources. + +### Example + + +```python +import flightctl +from flightctl.models.enrollment_hook_policy_list import EnrollmentHookPolicyList +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.EnrollmenthookpolicyApi(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_enrollment_hook_policies(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of EnrollmenthookpolicyApi->list_enrollment_hook_policies:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnrollmenthookpolicyApi->list_enrollment_hook_policies: %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 + +[**EnrollmentHookPolicyList**](EnrollmentHookPolicyList.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_enrollment_hook_policy** +> EnrollmentHookPolicy patch_enrollment_hook_policy(name, patch_request_inner) + +Patch an EnrollmentHookPolicy resource. + +### Example + + +```python +import flightctl +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy +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 /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.EnrollmenthookpolicyApi(api_client) + name = 'name_example' # str | The name of the EnrollmentHookPolicy resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + + try: + api_response = api_instance.patch_enrollment_hook_policy(name, patch_request_inner) + print("The response of EnrollmenthookpolicyApi->patch_enrollment_hook_policy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnrollmenthookpolicyApi->patch_enrollment_hook_policy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the EnrollmentHookPolicy resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + +### Return type + +[**EnrollmentHookPolicy**](EnrollmentHookPolicy.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_enrollment_hook_policy** +> EnrollmentHookPolicy replace_enrollment_hook_policy(name, enrollment_hook_policy) + +Update an EnrollmentHookPolicy resource. + +### Example + + +```python +import flightctl +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.EnrollmenthookpolicyApi(api_client) + name = 'name_example' # str | The name of the EnrollmentHookPolicy resource to update. + enrollment_hook_policy = flightctl.EnrollmentHookPolicy() # EnrollmentHookPolicy | + + try: + api_response = api_instance.replace_enrollment_hook_policy(name, enrollment_hook_policy) + print("The response of EnrollmenthookpolicyApi->replace_enrollment_hook_policy:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnrollmenthookpolicyApi->replace_enrollment_hook_policy: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the EnrollmentHookPolicy resource to update. | + **enrollment_hook_policy** | [**EnrollmentHookPolicy**](EnrollmentHookPolicy.md)| | + +### Return type + +[**EnrollmentHookPolicy**](EnrollmentHookPolicy.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/EventDetails.md b/docs/EventDetails.md index 080ab47..632e202 100644 --- a/docs/EventDetails.md +++ b/docs/EventDetails.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **change_count** | **int** | Number of changes introduced by this ResourceSync update. | **error_count** | **int** | Number of errors encountered by this ResourceSync update. | **repository** | **str** | The name of the repository that was updated. | -**template_version** | **str** | The name of the TemplateVersion that the device is being selected to render. | +**template_version** | **str** | Fleet only. The TemplateVersion this prepare is for. | **rollout_strategy** | **str** | Rollout strategy type. | **batch** | **str** | The batch within the fleet rollout. | **success_percentage** | **int** | The success percentage of the batch. | @@ -38,6 +38,13 @@ Name | Type | Description | Notes **error** | **str** | The error message from the failed probe. | **app_name** | **str** | The name of the application whose device-level lifecycle override changed. | **action** | **str** | The lifecycle action that was requested. | +**generation** | **int** | Device only. The desired spec generation this prepare is for. | [optional] +**resource_version** | **str** | The resource version of the involved Fleet or Device when this prepare event was created. Used to ignore stale prepare events. May be omitted for retained events created before this field was introduced. | [optional] +**image_repository** | **str** | Image repository (host/namespace/name) for this pair. | +**source_digest** | **str** | Current image digest. | +**target_digest** | **str** | Target image digest. | +**generation_status** | **str** | Generation row status for this pair. | +**phase** | [**DeltaGenerationPhase**](DeltaGenerationPhase.md) | | [optional] ## Example diff --git a/docs/FailurePolicyType.md b/docs/FailurePolicyType.md new file mode 100644 index 0000000..2bb0834 --- /dev/null +++ b/docs/FailurePolicyType.md @@ -0,0 +1,11 @@ +# FailurePolicyType + +Determines behavior when a hook action fails. + +## Enum + +* `FailurePolicyBlock` (value: `'Block'`) + +* `FailurePolicyContinue` (value: `'Continue'`) + +[[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/FleetStatus.md b/docs/FleetStatus.md index 98afb31..e16c0d1 100644 --- a/docs/FleetStatus.md +++ b/docs/FleetStatus.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **rollout** | [**FleetRolloutStatus**](FleetRolloutStatus.md) | | [optional] **conditions** | [**List[Condition]**](Condition.md) | Current state of the fleet. | **devices_summary** | [**DevicesSummary**](DevicesSummary.md) | | [optional] +**delta_generation** | [**DeltaGenerationStatus**](DeltaGenerationStatus.md) | | [optional] ## Example diff --git a/docs/HelmApplication.md b/docs/HelmApplication.md index afc2074..8c0d170 100644 --- a/docs/HelmApplication.md +++ b/docs/HelmApplication.md @@ -11,6 +11,8 @@ Name | Type | Description | Notes **desired_state** | [**ApplicationDesiredState**](ApplicationDesiredState.md) | Desired lifecycle state for this application, as most recently set by the stop/start device APIs. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent. | [optional] [readonly] **restart_generation** | **int** | Counter incremented by the restart device API each time the application is restarted. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent. | [optional] [readonly] **image** | **str** | Reference to an OCI image or artifact with tag. | +**delta_image** | **str** | Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry identifies a target image reference and digest and names its delta artifact reference. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] **catalog_item_ref** | [**CatalogItemRefSpec**](CatalogItemRefSpec.md) | | **namespace** | **str** | The target namespace for the application deployment. | [optional] **values** | **Dict[str, object]** | Configuration values for the application. Supports arbitrarily nested structures. | [optional] diff --git a/docs/ImageDeltaHint.md b/docs/ImageDeltaHint.md new file mode 100644 index 0000000..38bfd7a --- /dev/null +++ b/docs/ImageDeltaHint.md @@ -0,0 +1,30 @@ +# ImageDeltaHint + +A control-plane-generated delta hint for a nested image within an application. Present only in rendered application specs delivered to the agent. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target_image** | **str** | The target image reference this delta applies to. | +**target_digest** | **str** | The content digest of the target image. | +**delta_image** | **str** | Reference to the delta artifact for this nested image. | + +## Example + +```python +from flightctl.models.image_delta_hint import ImageDeltaHint + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageDeltaHint from a JSON string +image_delta_hint_instance = ImageDeltaHint.from_json(json) +# print the JSON string representation of the object +print(ImageDeltaHint.to_json()) + +# convert the object into a dict +image_delta_hint_dict = image_delta_hint_instance.to_dict() +# create an instance of ImageDeltaHint from a dict +image_delta_hint_from_dict = ImageDeltaHint.from_dict(image_delta_hint_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/ImageSpec.md b/docs/ImageSpec.md index 8221f25..e4b3f1b 100644 --- a/docs/ImageSpec.md +++ b/docs/ImageSpec.md @@ -7,6 +7,8 @@ Reference to an OCI image or artifact with tag. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **image** | **str** | Reference to an OCI image or artifact with tag. | +**delta_image** | **str** | Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry identifies a target image reference and digest and names its delta artifact reference. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] ## Example diff --git a/docs/InlineApplicationProviderSpec.md b/docs/InlineApplicationProviderSpec.md index 08763ad..71b8c91 100644 --- a/docs/InlineApplicationProviderSpec.md +++ b/docs/InlineApplicationProviderSpec.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] ## Example diff --git a/docs/LabelSyncMapping.md b/docs/LabelSyncMapping.md new file mode 100644 index 0000000..1c078a5 --- /dev/null +++ b/docs/LabelSyncMapping.md @@ -0,0 +1,32 @@ +# LabelSyncMapping + +LabelSyncMapping defines an organization-scoped device label mapping. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | [**ApiVersion**](ApiVersion.md) | | +**kind** | **str** | Kind is a string value representing this resource type. | +**metadata** | [**ObjectMeta**](ObjectMeta.md) | | +**spec** | [**LabelSyncMappingSpec**](LabelSyncMappingSpec.md) | | +**status** | [**LabelSyncMappingStatus**](LabelSyncMappingStatus.md) | | [optional] + +## Example + +```python +from flightctl.models.label_sync_mapping import LabelSyncMapping + +# TODO update the JSON string below +json = "{}" +# create an instance of LabelSyncMapping from a JSON string +label_sync_mapping_instance = LabelSyncMapping.from_json(json) +# print the JSON string representation of the object +print(LabelSyncMapping.to_json()) + +# convert the object into a dict +label_sync_mapping_dict = label_sync_mapping_instance.to_dict() +# create an instance of LabelSyncMapping from a dict +label_sync_mapping_from_dict = LabelSyncMapping.from_dict(label_sync_mapping_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/LabelSyncMappingList.md b/docs/LabelSyncMappingList.md new file mode 100644 index 0000000..b949343 --- /dev/null +++ b/docs/LabelSyncMappingList.md @@ -0,0 +1,31 @@ +# LabelSyncMappingList + +LabelSyncMappingList is a list of LabelSyncMapping resources. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**api_version** | [**ApiVersion**](ApiVersion.md) | | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. | +**metadata** | [**ListMeta**](ListMeta.md) | | +**items** | [**List[LabelSyncMapping]**](LabelSyncMapping.md) | List of LabelSyncMapping resources. | + +## Example + +```python +from flightctl.models.label_sync_mapping_list import LabelSyncMappingList + +# TODO update the JSON string below +json = "{}" +# create an instance of LabelSyncMappingList from a JSON string +label_sync_mapping_list_instance = LabelSyncMappingList.from_json(json) +# print the JSON string representation of the object +print(LabelSyncMappingList.to_json()) + +# convert the object into a dict +label_sync_mapping_list_dict = label_sync_mapping_list_instance.to_dict() +# create an instance of LabelSyncMappingList from a dict +label_sync_mapping_list_from_dict = LabelSyncMappingList.from_dict(label_sync_mapping_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/LabelSyncMappingSpec.md b/docs/LabelSyncMappingSpec.md new file mode 100644 index 0000000..0cfc778 --- /dev/null +++ b/docs/LabelSyncMappingSpec.md @@ -0,0 +1,30 @@ +# LabelSyncMappingSpec + +Desired state for a label synchronization mapping. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resource_type** | **str** | Immutable resource type evaluated by the mapping. | +**key** | **str** | Complete destination label key for scalar mode. Omitted or null selects map mode; no prefix is added. | [optional] +**expression** | **str** | CEL expression evaluated for the selected resource type. | + +## Example + +```python +from flightctl.models.label_sync_mapping_spec import LabelSyncMappingSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of LabelSyncMappingSpec from a JSON string +label_sync_mapping_spec_instance = LabelSyncMappingSpec.from_json(json) +# print the JSON string representation of the object +print(LabelSyncMappingSpec.to_json()) + +# convert the object into a dict +label_sync_mapping_spec_dict = label_sync_mapping_spec_instance.to_dict() +# create an instance of LabelSyncMappingSpec from a dict +label_sync_mapping_spec_from_dict = LabelSyncMappingSpec.from_dict(label_sync_mapping_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/LabelSyncMappingStatus.md b/docs/LabelSyncMappingStatus.md new file mode 100644 index 0000000..adf2386 --- /dev/null +++ b/docs/LabelSyncMappingStatus.md @@ -0,0 +1,28 @@ +# LabelSyncMappingStatus + +Current propagation state for a label synchronization mapping. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**conditions** | [**List[Condition]**](Condition.md) | The Ready condition reports Pending, Degraded, or Success state. | [optional] + +## Example + +```python +from flightctl.models.label_sync_mapping_status import LabelSyncMappingStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of LabelSyncMappingStatus from a JSON string +label_sync_mapping_status_instance = LabelSyncMappingStatus.from_json(json) +# print the JSON string representation of the object +print(LabelSyncMappingStatus.to_json()) + +# convert the object into a dict +label_sync_mapping_status_dict = label_sync_mapping_status_instance.to_dict() +# create an instance of LabelSyncMappingStatus from a dict +label_sync_mapping_status_from_dict = LabelSyncMappingStatus.from_dict(label_sync_mapping_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/LabelSyncProvenanceItem.md b/docs/LabelSyncProvenanceItem.md new file mode 100644 index 0000000..5c23871 --- /dev/null +++ b/docs/LabelSyncProvenanceItem.md @@ -0,0 +1,29 @@ +# LabelSyncProvenanceItem + +Current owning LabelSyncMapping names for one exact label key. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **str** | Exact label key. | +**owners** | **List[str]** | Names of current owning LabelSyncMapping resources. An empty array means the key has no current mapping owner. | + +## Example + +```python +from flightctl.models.label_sync_provenance_item import LabelSyncProvenanceItem + +# TODO update the JSON string below +json = "{}" +# create an instance of LabelSyncProvenanceItem from a JSON string +label_sync_provenance_item_instance = LabelSyncProvenanceItem.from_json(json) +# print the JSON string representation of the object +print(LabelSyncProvenanceItem.to_json()) + +# convert the object into a dict +label_sync_provenance_item_dict = label_sync_provenance_item_instance.to_dict() +# create an instance of LabelSyncProvenanceItem from a dict +label_sync_provenance_item_from_dict = LabelSyncProvenanceItem.from_dict(label_sync_provenance_item_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/LabelSyncProvenanceList.md b/docs/LabelSyncProvenanceList.md new file mode 100644 index 0000000..d89b301 --- /dev/null +++ b/docs/LabelSyncProvenanceList.md @@ -0,0 +1,28 @@ +# LabelSyncProvenanceList + +Current LabelSyncMapping ownership grouped by exact label key. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**items** | [**List[LabelSyncProvenanceItem]**](LabelSyncProvenanceItem.md) | For organization queries, one item per supplied key in request order, including duplicates. For Device queries, one item per currently owned key, sorted by key. | + +## Example + +```python +from flightctl.models.label_sync_provenance_list import LabelSyncProvenanceList + +# TODO update the JSON string below +json = "{}" +# create an instance of LabelSyncProvenanceList from a JSON string +label_sync_provenance_list_instance = LabelSyncProvenanceList.from_json(json) +# print the JSON string representation of the object +print(LabelSyncProvenanceList.to_json()) + +# convert the object into a dict +label_sync_provenance_list_dict = label_sync_provenance_list_instance.to_dict() +# create an instance of LabelSyncProvenanceList from a dict +label_sync_provenance_list_from_dict = LabelSyncProvenanceList.from_dict(label_sync_provenance_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/LabelsyncmappingApi.md b/docs/LabelsyncmappingApi.md new file mode 100644 index 0000000..369f460 --- /dev/null +++ b/docs/LabelsyncmappingApi.md @@ -0,0 +1,523 @@ +# flightctl.LabelsyncmappingApi + +All URIs are relative to */api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_label_sync_mapping**](LabelsyncmappingApi.md#create_label_sync_mapping) | **POST** /labelsyncmappings | +[**delete_label_sync_mapping**](LabelsyncmappingApi.md#delete_label_sync_mapping) | **DELETE** /labelsyncmappings/{name} | +[**get_label_sync_mapping**](LabelsyncmappingApi.md#get_label_sync_mapping) | **GET** /labelsyncmappings/{name} | +[**get_label_sync_provenance**](LabelsyncmappingApi.md#get_label_sync_provenance) | **GET** /labelsyncprovenance | +[**list_label_sync_mappings**](LabelsyncmappingApi.md#list_label_sync_mappings) | **GET** /labelsyncmappings | +[**patch_label_sync_mapping**](LabelsyncmappingApi.md#patch_label_sync_mapping) | **PATCH** /labelsyncmappings/{name} | +[**replace_label_sync_mapping**](LabelsyncmappingApi.md#replace_label_sync_mapping) | **PUT** /labelsyncmappings/{name} | + + +# **create_label_sync_mapping** +> LabelSyncMapping create_label_sync_mapping(label_sync_mapping) + +Create a LabelSyncMapping resource. + +### Example + + +```python +import flightctl +from flightctl.models.label_sync_mapping import LabelSyncMapping +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.LabelsyncmappingApi(api_client) + label_sync_mapping = flightctl.LabelSyncMapping() # LabelSyncMapping | + + try: + api_response = api_instance.create_label_sync_mapping(label_sync_mapping) + print("The response of LabelsyncmappingApi->create_label_sync_mapping:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsyncmappingApi->create_label_sync_mapping: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_sync_mapping** | [**LabelSyncMapping**](LabelSyncMapping.md)| | + +### Return type + +[**LabelSyncMapping**](LabelSyncMapping.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 | - | +**422** | Unprocessable Content | - | +**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_label_sync_mapping** +> Status delete_label_sync_mapping(name) + +Delete a LabelSyncMapping 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 /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.LabelsyncmappingApi(api_client) + name = 'name_example' # str | The name of the LabelSyncMapping resource to delete. + + try: + api_response = api_instance.delete_label_sync_mapping(name) + print("The response of LabelsyncmappingApi->delete_label_sync_mapping:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsyncmappingApi->delete_label_sync_mapping: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the LabelSyncMapping 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 | - | +**400** | Bad Request | - | +**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_label_sync_mapping** +> LabelSyncMapping get_label_sync_mapping(name) + +Get a LabelSyncMapping resource. + +### Example + + +```python +import flightctl +from flightctl.models.label_sync_mapping import LabelSyncMapping +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.LabelsyncmappingApi(api_client) + name = 'name_example' # str | The name of the LabelSyncMapping resource to get. + + try: + api_response = api_instance.get_label_sync_mapping(name) + print("The response of LabelsyncmappingApi->get_label_sync_mapping:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsyncmappingApi->get_label_sync_mapping: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the LabelSyncMapping resource to get. | + +### Return type + +[**LabelSyncMapping**](LabelSyncMapping.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 | - | +**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_label_sync_provenance** +> LabelSyncProvenanceList get_label_sync_provenance(label_keys) + +Resolve exact label keys to their current owning LabelSyncMapping names in the request organization. Return one item per supplied key in request order, including repeated keys. Keys with no current mapping owner have an empty owners array. Label values are not returned. + +### Example + + +```python +import flightctl +from flightctl.models.label_sync_provenance_list import LabelSyncProvenanceList +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.LabelsyncmappingApi(api_client) + label_keys = ['label_keys_example'] # List[str] | Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order. + + try: + api_response = api_instance.get_label_sync_provenance(label_keys) + print("The response of LabelsyncmappingApi->get_label_sync_provenance:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsyncmappingApi->get_label_sync_provenance: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **label_keys** | [**List[str]**](str.md)| Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order. | + +### Return type + +[**LabelSyncProvenanceList**](LabelSyncProvenanceList.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) + +# **list_label_sync_mappings** +> LabelSyncMappingList list_label_sync_mappings(var_continue=var_continue, limit=limit) + +List LabelSyncMapping resources. + +### Example + + +```python +import flightctl +from flightctl.models.label_sync_mapping_list import LabelSyncMappingList +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.LabelsyncmappingApi(api_client) + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. (optional) + limit = 56 # int | The maximum number of results returned in the list response. (optional) + + try: + api_response = api_instance.list_label_sync_mappings(var_continue=var_continue, limit=limit) + print("The response of LabelsyncmappingApi->list_label_sync_mappings:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsyncmappingApi->list_label_sync_mappings: %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 parameter must match the value of the 'continue' field in the previous list response. | [optional] + **limit** | **int**| The maximum number of results returned in the list response. | [optional] + +### Return type + +[**LabelSyncMappingList**](LabelSyncMappingList.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 | - | +**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) + +# **patch_label_sync_mapping** +> LabelSyncMapping patch_label_sync_mapping(name, patch_request_inner) + +Patch a LabelSyncMapping resource. + +### Example + + +```python +import flightctl +from flightctl.models.label_sync_mapping import LabelSyncMapping +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 /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.LabelsyncmappingApi(api_client) + name = 'name_example' # str | The name of the LabelSyncMapping resource to patch. + patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | + + try: + api_response = api_instance.patch_label_sync_mapping(name, patch_request_inner) + print("The response of LabelsyncmappingApi->patch_label_sync_mapping:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsyncmappingApi->patch_label_sync_mapping: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the LabelSyncMapping resource to patch. | + **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | + +### Return type + +[**LabelSyncMapping**](LabelSyncMapping.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 | - | +**422** | Unprocessable Content | - | +**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_label_sync_mapping** +> LabelSyncMapping replace_label_sync_mapping(name, label_sync_mapping) + +Update a LabelSyncMapping resource. + +### Example + + +```python +import flightctl +from flightctl.models.label_sync_mapping import LabelSyncMapping +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to /api/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "/api/v1" +) + + +# 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.LabelsyncmappingApi(api_client) + name = 'name_example' # str | The name of the LabelSyncMapping resource to update. + label_sync_mapping = flightctl.LabelSyncMapping() # LabelSyncMapping | + + try: + api_response = api_instance.replace_label_sync_mapping(name, label_sync_mapping) + print("The response of LabelsyncmappingApi->replace_label_sync_mapping:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling LabelsyncmappingApi->replace_label_sync_mapping: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the LabelSyncMapping resource to update. | + **label_sync_mapping** | [**LabelSyncMapping**](LabelSyncMapping.md)| | + +### Return type + +[**LabelSyncMapping**](LabelSyncMapping.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 | - | +**422** | Unprocessable Content | - | +**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/OAuth2ProviderSpec.md b/docs/OAuth2ProviderSpec.md index c666f03..750a04d 100644 --- a/docs/OAuth2ProviderSpec.md +++ b/docs/OAuth2ProviderSpec.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **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] +**prompt** | **str** | Space-separated, case-sensitive authorization prompt values, such as login, consent, select_account, none, or provider-specific values. Omitted and null values are preserved in AuthProvider resources and exposed as select_account in public authentication configuration. An empty string instructs clients to omit the prompt parameter. Values must be printable ASCII separated by spaces; none cannot accompany a different value. Accepted values are preserved, including extra spaces and duplicates. | [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) | | diff --git a/docs/OIDCProviderSpec.md b/docs/OIDCProviderSpec.md index 4e3d001..7e98b8e 100644 --- a/docs/OIDCProviderSpec.md +++ b/docs/OIDCProviderSpec.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **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] +**prompt** | **str** | Space-separated, case-sensitive authorization prompt values, such as login, consent, select_account, none, or provider-specific values. Omitted and null values are preserved in AuthProvider resources and exposed as select_account in public authentication configuration. An empty string instructs clients to omit the prompt parameter. Values must be printable ASCII separated by spaces; none cannot accompany a different value. Accepted values are preserved, including extra spaces and duplicates. | [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) | | diff --git a/docs/OciRepoSpec.md b/docs/OciRepoSpec.md index e098c69..5c2eb9a 100644 --- a/docs/OciRepoSpec.md +++ b/docs/OciRepoSpec.md @@ -13,6 +13,9 @@ Name | Type | Description | Notes **oci_auth** | [**DockerAuth**](DockerAuth.md) | | [optional] **ca_crt** | **str** | Base64 encoded root CA. | [optional] **skip_server_verification** | **bool** | Skip remote server verification. | [optional] +**repository** | **str** | Optional OCI repository path under spec.registry (e.g. my-org/diffs). When set, this object is that repo (`my-registry.com/my-org/diffs`), not only a registry. Mutually exclusive with namespace. ImageBuild destination imageName must equal this value. | [optional] +**namespace** | **str** | Optional org/subpath under spec.registry (e.g. my-org). Concrete names are spec.registry/namespace/<name>. Mutually exclusive with repository. Used by delta push (`{registry}/{namespace}/{imageName}`). Invalid on an ImageBuild or ImageExport destination Repository. | [optional] +**delta_storage_target** | **bool** | When true, generated deltas are pushed to this object (at most one per org). Auth is the existing ociAuth / accessMode. Placement follows repository / namespace / registry-only as above. | [optional] **base_images** | [**List[BaseImageEntry]**](BaseImageEntry.md) | Curated list of trusted base images available in this registry. When present, the Image Builder source picker surfaces these entries as selectable options. | [optional] ## Example diff --git a/docs/PreEnrollmentActionResult.md b/docs/PreEnrollmentActionResult.md new file mode 100644 index 0000000..880cd8e --- /dev/null +++ b/docs/PreEnrollmentActionResult.md @@ -0,0 +1,30 @@ +# PreEnrollmentActionResult + +Result of a single executed pre-enrollment hook action, agent-populated. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **str** | Path to the hook definition YAML that contained this action (for example /etc/flightctl/hooks.d/beforeenrolling/10-network.yaml). | +**exit_code** | **int** | Process exit code from the hook action. | +**output** | **str** | Redacted stdout/stderr from this action. The total size across all actions is capped at 4KiB. Secret patterns (PEM blocks, Bearer prefixes, known token env names) are redacted before persistence. | [optional] + +## Example + +```python +from flightctl.models.pre_enrollment_action_result import PreEnrollmentActionResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PreEnrollmentActionResult from a JSON string +pre_enrollment_action_result_instance = PreEnrollmentActionResult.from_json(json) +# print the JSON string representation of the object +print(PreEnrollmentActionResult.to_json()) + +# convert the object into a dict +pre_enrollment_action_result_dict = pre_enrollment_action_result_instance.to_dict() +# create an instance of PreEnrollmentActionResult from a dict +pre_enrollment_action_result_from_dict = PreEnrollmentActionResult.from_dict(pre_enrollment_action_result_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/PreEnrollmentResult.md b/docs/PreEnrollmentResult.md new file mode 100644 index 0000000..2690d47 --- /dev/null +++ b/docs/PreEnrollmentResult.md @@ -0,0 +1,29 @@ +# PreEnrollmentResult + +Result of pre-enrollment hook execution, agent-populated. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **bool** | Whether all pre-enrollment hooks completed with exit code 0. | +**actions** | [**List[PreEnrollmentActionResult]**](PreEnrollmentActionResult.md) | Per-action results in execution order. | [optional] + +## Example + +```python +from flightctl.models.pre_enrollment_result import PreEnrollmentResult + +# TODO update the JSON string below +json = "{}" +# create an instance of PreEnrollmentResult from a JSON string +pre_enrollment_result_instance = PreEnrollmentResult.from_json(json) +# print the JSON string representation of the object +print(PreEnrollmentResult.to_json()) + +# convert the object into a dict +pre_enrollment_result_dict = pre_enrollment_result_instance.to_dict() +# create an instance of PreEnrollmentResult from a dict +pre_enrollment_result_from_dict = PreEnrollmentResult.from_dict(pre_enrollment_result_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/PrepareDeltasDetails.md b/docs/PrepareDeltasDetails.md new file mode 100644 index 0000000..decf398 --- /dev/null +++ b/docs/PrepareDeltasDetails.md @@ -0,0 +1,31 @@ +# PrepareDeltasDetails + +Structured details for PrepareDeltas events. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail_type** | **str** | The type of detail for discriminator purposes. | +**template_version** | **str** | Fleet only. The TemplateVersion this prepare is for. Required when involvedObject.kind is Fleet; omitted for Device. | [optional] +**generation** | **int** | Device only. The desired spec generation this prepare is for. Required when involvedObject.kind is Device; omitted for Fleet. | [optional] +**resource_version** | **str** | The resource version of the involved Fleet or Device when this prepare event was created. Used to ignore stale prepare events. May be omitted for retained events created before this field was introduced. | [optional] + +## Example + +```python +from flightctl.models.prepare_deltas_details import PrepareDeltasDetails + +# TODO update the JSON string below +json = "{}" +# create an instance of PrepareDeltasDetails from a JSON string +prepare_deltas_details_instance = PrepareDeltasDetails.from_json(json) +# print the JSON string representation of the object +print(PrepareDeltasDetails.to_json()) + +# convert the object into a dict +prepare_deltas_details_dict = prepare_deltas_details_instance.to_dict() +# create an instance of PrepareDeltasDetails from a dict +prepare_deltas_details_from_dict = PrepareDeltasDetails.from_dict(prepare_deltas_details_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/QuadletApplication.md b/docs/QuadletApplication.md index bdd14bb..187e723 100644 --- a/docs/QuadletApplication.md +++ b/docs/QuadletApplication.md @@ -14,6 +14,8 @@ Name | Type | Description | Notes **run_as** | **str** | The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified. | [optional] **volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] **image** | **str** | Reference to an OCI image or artifact with tag. | +**delta_image** | **str** | Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] **catalog_item_ref** | [**CatalogItemRefSpec**](CatalogItemRefSpec.md) | | **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | diff --git a/docs/RepositorySpec.md b/docs/RepositorySpec.md index 32c6991..78a92ce 100644 --- a/docs/RepositorySpec.md +++ b/docs/RepositorySpec.md @@ -17,6 +17,9 @@ Name | Type | Description | Notes **oci_auth** | [**DockerAuth**](DockerAuth.md) | | [optional] **ca_crt** | **str** | Base64 encoded root CA. | [optional] **skip_server_verification** | **bool** | Skip remote server verification. | [optional] +**repository** | **str** | Optional OCI repository path under spec.registry (e.g. my-org/diffs). When set, this object is that repo (`my-registry.com/my-org/diffs`), not only a registry. Mutually exclusive with namespace. ImageBuild destination imageName must equal this value. | [optional] +**namespace** | **str** | Optional org/subpath under spec.registry (e.g. my-org). Concrete names are spec.registry/namespace/<name>. Mutually exclusive with repository. Used by delta push (`{registry}/{namespace}/{imageName}`). Invalid on an ImageBuild or ImageExport destination Repository. | [optional] +**delta_storage_target** | **bool** | When true, generated deltas are pushed to this object (at most one per org). Auth is the existing ociAuth / accessMode. Placement follows repository / namespace / registry-only as above. | [optional] **base_images** | [**List[BaseImageEntry]**](BaseImageEntry.md) | Curated list of trusted base images available in this registry. When present, the Image Builder source picker surfaces these entries as selectable options. | [optional] ## Example diff --git a/docs/RolloutPolicy.md b/docs/RolloutPolicy.md index e0cb446..6bbc948 100644 --- a/docs/RolloutPolicy.md +++ b/docs/RolloutPolicy.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **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] +**delta_generation** | [**RolloutPolicyDeltaGeneration**](RolloutPolicyDeltaGeneration.md) | | [optional] ## Example diff --git a/docs/RolloutPolicyDeltaGeneration.md b/docs/RolloutPolicyDeltaGeneration.md new file mode 100644 index 0000000..435b7e0 --- /dev/null +++ b/docs/RolloutPolicyDeltaGeneration.md @@ -0,0 +1,30 @@ +# RolloutPolicyDeltaGeneration + +Controls OS delta generation for this fleet rollout. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**generate_delta** | **bool** | When false, skip control-plane OS delta generation for this fleet. Omitted means true. | [optional] +**max_wait_for_delta** | **str** | How long a prepare may wait before periodic resume. Omitted uses DeltaGeneration.maxWaitForDelta. Ignored when generateDelta is false. 0s still generates then resumes immediately. | [optional] +**delta_generation_timeout** | **str** | Context deadline for each generation job. Omitted uses DeltaGeneration.timeout. | [optional] + +## Example + +```python +from flightctl.models.rollout_policy_delta_generation import RolloutPolicyDeltaGeneration + +# TODO update the JSON string below +json = "{}" +# create an instance of RolloutPolicyDeltaGeneration from a JSON string +rollout_policy_delta_generation_instance = RolloutPolicyDeltaGeneration.from_json(json) +# print the JSON string representation of the object +print(RolloutPolicyDeltaGeneration.to_json()) + +# convert the object into a dict +rollout_policy_delta_generation_dict = rollout_policy_delta_generation_instance.to_dict() +# create an instance of RolloutPolicyDeltaGeneration from a dict +rollout_policy_delta_generation_from_dict = RolloutPolicyDeltaGeneration.from_dict(rollout_policy_delta_generation_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/SystemInfoSourceStatus.md b/docs/SystemInfoSourceStatus.md new file mode 100644 index 0000000..1327492 --- /dev/null +++ b/docs/SystemInfoSourceStatus.md @@ -0,0 +1,30 @@ +# SystemInfoSourceStatus + +Collection status for a single system information source. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**SystemInfoSourceStatusType**](SystemInfoSourceStatusType.md) | | +**last_transition_time** | **datetime** | The last time the collection status of this source changed. | +**message** | **str** | Human readable message providing details about the source status. | [optional] + +## Example + +```python +from flightctl.models.system_info_source_status import SystemInfoSourceStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of SystemInfoSourceStatus from a JSON string +system_info_source_status_instance = SystemInfoSourceStatus.from_json(json) +# print the JSON string representation of the object +print(SystemInfoSourceStatus.to_json()) + +# convert the object into a dict +system_info_source_status_dict = system_info_source_status_instance.to_dict() +# create an instance of SystemInfoSourceStatus from a dict +system_info_source_status_from_dict = SystemInfoSourceStatus.from_dict(system_info_source_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/SystemInfoSourceStatusType.md b/docs/SystemInfoSourceStatusType.md new file mode 100644 index 0000000..e8d3882 --- /dev/null +++ b/docs/SystemInfoSourceStatusType.md @@ -0,0 +1,13 @@ +# SystemInfoSourceStatusType + +Collection health of a single system information source. + +## Enum + +* `SystemInfoSourceStatusHealthy` (value: `'Healthy'`) + +* `SystemInfoSourceStatusError` (value: `'Error'`) + +* `SystemInfoSourceStatusUnknown` (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/SystemInfoSummaryStatusType.md b/docs/SystemInfoSummaryStatusType.md new file mode 100644 index 0000000..a9e24f9 --- /dev/null +++ b/docs/SystemInfoSummaryStatusType.md @@ -0,0 +1,15 @@ +# SystemInfoSummaryStatusType + +Aggregate health of the system information collection. + +## Enum + +* `SystemInfoSummaryStatusHealthy` (value: `'Healthy'`) + +* `SystemInfoSummaryStatusDegraded` (value: `'Degraded'`) + +* `SystemInfoSummaryStatusError` (value: `'Error'`) + +* `SystemInfoSummaryStatusUnknown` (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/TemplateVersionStatus.md b/docs/TemplateVersionStatus.md index 46f713a..1533e27 100644 --- a/docs/TemplateVersionStatus.md +++ b/docs/TemplateVersionStatus.md @@ -7,7 +7,7 @@ TemplateVersionStatus represents information about the status of a template vers Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **update_policy** | [**DeviceUpdatePolicySpec**](DeviceUpdatePolicySpec.md) | | [optional] -**os** | [**ImageOrCatalogItemRefSpec**](ImageOrCatalogItemRefSpec.md) | | [optional] +**os** | [**DeviceOsSpec**](DeviceOsSpec.md) | | [optional] **config** | [**List[ConfigProviderSpec]**](ConfigProviderSpec.md) | List of config providers. | [optional] **applications** | [**List[ApplicationProviderSpec]**](ApplicationProviderSpec.md) | List of application providers. | [optional] **systemd** | [**DeviceSpecSystemd**](DeviceSpecSystemd.md) | | [optional] diff --git a/docs/VmApplication.md b/docs/VmApplication.md index 6ef6e69..87f80a0 100644 --- a/docs/VmApplication.md +++ b/docs/VmApplication.md @@ -11,8 +11,11 @@ Name | Type | Description | Notes **annotations** | **Dict[str, str]** | Arbitrary metadata annotations. Used internally by the control plane (e.g., flightctl.io/workload-type) when transforming application types at render time. | [optional] [readonly] **desired_state** | [**ApplicationDesiredState**](ApplicationDesiredState.md) | Desired lifecycle state for this application, as most recently set by the stop/start device APIs. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent. | [optional] [readonly] **restart_generation** | **int** | Counter incremented by the restart device API each time the application is restarted. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**run_as** | **str** | The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified. | [optional] **publish_ports** | **List[str]** | List of host-to-guest port mappings for the VM. Each entry must follow the format \"hostPort:guestPort\" or \"hostPort:guestPort/protocol\" (e.g. \"8080:80\" or \"8080:80/tcp\"). | [optional] **image** | **str** | Reference to an OCI image or artifact with tag. | +**delta_image** | **str** | Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] +**delta_images** | [**List[ImageDeltaHint]**](ImageDeltaHint.md) | Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent. | [optional] [readonly] **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | ## Example diff --git a/flightctl/api/__init__.py b/flightctl/api/__init__.py index 475a6ae..9b8377e 100644 --- a/flightctl/api/__init__.py +++ b/flightctl/api/__init__.py @@ -6,10 +6,12 @@ from flightctl.api.certificatesigningrequest_api import CertificatesigningrequestApi from flightctl.api.device_api import DeviceApi from flightctl.api.deviceactions_api import DeviceactionsApi +from flightctl.api.enrollmenthookpolicy_api import EnrollmenthookpolicyApi 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.labelsyncmapping_api import LabelsyncmappingApi from flightctl.api.organization_api import OrganizationApi from flightctl.api.repository_api import RepositoryApi from flightctl.api.resourcesync_api import ResourcesyncApi diff --git a/flightctl/api/device_api.py b/flightctl/api/device_api.py index f2b3538..79a4ef0 100644 --- a/flightctl/api/device_api.py +++ b/flightctl/api/device_api.py @@ -24,6 +24,7 @@ from flightctl.models.device_decommission import DeviceDecommission from flightctl.models.device_last_seen import DeviceLastSeen from flightctl.models.device_list import DeviceList +from flightctl.models.label_sync_provenance_list import LabelSyncProvenanceList from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.models.status import Status @@ -1802,9 +1803,9 @@ def _get_device_console_serialize( @validate_call - def get_device_last_seen( + def get_device_label_sync_provenance( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the last seen timestamp for.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1817,12 +1818,12 @@ def get_device_last_seen( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeviceLastSeen: - """get_device_last_seen + ) -> LabelSyncProvenanceList: + """get_device_label_sync_provenance - Get the last seen timestamp of the Device resource. + Get current LabelSyncMapping ownership for a Device. Return only keys with current DeviceLabel ownership by active mappings, sorted by key. An existing Device with no currently owned keys returns an empty items array. Label values are not returned. - :param name: The name of the Device resource to get the last seen timestamp for. (required) + :param name: The name of the Device resource. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1846,7 +1847,7 @@ def get_device_last_seen( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_last_seen_serialize( + _param = self._get_device_label_sync_provenance_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -1855,8 +1856,7 @@ def get_device_last_seen( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceLastSeen", - '204': None, + '200': "LabelSyncProvenanceList", '400': "Status", '401': "Status", '403': "Status", @@ -1876,9 +1876,9 @@ def get_device_last_seen( @validate_call - def get_device_last_seen_with_http_info( + def get_device_label_sync_provenance_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the last seen timestamp for.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1891,12 +1891,12 @@ def get_device_last_seen_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DeviceLastSeen]: - """get_device_last_seen + ) -> ApiResponse[LabelSyncProvenanceList]: + """get_device_label_sync_provenance - Get the last seen timestamp of the Device resource. + Get current LabelSyncMapping ownership for a Device. Return only keys with current DeviceLabel ownership by active mappings, sorted by key. An existing Device with no currently owned keys returns an empty items array. Label values are not returned. - :param name: The name of the Device resource to get the last seen timestamp for. (required) + :param name: The name of the Device resource. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1920,7 +1920,7 @@ def get_device_last_seen_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_last_seen_serialize( + _param = self._get_device_label_sync_provenance_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -1929,8 +1929,7 @@ def get_device_last_seen_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceLastSeen", - '204': None, + '200': "LabelSyncProvenanceList", '400': "Status", '401': "Status", '403': "Status", @@ -1950,9 +1949,9 @@ def get_device_last_seen_with_http_info( @validate_call - def get_device_last_seen_without_preload_content( + def get_device_label_sync_provenance_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the last seen timestamp for.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1966,11 +1965,11 @@ def get_device_last_seen_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_device_last_seen + """get_device_label_sync_provenance - Get the last seen timestamp of the Device resource. + Get current LabelSyncMapping ownership for a Device. Return only keys with current DeviceLabel ownership by active mappings, sorted by key. An existing Device with no currently owned keys returns an empty items array. Label values are not returned. - :param name: The name of the Device resource to get the last seen timestamp for. (required) + :param name: The name of the Device resource. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1994,7 +1993,7 @@ def get_device_last_seen_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_last_seen_serialize( + _param = self._get_device_label_sync_provenance_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -2003,8 +2002,7 @@ def get_device_last_seen_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceLastSeen", - '204': None, + '200': "LabelSyncProvenanceList", '400': "Status", '401': "Status", '403': "Status", @@ -2019,7 +2017,7 @@ def get_device_last_seen_without_preload_content( return response_data.response - def _get_device_last_seen_serialize( + def _get_device_label_sync_provenance_serialize( self, name, _request_auth, @@ -2066,7 +2064,7 @@ def _get_device_last_seen_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/devices/{name}/lastseen', + resource_path='/devices/{name}/labelsyncprovenance', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2083,9 +2081,9 @@ def _get_device_last_seen_serialize( @validate_call - def get_device_status( + def get_device_last_seen( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the last seen timestamp for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2098,12 +2096,12 @@ def get_device_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Device: - """get_device_status + ) -> DeviceLastSeen: + """get_device_last_seen - Get the status of a Device resource. + Get the last seen timestamp of the Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to get the last seen timestamp for. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2127,7 +2125,7 @@ def get_device_status( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_status_serialize( + _param = self._get_device_last_seen_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -2136,7 +2134,8 @@ def get_device_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "DeviceLastSeen", + '204': None, '400': "Status", '401': "Status", '403': "Status", @@ -2156,9 +2155,9 @@ def get_device_status( @validate_call - def get_device_status_with_http_info( + def get_device_last_seen_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the last seen timestamp for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2171,12 +2170,12 @@ def get_device_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Device]: - """get_device_status + ) -> ApiResponse[DeviceLastSeen]: + """get_device_last_seen - Get the status of a Device resource. + Get the last seen timestamp of the Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to get the last seen timestamp for. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2200,7 +2199,7 @@ def get_device_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_status_serialize( + _param = self._get_device_last_seen_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -2209,7 +2208,8 @@ def get_device_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "DeviceLastSeen", + '204': None, '400': "Status", '401': "Status", '403': "Status", @@ -2229,9 +2229,9 @@ def get_device_status_with_http_info( @validate_call - def get_device_status_without_preload_content( + def get_device_last_seen_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the last seen timestamp for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2245,11 +2245,11 @@ def get_device_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_device_status + """get_device_last_seen - Get the status of a Device resource. + Get the last seen timestamp of the Device resource. - :param name: The name of the Device resource to get. (required) + :param name: The name of the Device resource to get the last seen timestamp for. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2273,7 +2273,7 @@ def get_device_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_device_status_serialize( + _param = self._get_device_last_seen_serialize( name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -2282,7 +2282,8 @@ def get_device_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Device", + '200': "DeviceLastSeen", + '204': None, '400': "Status", '401': "Status", '403': "Status", @@ -2297,7 +2298,7 @@ def get_device_status_without_preload_content( return response_data.response - def _get_device_status_serialize( + def _get_device_last_seen_serialize( self, name, _request_auth, @@ -2344,7 +2345,7 @@ def _get_device_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/devices/{name}/status', + resource_path='/devices/{name}/lastseen', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2361,10 +2362,9 @@ def _get_device_status_serialize( @validate_call - def get_rendered_device( + def get_device_status( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2378,14 +2378,12 @@ def get_rendered_device( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Device: - """get_rendered_device + """get_device_status - Get the rendered device. + Get the status of a Device resource. - :param name: The name of the Device resource to get the rendered device specification for. (required) + :param name: The name of the Device resource to get. (required) :type name: str - :param known_rendered_version: The last known renderedVersion. - :type known_rendered_version: 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 @@ -2408,9 +2406,8 @@ def get_rendered_device( :return: Returns the result object. """ # noqa: E501 - _param = self._get_rendered_device_serialize( + _param = self._get_device_status_serialize( name=name, - known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2419,12 +2416,10 @@ def get_rendered_device( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '204': None, '400': "Status", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '429': "Status", '503': "Status", } @@ -2440,10 +2435,9 @@ def get_rendered_device( @validate_call - def get_rendered_device_with_http_info( + def get_device_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2457,14 +2451,12 @@ def get_rendered_device_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Device]: - """get_rendered_device + """get_device_status - Get the rendered device. + Get the status of a Device resource. - :param name: The name of the Device resource to get the rendered device specification for. (required) + :param name: The name of the Device resource to get. (required) :type name: str - :param known_rendered_version: The last known renderedVersion. - :type known_rendered_version: 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 @@ -2487,9 +2479,8 @@ def get_rendered_device_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_rendered_device_serialize( + _param = self._get_device_status_serialize( name=name, - known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2498,12 +2489,10 @@ def get_rendered_device_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '204': None, '400': "Status", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '429': "Status", '503': "Status", } @@ -2519,10 +2508,9 @@ def get_rendered_device_with_http_info( @validate_call - def get_rendered_device_without_preload_content( + def get_device_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2536,14 +2524,12 @@ def get_rendered_device_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """get_rendered_device + """get_device_status - Get the rendered device. + Get the status of a Device resource. - :param name: The name of the Device resource to get the rendered device specification for. (required) + :param name: The name of the Device resource to get. (required) :type name: str - :param known_rendered_version: The last known renderedVersion. - :type known_rendered_version: 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 @@ -2566,9 +2552,8 @@ def get_rendered_device_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_rendered_device_serialize( + _param = self._get_device_status_serialize( name=name, - known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2577,12 +2562,10 @@ def get_rendered_device_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", - '204': None, '400': "Status", '401': "Status", '403': "Status", '404': "Status", - '409': "Status", '429': "Status", '503': "Status", } @@ -2593,10 +2576,9 @@ def get_rendered_device_without_preload_content( return response_data.response - def _get_rendered_device_serialize( + def _get_device_status_serialize( self, name, - known_rendered_version, _request_auth, _content_type, _headers, @@ -2621,10 +2603,6 @@ def _get_rendered_device_serialize( if name is not None: _path_params['name'] = name # process the query parameters - if known_rendered_version is not None: - - _query_params.append(('knownRenderedVersion', known_rendered_version)) - # process the header parameters # process the form parameters # process the body parameter @@ -2645,7 +2623,7 @@ def _get_rendered_device_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/devices/{name}/rendered', + resource_path='/devices/{name}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2662,14 +2640,10 @@ def _get_rendered_device_serialize( @validate_call - def list_devices( + def get_rendered_device( 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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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, - summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, - cve_id: Annotated[Optional[Annotated[str, Field(strict=True, max_length=64)]], Field(description="Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345).")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2682,23 +2656,15 @@ def list_devices( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DeviceList: - """list_devices + ) -> Device: + """get_rendered_device - List Device resources. + Get the rendered device. - :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 summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. - :type summary_only: bool - :param cve_id: Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345). - :type cve_id: str + :param name: The name of the Device resource to get the rendered device specification for. (required) + :type name: str + :param known_rendered_version: The last known renderedVersion. + :type known_rendered_version: 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 @@ -2721,13 +2687,9 @@ def list_devices( :return: Returns the result object. """ # noqa: E501 - _param = self._list_devices_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - summary_only=summary_only, - cve_id=cve_id, + _param = self._get_rendered_device_serialize( + name=name, + known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2735,10 +2697,13 @@ def list_devices( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceList", + '200': "Device", + '204': None, '400': "Status", '401': "Status", '403': "Status", + '404': "Status", + '409': "Status", '429': "Status", '503': "Status", } @@ -2754,14 +2719,10 @@ def list_devices( @validate_call - def list_devices_with_http_info( + def get_rendered_device_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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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, - summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, - cve_id: Annotated[Optional[Annotated[str, Field(strict=True, max_length=64)]], Field(description="Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345).")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2774,23 +2735,15 @@ def list_devices_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DeviceList]: - """list_devices + ) -> ApiResponse[Device]: + """get_rendered_device - List Device resources. + Get the rendered device. - :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 summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. - :type summary_only: bool - :param cve_id: Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345). - :type cve_id: str + :param name: The name of the Device resource to get the rendered device specification for. (required) + :type name: str + :param known_rendered_version: The last known renderedVersion. + :type known_rendered_version: 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 @@ -2813,13 +2766,9 @@ def list_devices_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_devices_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - summary_only=summary_only, - cve_id=cve_id, + _param = self._get_rendered_device_serialize( + name=name, + known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2827,10 +2776,13 @@ def list_devices_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceList", + '200': "Device", + '204': None, '400': "Status", '401': "Status", '403': "Status", + '404': "Status", + '409': "Status", '429': "Status", '503': "Status", } @@ -2846,14 +2798,10 @@ def list_devices_with_http_info( @validate_call - def list_devices_without_preload_content( + def get_rendered_device_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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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, - summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, - cve_id: Annotated[Optional[Annotated[str, Field(strict=True, max_length=64)]], Field(description="Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345).")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2867,22 +2815,14 @@ def list_devices_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_devices + """get_rendered_device - List Device resources. + Get the rendered device. - :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 summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. - :type summary_only: bool - :param cve_id: Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345). - :type cve_id: str + :param name: The name of the Device resource to get the rendered device specification for. (required) + :type name: str + :param known_rendered_version: The last known renderedVersion. + :type known_rendered_version: 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 @@ -2905,13 +2845,9 @@ def list_devices_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_devices_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - summary_only=summary_only, - cve_id=cve_id, + _param = self._get_rendered_device_serialize( + name=name, + known_rendered_version=known_rendered_version, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2919,10 +2855,13 @@ def list_devices_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DeviceList", + '200': "Device", + '204': None, '400': "Status", '401': "Status", '403': "Status", + '404': "Status", + '409': "Status", '429': "Status", '503': "Status", } @@ -2933,14 +2872,10 @@ def list_devices_without_preload_content( return response_data.response - def _list_devices_serialize( + def _get_rendered_device_serialize( self, - var_continue, - label_selector, - field_selector, - limit, - summary_only, - cve_id, + name, + known_rendered_version, _request_auth, _content_type, _headers, @@ -2962,30 +2897,12 @@ def _list_devices_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # 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)) - - if summary_only is not None: - - _query_params.append(('summaryOnly', summary_only)) - - if cve_id is not None: + if known_rendered_version is not None: - _query_params.append(('cveId', cve_id)) + _query_params.append(('knownRenderedVersion', known_rendered_version)) # process the header parameters # process the form parameters @@ -3007,7 +2924,653 @@ def _list_devices_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/devices', + resource_path='/devices/{name}/rendered', + 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_devices( + 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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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, + summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, + cve_id: Annotated[Optional[Annotated[str, Field(strict=True, max_length=64)]], Field(description="Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345).")] = 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, + ) -> DeviceList: + """list_devices + + List Device 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 summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. + :type summary_only: bool + :param cve_id: Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345). + :type cve_id: 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._list_devices_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + summary_only=summary_only, + cve_id=cve_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceList", + '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_devices_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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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, + summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, + cve_id: Annotated[Optional[Annotated[str, Field(strict=True, max_length=64)]], Field(description="Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345).")] = 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[DeviceList]: + """list_devices + + List Device 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 summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. + :type summary_only: bool + :param cve_id: Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345). + :type cve_id: 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._list_devices_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + summary_only=summary_only, + cve_id=cve_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceList", + '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_devices_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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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, + summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, + cve_id: Annotated[Optional[Annotated[str, Field(strict=True, max_length=64)]], Field(description="Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345).")] = 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_devices + + List Device 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 summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. + :type summary_only: bool + :param cve_id: Filter devices by CVE ID. Only returns devices whose OS image digest has the specified vulnerability. Must be a MITRE-style identifier (CVE-YYYY-sequence, e.g. CVE-2024-12345). + :type cve_id: 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._list_devices_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + summary_only=summary_only, + cve_id=cve_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeviceList", + '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_devices_serialize( + self, + var_continue, + label_selector, + field_selector, + limit, + summary_only, + cve_id, + _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)) + + if summary_only is not None: + + _query_params.append(('summaryOnly', summary_only)) + + if cve_id is not None: + + _query_params.append(('cveId', cve_id)) + + # 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='/devices', + 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 override_device_enrollment_hook( + self, + name: Annotated[StrictStr, Field(description="The name of the Device resource.")], + _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, + ) -> Device: + """override_device_enrollment_hook + + Manually override a failed enrollment hook condition. Only admin and operator roles may perform this action. Sets the EnrollmentHooks condition to True with reason ManualOverride, clearing the Failed state and unblocking fleet match and rendered GET. Does NOT re-approve, rotate management cert, or re-run notify. + + :param name: The name of the Device resource. (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._override_device_enrollment_hook_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': "Device", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '500': "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 override_device_enrollment_hook_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the Device resource.")], + _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[Device]: + """override_device_enrollment_hook + + Manually override a failed enrollment hook condition. Only admin and operator roles may perform this action. Sets the EnrollmentHooks condition to True with reason ManualOverride, clearing the Failed state and unblocking fleet match and rendered GET. Does NOT re-approve, rotate management cert, or re-run notify. + + :param name: The name of the Device resource. (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._override_device_enrollment_hook_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': "Device", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '500': "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 override_device_enrollment_hook_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the Device resource.")], + _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: + """override_device_enrollment_hook + + Manually override a failed enrollment hook condition. Only admin and operator roles may perform this action. Sets the EnrollmentHooks condition to True with reason ManualOverride, clearing the Failed state and unblocking fleet match and rendered GET. Does NOT re-approve, rotate management cert, or re-run notify. + + :param name: The name of the Device resource. (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._override_device_enrollment_hook_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': "Device", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '429': "Status", + '500': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _override_device_enrollment_hook_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='POST', + resource_path='/devices/{name}/enrollmenthooks/override', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/flightctl/api/enrollmenthookpolicy_api.py b/flightctl/api/enrollmenthookpolicy_api.py new file mode 100644 index 0000000..cdf34cb --- /dev/null +++ b/flightctl/api/enrollmenthookpolicy_api.py @@ -0,0 +1,1838 @@ +# 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, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy +from flightctl.models.enrollment_hook_policy_list import EnrollmentHookPolicyList +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 EnrollmenthookpolicyApi: + """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_enrollment_hook_policy( + self, + enrollment_hook_policy: EnrollmentHookPolicy, + _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, + ) -> EnrollmentHookPolicy: + """create_enrollment_hook_policy + + Create an EnrollmentHookPolicy resource. + + :param enrollment_hook_policy: (required) + :type enrollment_hook_policy: EnrollmentHookPolicy + :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_enrollment_hook_policy_serialize( + enrollment_hook_policy=enrollment_hook_policy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_with_http_info( + self, + enrollment_hook_policy: EnrollmentHookPolicy, + _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[EnrollmentHookPolicy]: + """create_enrollment_hook_policy + + Create an EnrollmentHookPolicy resource. + + :param enrollment_hook_policy: (required) + :type enrollment_hook_policy: EnrollmentHookPolicy + :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_enrollment_hook_policy_serialize( + enrollment_hook_policy=enrollment_hook_policy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_without_preload_content( + self, + enrollment_hook_policy: EnrollmentHookPolicy, + _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_enrollment_hook_policy + + Create an EnrollmentHookPolicy resource. + + :param enrollment_hook_policy: (required) + :type enrollment_hook_policy: EnrollmentHookPolicy + :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_enrollment_hook_policy_serialize( + enrollment_hook_policy=enrollment_hook_policy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_serialize( + self, + enrollment_hook_policy, + _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 enrollment_hook_policy is not None: + _body_params = enrollment_hook_policy + + + # 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='/enrollmenthookpolicies', + 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_enrollment_hook_policy( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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_enrollment_hook_policy + + Delete an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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", + '400': "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_enrollment_hook_policy_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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_enrollment_hook_policy + + Delete an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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", + '400': "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_enrollment_hook_policy_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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_enrollment_hook_policy + + Delete an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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", + '400': "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_enrollment_hook_policy_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='/enrollmenthookpolicies/{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_enrollment_hook_policy( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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, + ) -> EnrollmentHookPolicy: + """get_enrollment_hook_policy + + Get an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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': "EnrollmentHookPolicy", + '400': "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 get_enrollment_hook_policy_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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[EnrollmentHookPolicy]: + """get_enrollment_hook_policy + + Get an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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': "EnrollmentHookPolicy", + '400': "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 get_enrollment_hook_policy_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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_enrollment_hook_policy + + Get an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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': "EnrollmentHookPolicy", + '400': "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 _get_enrollment_hook_policy_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='/enrollmenthookpolicies/{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_enrollment_hook_policies( + 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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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, + ) -> EnrollmentHookPolicyList: + """list_enrollment_hook_policies + + List EnrollmentHookPolicy 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_enrollment_hook_policies_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': "EnrollmentHookPolicyList", + '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_enrollment_hook_policies_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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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[EnrollmentHookPolicyList]: + """list_enrollment_hook_policies + + List EnrollmentHookPolicy 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_enrollment_hook_policies_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': "EnrollmentHookPolicyList", + '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_enrollment_hook_policies_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[Annotated[int, Field(le=1000, strict=True, ge=0)]], 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_enrollment_hook_policies + + List EnrollmentHookPolicy 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_enrollment_hook_policies_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': "EnrollmentHookPolicyList", + '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_enrollment_hook_policies_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='/enrollmenthookpolicies', + 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_enrollment_hook_policy( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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, + ) -> EnrollmentHookPolicy: + """patch_enrollment_hook_policy + + Patch an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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[EnrollmentHookPolicy]: + """patch_enrollment_hook_policy + + Patch an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy 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_enrollment_hook_policy + + Patch an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy 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_enrollment_hook_policy_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': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_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='/enrollmenthookpolicies/{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_enrollment_hook_policy( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy resource to update.")], + enrollment_hook_policy: EnrollmentHookPolicy, + _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, + ) -> EnrollmentHookPolicy: + """replace_enrollment_hook_policy + + Update an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy resource to update. (required) + :type name: str + :param enrollment_hook_policy: (required) + :type enrollment_hook_policy: EnrollmentHookPolicy + :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_enrollment_hook_policy_serialize( + name=name, + enrollment_hook_policy=enrollment_hook_policy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnrollmentHookPolicy", + '201': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy resource to update.")], + enrollment_hook_policy: EnrollmentHookPolicy, + _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[EnrollmentHookPolicy]: + """replace_enrollment_hook_policy + + Update an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy resource to update. (required) + :type name: str + :param enrollment_hook_policy: (required) + :type enrollment_hook_policy: EnrollmentHookPolicy + :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_enrollment_hook_policy_serialize( + name=name, + enrollment_hook_policy=enrollment_hook_policy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnrollmentHookPolicy", + '201': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the EnrollmentHookPolicy resource to update.")], + enrollment_hook_policy: EnrollmentHookPolicy, + _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_enrollment_hook_policy + + Update an EnrollmentHookPolicy resource. + + :param name: The name of the EnrollmentHookPolicy resource to update. (required) + :type name: str + :param enrollment_hook_policy: (required) + :type enrollment_hook_policy: EnrollmentHookPolicy + :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_enrollment_hook_policy_serialize( + name=name, + enrollment_hook_policy=enrollment_hook_policy, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnrollmentHookPolicy", + '201': "EnrollmentHookPolicy", + '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_enrollment_hook_policy_serialize( + self, + name, + enrollment_hook_policy, + _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 enrollment_hook_policy is not None: + _body_params = enrollment_hook_policy + + + # 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='/enrollmenthookpolicies/{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/labelsyncmapping_api.py b/flightctl/api/labelsyncmapping_api.py new file mode 100644 index 0000000..edc5289 --- /dev/null +++ b/flightctl/api/labelsyncmapping_api.py @@ -0,0 +1,2095 @@ +# 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, StrictStr +from typing import List, Optional +from typing_extensions import Annotated +from flightctl.models.label_sync_mapping import LabelSyncMapping +from flightctl.models.label_sync_mapping_list import LabelSyncMappingList +from flightctl.models.label_sync_provenance_list import LabelSyncProvenanceList +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 LabelsyncmappingApi: + """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_label_sync_mapping( + self, + label_sync_mapping: LabelSyncMapping, + _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, + ) -> LabelSyncMapping: + """create_label_sync_mapping + + Create a LabelSyncMapping resource. + + :param label_sync_mapping: (required) + :type label_sync_mapping: LabelSyncMapping + :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_label_sync_mapping_serialize( + label_sync_mapping=label_sync_mapping, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '409': "Status", + '422': "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_label_sync_mapping_with_http_info( + self, + label_sync_mapping: LabelSyncMapping, + _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[LabelSyncMapping]: + """create_label_sync_mapping + + Create a LabelSyncMapping resource. + + :param label_sync_mapping: (required) + :type label_sync_mapping: LabelSyncMapping + :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_label_sync_mapping_serialize( + label_sync_mapping=label_sync_mapping, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '409': "Status", + '422': "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_label_sync_mapping_without_preload_content( + self, + label_sync_mapping: LabelSyncMapping, + _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_label_sync_mapping + + Create a LabelSyncMapping resource. + + :param label_sync_mapping: (required) + :type label_sync_mapping: LabelSyncMapping + :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_label_sync_mapping_serialize( + label_sync_mapping=label_sync_mapping, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '409': "Status", + '422': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_label_sync_mapping_serialize( + self, + label_sync_mapping, + _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 label_sync_mapping is not None: + _body_params = label_sync_mapping + + + # 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='/labelsyncmappings', + 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_label_sync_mapping( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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_label_sync_mapping + + Delete a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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", + '400': "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_label_sync_mapping_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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_label_sync_mapping + + Delete a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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", + '400': "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_label_sync_mapping_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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_label_sync_mapping + + Delete a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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", + '400': "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_label_sync_mapping_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='/labelsyncmappings/{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_label_sync_mapping( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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, + ) -> LabelSyncMapping: + """get_label_sync_mapping + + Get a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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': "LabelSyncMapping", + '400': "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 get_label_sync_mapping_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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[LabelSyncMapping]: + """get_label_sync_mapping + + Get a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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': "LabelSyncMapping", + '400': "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 get_label_sync_mapping_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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_label_sync_mapping + + Get a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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': "LabelSyncMapping", + '400': "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 _get_label_sync_mapping_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='/labelsyncmappings/{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_label_sync_provenance( + self, + label_keys: Annotated[List[Annotated[str, Field(min_length=1, strict=True)]], Field(min_length=1, max_length=50, description="Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order.")], + _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, + ) -> LabelSyncProvenanceList: + """get_label_sync_provenance + + Resolve exact label keys to their current owning LabelSyncMapping names in the request organization. Return one item per supplied key in request order, including repeated keys. Keys with no current mapping owner have an empty owners array. Label values are not returned. + + :param label_keys: Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order. (required) + :type label_keys: List[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_label_sync_provenance_serialize( + label_keys=label_keys, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncProvenanceList", + '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 get_label_sync_provenance_with_http_info( + self, + label_keys: Annotated[List[Annotated[str, Field(min_length=1, strict=True)]], Field(min_length=1, max_length=50, description="Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order.")], + _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[LabelSyncProvenanceList]: + """get_label_sync_provenance + + Resolve exact label keys to their current owning LabelSyncMapping names in the request organization. Return one item per supplied key in request order, including repeated keys. Keys with no current mapping owner have an empty owners array. Label values are not returned. + + :param label_keys: Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order. (required) + :type label_keys: List[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_label_sync_provenance_serialize( + label_keys=label_keys, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncProvenanceList", + '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 get_label_sync_provenance_without_preload_content( + self, + label_keys: Annotated[List[Annotated[str, Field(min_length=1, strict=True)]], Field(min_length=1, max_length=50, description="Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order.")], + _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_label_sync_provenance + + Resolve exact label keys to their current owning LabelSyncMapping names in the request organization. Return one item per supplied key in request order, including repeated keys. Keys with no current mapping owner have an empty owners array. Label values are not returned. + + :param label_keys: Exact label keys to resolve. Supply between 1 and 50 repeated labelKeys parameters. Repeated key values are preserved as repeated response items in request order. (required) + :type label_keys: List[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_label_sync_provenance_serialize( + label_keys=label_keys, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncProvenanceList", + '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 _get_label_sync_provenance_serialize( + self, + label_keys, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'labelKeys': 'multi', + } + + _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 label_keys is not None: + + _query_params.append(('labelKeys', label_keys)) + + # 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='/labelsyncprovenance', + 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_label_sync_mappings( + self, + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]], Field(description="The maximum number of results returned in the list response.")] = 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, + ) -> LabelSyncMappingList: + """list_label_sync_mappings + + List LabelSyncMapping resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param limit: The maximum number of results returned in the list response. + :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_label_sync_mappings_serialize( + var_continue=var_continue, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncMappingList", + '400': "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 list_label_sync_mappings_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 parameter must match the value of the 'continue' field in the previous list response.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]], Field(description="The maximum number of results returned in the list response.")] = 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[LabelSyncMappingList]: + """list_label_sync_mappings + + List LabelSyncMapping resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param limit: The maximum number of results returned in the list response. + :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_label_sync_mappings_serialize( + var_continue=var_continue, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncMappingList", + '400': "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 list_label_sync_mappings_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 parameter must match the value of the 'continue' field in the previous list response.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]], Field(description="The maximum number of results returned in the list response.")] = 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_label_sync_mappings + + List LabelSyncMapping resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the parameter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param limit: The maximum number of results returned in the list response. + :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_label_sync_mappings_serialize( + var_continue=var_continue, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncMappingList", + '400': "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 _list_label_sync_mappings_serialize( + self, + var_continue, + 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 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='/labelsyncmappings', + 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_label_sync_mapping( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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, + ) -> LabelSyncMapping: + """patch_label_sync_mapping + + Patch a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '422': "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_label_sync_mapping_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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[LabelSyncMapping]: + """patch_label_sync_mapping + + Patch a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '422': "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_label_sync_mapping_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping 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_label_sync_mapping + + Patch a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping 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_label_sync_mapping_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': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '422': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _patch_label_sync_mapping_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='/labelsyncmappings/{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_label_sync_mapping( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping resource to update.")], + label_sync_mapping: LabelSyncMapping, + _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, + ) -> LabelSyncMapping: + """replace_label_sync_mapping + + Update a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping resource to update. (required) + :type name: str + :param label_sync_mapping: (required) + :type label_sync_mapping: LabelSyncMapping + :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_label_sync_mapping_serialize( + name=name, + label_sync_mapping=label_sync_mapping, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncMapping", + '201': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '422': "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_label_sync_mapping_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping resource to update.")], + label_sync_mapping: LabelSyncMapping, + _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[LabelSyncMapping]: + """replace_label_sync_mapping + + Update a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping resource to update. (required) + :type name: str + :param label_sync_mapping: (required) + :type label_sync_mapping: LabelSyncMapping + :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_label_sync_mapping_serialize( + name=name, + label_sync_mapping=label_sync_mapping, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncMapping", + '201': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '422': "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_label_sync_mapping_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the LabelSyncMapping resource to update.")], + label_sync_mapping: LabelSyncMapping, + _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_label_sync_mapping + + Update a LabelSyncMapping resource. + + :param name: The name of the LabelSyncMapping resource to update. (required) + :type name: str + :param label_sync_mapping: (required) + :type label_sync_mapping: LabelSyncMapping + :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_label_sync_mapping_serialize( + name=name, + label_sync_mapping=label_sync_mapping, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LabelSyncMapping", + '201': "LabelSyncMapping", + '400': "Status", + '401': "Status", + '403': "Status", + '404': "Status", + '409': "Status", + '422': "Status", + '429': "Status", + '503': "Status", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _replace_label_sync_mapping_serialize( + self, + name, + label_sync_mapping, + _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 label_sync_mapping is not None: + _body_params = label_sync_mapping + + + # 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='/labelsyncmappings/{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_client.py b/flightctl/api_client.py index 753e9b8..96e7763 100644 --- a/flightctl/api_client.py +++ b/flightctl/api_client.py @@ -92,7 +92,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.3.0/python' + self.user_agent = 'OpenAPI-Generator/1.4.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/flightctl/configuration.py b/flightctl/configuration.py index 6009acf..4835f13 100644 --- a/flightctl/configuration.py +++ b/flightctl/configuration.py @@ -545,7 +545,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v1beta1\n"\ - "SDK Package Version: 1.3.0".\ + "SDK Package Version: 1.4.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/flightctl/imagebuilder/__init__.py b/flightctl/imagebuilder/__init__.py index 04c24e3..0ed5cfa 100644 --- a/flightctl/imagebuilder/__init__.py +++ b/flightctl/imagebuilder/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.3.0" +__version__ = "1.4.0" # Define package exports __all__ = [ diff --git a/flightctl/imagebuilder/api_client.py b/flightctl/imagebuilder/api_client.py index 6347bd6..8c8f804 100644 --- a/flightctl/imagebuilder/api_client.py +++ b/flightctl/imagebuilder/api_client.py @@ -92,7 +92,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.3.0/python' + self.user_agent = 'OpenAPI-Generator/1.4.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/flightctl/imagebuilder/configuration.py b/flightctl/imagebuilder/configuration.py index c2bd005..c4c17ed 100644 --- a/flightctl/imagebuilder/configuration.py +++ b/flightctl/imagebuilder/configuration.py @@ -545,7 +545,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v1alpha1\n"\ - "SDK Package Version: 1.3.0".\ + "SDK Package Version: 1.4.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/flightctl/imagebuilder/docs/ConditionBase.md b/flightctl/imagebuilder/docs/ConditionBase.md index 3aff47c..709339a 100644 --- a/flightctl/imagebuilder/docs/ConditionBase.md +++ b/flightctl/imagebuilder/docs/ConditionBase.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | ## Example diff --git a/flightctl/imagebuilder/docs/ImageBuildCondition.md b/flightctl/imagebuilder/docs/ImageBuildCondition.md index ec45f90..2b58d32 100644 --- a/flightctl/imagebuilder/docs/ImageBuildCondition.md +++ b/flightctl/imagebuilder/docs/ImageBuildCondition.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | **type** | [**ImageBuildConditionType**](ImageBuildConditionType.md) | | ## Example diff --git a/flightctl/imagebuilder/docs/ImageExportCondition.md b/flightctl/imagebuilder/docs/ImageExportCondition.md index 6401fd1..152a7cd 100644 --- a/flightctl/imagebuilder/docs/ImageExportCondition.md +++ b/flightctl/imagebuilder/docs/ImageExportCondition.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | **type** | [**ImageExportConditionType**](ImageExportConditionType.md) | | ## Example diff --git a/flightctl/imagebuilder/docs/ImagePromotionCondition.md b/flightctl/imagebuilder/docs/ImagePromotionCondition.md index f6455bc..3028079 100644 --- a/flightctl/imagebuilder/docs/ImagePromotionCondition.md +++ b/flightctl/imagebuilder/docs/ImagePromotionCondition.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | **type** | [**ImagePromotionConditionType**](ImagePromotionConditionType.md) | | ## Example diff --git a/flightctl/imagebuilder/models/condition_base.py b/flightctl/imagebuilder/models/condition_base.py index bbc8250..f21ecdc 100644 --- a/flightctl/imagebuilder/models/condition_base.py +++ b/flightctl/imagebuilder/models/condition_base.py @@ -32,8 +32,8 @@ class ConditionBase(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason"] model_config = ConfigDict( diff --git a/flightctl/imagebuilder/models/image_build_condition.py b/flightctl/imagebuilder/models/image_build_condition.py index 9c5fe7c..6705300 100644 --- a/flightctl/imagebuilder/models/image_build_condition.py +++ b/flightctl/imagebuilder/models/image_build_condition.py @@ -33,8 +33,8 @@ class ImageBuildCondition(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") type: ImageBuildConditionType __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason", "type"] diff --git a/flightctl/imagebuilder/models/image_export_condition.py b/flightctl/imagebuilder/models/image_export_condition.py index 8ed30a4..3cf4a6c 100644 --- a/flightctl/imagebuilder/models/image_export_condition.py +++ b/flightctl/imagebuilder/models/image_export_condition.py @@ -33,8 +33,8 @@ class ImageExportCondition(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") type: ImageExportConditionType __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason", "type"] diff --git a/flightctl/imagebuilder/models/image_promotion_condition.py b/flightctl/imagebuilder/models/image_promotion_condition.py index a0b4b50..5269397 100644 --- a/flightctl/imagebuilder/models/image_promotion_condition.py +++ b/flightctl/imagebuilder/models/image_promotion_condition.py @@ -33,8 +33,8 @@ class ImagePromotionCondition(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") type: ImagePromotionConditionType __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason", "type"] diff --git a/flightctl/imagebuilder_README.md b/flightctl/imagebuilder_README.md index b8cf1de..54464db 100644 --- a/flightctl/imagebuilder_README.md +++ b/flightctl/imagebuilder_README.md @@ -4,7 +4,7 @@ Image Builder service for Flight Control. This service manages image build resou The `flightctl.imagebuilder` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1alpha1 -- Package version: 1.3.0 +- Package version: 1.4.0 - Generator version: 7.17.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://flightctl.io](https://flightctl.io) diff --git a/flightctl/models/__init__.py b/flightctl/models/__init__.py index d773609..1707b2a 100644 --- a/flightctl/models/__init__.py +++ b/flightctl/models/__init__.py @@ -21,6 +21,7 @@ from flightctl.models.application_content import ApplicationContent from flightctl.models.application_desired_state import ApplicationDesiredState from flightctl.models.application_env_vars import ApplicationEnvVars +from flightctl.models.application_image_digest import ApplicationImageDigest from flightctl.models.application_lifecycle_changed_details import ApplicationLifecycleChangedDetails from flightctl.models.application_provider_base import ApplicationProviderBase from flightctl.models.application_provider_spec import ApplicationProviderSpec @@ -66,6 +67,9 @@ from flightctl.models.container_application import ContainerApplication from flightctl.models.container_application_properties import ContainerApplicationProperties from flightctl.models.cpu_resource_monitor_spec import CpuResourceMonitorSpec +from flightctl.models.delta_generation_phase import DeltaGenerationPhase +from flightctl.models.delta_generation_progress_details import DeltaGenerationProgressDetails +from flightctl.models.delta_generation_status import DeltaGenerationStatus from flightctl.models.dependency_change_detected_details import DependencyChangeDetectedDetails from flightctl.models.dependency_sync_config_ref_status import DependencySyncConfigRefStatus from flightctl.models.dependency_sync_probe_failed_details import DependencySyncProbeFailedDetails @@ -78,10 +82,15 @@ 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_delta_apply_outcome_type import DeviceDeltaApplyOutcomeType +from flightctl.models.device_delta_apply_status import DeviceDeltaApplyStatus +from flightctl.models.device_enrollment_hooks_status import DeviceEnrollmentHooksStatus +from flightctl.models.device_gpu import DeviceGpu 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_kvm import DeviceKvm 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 @@ -89,6 +98,7 @@ 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 @@ -101,6 +111,9 @@ 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_system_info_status import DeviceSystemInfoStatus +from flightctl.models.device_system_info_statuses import DeviceSystemInfoStatuses +from flightctl.models.device_system_info_summary_status import DeviceSystemInfoSummaryStatus 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 @@ -112,6 +125,16 @@ from flightctl.models.docker_auth import DockerAuth from flightctl.models.encoding_type import EncodingType from flightctl.models.enrollment_config import EnrollmentConfig +from flightctl.models.enrollment_hook_auth import EnrollmentHookAuth +from flightctl.models.enrollment_hook_http_action import EnrollmentHookHttpAction +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy +from flightctl.models.enrollment_hook_policy_list import EnrollmentHookPolicyList +from flightctl.models.enrollment_hook_policy_spec import EnrollmentHookPolicySpec +from flightctl.models.enrollment_hook_policy_status import EnrollmentHookPolicyStatus +from flightctl.models.enrollment_hook_retry_policy import EnrollmentHookRetryPolicy +from flightctl.models.enrollment_hook_snapshot import EnrollmentHookSnapshot +from flightctl.models.enrollment_hook_snapshot_action import EnrollmentHookSnapshotAction +from flightctl.models.enrollment_hook_stage_spec import EnrollmentHookStageSpec from flightctl.models.enrollment_request import EnrollmentRequest from flightctl.models.enrollment_request_approval import EnrollmentRequestApproval from flightctl.models.enrollment_request_approval_status import EnrollmentRequestApprovalStatus @@ -125,6 +148,7 @@ from flightctl.models.event_details import EventDetails from flightctl.models.event_list import EventList from flightctl.models.event_source import EventSource +from flightctl.models.failure_policy_type import FailurePolicyType from flightctl.models.file_content import FileContent from flightctl.models.file_metadata import FileMetadata from flightctl.models.file_operation import FileOperation @@ -154,6 +178,7 @@ 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_delta_hint import ImageDeltaHint from flightctl.models.image_mount_volume_provider_spec import ImageMountVolumeProviderSpec from flightctl.models.image_or_catalog_item_ref_spec import ImageOrCatalogItemRefSpec from flightctl.models.image_pull_policy import ImagePullPolicy @@ -169,6 +194,12 @@ 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.label_sync_mapping import LabelSyncMapping +from flightctl.models.label_sync_mapping_list import LabelSyncMappingList +from flightctl.models.label_sync_mapping_spec import LabelSyncMappingSpec +from flightctl.models.label_sync_mapping_status import LabelSyncMappingStatus +from flightctl.models.label_sync_provenance_item import LabelSyncProvenanceItem +from flightctl.models.label_sync_provenance_list import LabelSyncProvenanceList from flightctl.models.list_meta import ListMeta from flightctl.models.match_expression import MatchExpression from flightctl.models.memory_resource_monitor_spec import MemoryResourceMonitorSpec @@ -188,6 +219,9 @@ from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.models.permission import Permission from flightctl.models.permission_list import PermissionList +from flightctl.models.pre_enrollment_action_result import PreEnrollmentActionResult +from flightctl.models.pre_enrollment_result import PreEnrollmentResult +from flightctl.models.prepare_deltas_details import PrepareDeltasDetails from flightctl.models.quadlet_application import QuadletApplication from flightctl.models.referenced_repository_updated_details import ReferencedRepositoryUpdatedDetails from flightctl.models.relative_path import RelativePath @@ -210,9 +244,13 @@ from flightctl.models.resource_updated_details import ResourceUpdatedDetails from flightctl.models.rfc7662_introspection_spec import Rfc7662IntrospectionSpec from flightctl.models.rollout_policy import RolloutPolicy +from flightctl.models.rollout_policy_delta_generation import RolloutPolicyDeltaGeneration from flightctl.models.rollout_strategy import RolloutStrategy from flightctl.models.ssh_config import SshConfig from flightctl.models.status import Status +from flightctl.models.system_info_source_status import SystemInfoSourceStatus +from flightctl.models.system_info_source_status_type import SystemInfoSourceStatusType +from flightctl.models.system_info_summary_status_type import SystemInfoSummaryStatusType 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 diff --git a/flightctl/models/application_image_digest.py b/flightctl/models/application_image_digest.py new file mode 100644 index 0000000..2e1060a --- /dev/null +++ b/flightctl/models/application_image_digest.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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationImageDigest(BaseModel): + """ + An image reference and its known registry image digest. + """ # noqa: E501 + image: StrictStr = Field(description="Image reference as it appears in the rendered application spec.") + digest: Optional[StrictStr] = Field(default=None, description="Registry digest associated with this image. If the runtime identifies a platform-specific image, this may differ from the digest in the image reference. Omitted when unavailable.") + __properties: ClassVar[List[str]] = ["image", "digest"] + + 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 ApplicationImageDigest 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 ApplicationImageDigest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "image": obj.get("image"), + "digest": obj.get("digest") + }) + return _obj diff --git a/flightctl/models/compose_application.py b/flightctl/models/compose_application.py index 9b4838b..5681691 100644 --- a/flightctl/models/compose_application.py +++ b/flightctl/models/compose_application.py @@ -25,6 +25,7 @@ from flightctl.models.application_desired_state import ApplicationDesiredState from flightctl.models.application_volume import ApplicationVolume from flightctl.models.catalog_item_ref_spec import CatalogItemRefSpec +from flightctl.models.image_delta_hint import ImageDeltaHint from typing import Optional, Set from typing_extensions import Self @@ -40,9 +41,11 @@ class ComposeApplication(BaseModel): 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") volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") image: StrictStr = Field(description="Reference to an OCI image or artifact with tag.") + delta_image: Optional[StrictStr] = Field(default=None, description="Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImage") + delta_images: Optional[List[ImageDeltaHint]] = Field(default=None, description="Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImages") catalog_item_ref: CatalogItemRefSpec = Field(alias="catalogItemRef") inline: List[ApplicationContent] = Field(description="A list of application content.") - __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "envVars", "volumes", "image", "catalogItemRef", "inline"] + __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "envVars", "volumes", "image", "deltaImage", "deltaImages", "catalogItemRef", "inline"] model_config = ConfigDict( populate_by_name=True, @@ -77,11 +80,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "annotations", "desired_state", "restart_generation", + "delta_image", + "delta_images", ]) _dict = self.model_dump( @@ -96,6 +103,13 @@ 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 each item in delta_images (list) + _items = [] + if self.delta_images: + for _item_delta_images in self.delta_images: + if _item_delta_images: + _items.append(_item_delta_images.to_dict()) + _dict['deltaImages'] = _items # override the default output from pydantic by calling `to_dict()` of catalog_item_ref if self.catalog_item_ref: _dict['catalogItemRef'] = self.catalog_item_ref.to_dict() @@ -126,6 +140,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "envVars": obj.get("envVars"), "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, "image": obj.get("image"), + "deltaImage": obj.get("deltaImage"), + "deltaImages": [ImageDeltaHint.from_dict(_item) for _item in obj["deltaImages"]] if obj.get("deltaImages") is not None else None, "catalogItemRef": CatalogItemRefSpec.from_dict(obj["catalogItemRef"]) if obj.get("catalogItemRef") is not None else None, "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None }) diff --git a/flightctl/models/condition.py b/flightctl/models/condition.py index 3fc79b5..ef9d36c 100644 --- a/flightctl/models/condition.py +++ b/flightctl/models/condition.py @@ -33,8 +33,8 @@ class Condition(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") type: ConditionType __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason", "type"] diff --git a/flightctl/models/condition_base.py b/flightctl/models/condition_base.py index a65fe08..63a6649 100644 --- a/flightctl/models/condition_base.py +++ b/flightctl/models/condition_base.py @@ -32,8 +32,8 @@ class ConditionBase(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason"] model_config = ConfigDict( diff --git a/flightctl/models/condition_type.py b/flightctl/models/condition_type.py index c49b4d7..219ef5a 100644 --- a/flightctl/models/condition_type.py +++ b/flightctl/models/condition_type.py @@ -37,12 +37,17 @@ class ConditionType(str, Enum): ResourceSyncAccessible = 'Accessible' ResourceSyncResourceParsed = 'ResourceParsed' ResourceSyncSynced = 'Synced' + LabelSyncMappingReady = 'Ready' FleetValid = 'Valid' FleetRolloutInProgress = 'RolloutInProgress' DeviceUpdating = 'Updating' DeviceSpecValid = 'SpecValid' DeviceMultipleOwners = 'MultipleOwners' + DeviceLabelsSynced = 'LabelsSynced' DeviceDecommissioning = 'DeviceDecommissioning' + FleetDeltaPreparing = 'FleetDeltaPreparing' + DeviceDeltaPreparing = 'DeviceDeltaPreparing' + DeviceEnrollmentHooks = 'EnrollmentHooks' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/container_application.py b/flightctl/models/container_application.py index 2e8e91c..5a8ce58 100644 --- a/flightctl/models/container_application.py +++ b/flightctl/models/container_application.py @@ -26,6 +26,7 @@ from flightctl.models.application_resources import ApplicationResources from flightctl.models.application_volume import ApplicationVolume from flightctl.models.catalog_item_ref_spec import CatalogItemRefSpec +from flightctl.models.image_delta_hint import ImageDeltaHint from typing import Optional, Set from typing_extensions import Self @@ -42,10 +43,12 @@ class ContainerApplication(BaseModel): run_as: Optional[StrictStr] = Field(default=None, description="The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified.", alias="runAs") volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") image: StrictStr = Field(description="Reference to an OCI image or artifact with tag.") + delta_image: Optional[StrictStr] = Field(default=None, description="Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImage") + delta_images: Optional[List[ImageDeltaHint]] = Field(default=None, description="Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry identifies a target image reference and digest and names its delta artifact reference. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImages") catalog_item_ref: CatalogItemRefSpec = Field(alias="catalogItemRef") ports: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="Port mappings.") resources: Optional[ApplicationResources] = None - __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "envVars", "runAs", "volumes", "image", "catalogItemRef", "ports", "resources"] + __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "envVars", "runAs", "volumes", "image", "deltaImage", "deltaImages", "catalogItemRef", "ports", "resources"] model_config = ConfigDict( populate_by_name=True, @@ -80,11 +83,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "annotations", "desired_state", "restart_generation", + "delta_image", + "delta_images", ]) _dict = self.model_dump( @@ -99,6 +106,13 @@ 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 each item in delta_images (list) + _items = [] + if self.delta_images: + for _item_delta_images in self.delta_images: + if _item_delta_images: + _items.append(_item_delta_images.to_dict()) + _dict['deltaImages'] = _items # override the default output from pydantic by calling `to_dict()` of catalog_item_ref if self.catalog_item_ref: _dict['catalogItemRef'] = self.catalog_item_ref.to_dict() @@ -126,6 +140,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "runAs": obj.get("runAs"), "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, "image": obj.get("image"), + "deltaImage": obj.get("deltaImage"), + "deltaImages": [ImageDeltaHint.from_dict(_item) for _item in obj["deltaImages"]] if obj.get("deltaImages") is not None else None, "catalogItemRef": CatalogItemRefSpec.from_dict(obj["catalogItemRef"]) if obj.get("catalogItemRef") is not None else None, "ports": obj.get("ports"), "resources": ApplicationResources.from_dict(obj["resources"]) if obj.get("resources") is not None else None diff --git a/flightctl/models/delta_generation_phase.py b/flightctl/models/delta_generation_phase.py new file mode 100644 index 0000000..805f8bf --- /dev/null +++ b/flightctl/models/delta_generation_phase.py @@ -0,0 +1,39 @@ +# 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 DeltaGenerationPhase(str, Enum): + """ + Current step of control-plane delta generation for the in-flight pair. + """ + + """ + allowed enum values + """ + DeltaGenerationPhaseCheckingExisting = 'checkingExisting' + DeltaGenerationPhasePullSource = 'pullSource' + DeltaGenerationPhasePullTarget = 'pullTarget' + DeltaGenerationPhaseCreateDelta = 'createDelta' + DeltaGenerationPhasePush = 'push' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DeltaGenerationPhase from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/models/delta_generation_progress_details.py b/flightctl/models/delta_generation_progress_details.py new file mode 100644 index 0000000..51607c7 --- /dev/null +++ b/flightctl/models/delta_generation_progress_details.py @@ -0,0 +1,116 @@ +# 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_extensions import Annotated +from flightctl.models.delta_generation_phase import DeltaGenerationPhase +from typing import Optional, Set +from typing_extensions import Self + +class DeltaGenerationProgressDetails(BaseModel): + """ + Structured details for DeltaGenerationProgress events. One event when a pair enters a phase or becomes terminal, fanned out to each waiting Fleet or standalone Device. Not a percent heartbeat. + """ # noqa: E501 + detail_type: StrictStr = Field(description="The type of detail for discriminator purposes.", alias="detailType") + image_repository: StrictStr = Field(description="Image repository (host/namespace/name) for this pair.", alias="imageRepository") + source_digest: StrictStr = Field(description="Current image digest.", alias="sourceDigest") + target_digest: StrictStr = Field(description="Target image digest.", alias="targetDigest") + generation_status: StrictStr = Field(description="Generation row status for this pair.", alias="generationStatus") + phase: Optional[DeltaGenerationPhase] = None + template_version: Optional[StrictStr] = Field(default=None, description="Fleet only. The TemplateVersion this prepare is for.", alias="templateVersion") + generation: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Device only. The desired spec generation this prepare is for.") + __properties: ClassVar[List[str]] = ["detailType", "imageRepository", "sourceDigest", "targetDigest", "generationStatus", "phase", "templateVersion", "generation"] + + @field_validator('detail_type') + def detail_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['DeltaGenerationProgress']): + raise ValueError("must be one of enum values ('DeltaGenerationProgress')") + return value + + @field_validator('generation_status') + def generation_status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['in_progress', 'succeeded', 'failed', 'rejected']): + raise ValueError("must be one of enum values ('in_progress', 'succeeded', 'failed', 'rejected')") + 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 DeltaGenerationProgressDetails 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 DeltaGenerationProgressDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "detailType": obj.get("detailType"), + "imageRepository": obj.get("imageRepository"), + "sourceDigest": obj.get("sourceDigest"), + "targetDigest": obj.get("targetDigest"), + "generationStatus": obj.get("generationStatus"), + "phase": obj.get("phase"), + "templateVersion": obj.get("templateVersion"), + "generation": obj.get("generation") + }) + return _obj diff --git a/flightctl/models/delta_generation_status.py b/flightctl/models/delta_generation_status.py new file mode 100644 index 0000000..c261ecc --- /dev/null +++ b/flightctl/models/delta_generation_status.py @@ -0,0 +1,91 @@ +# 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DeltaGenerationStatus(BaseModel): + """ + Pair counts (completed/total) for a prepare in flight. Per-pair phase is one DeltaGenerationProgress event per step, not a percent heartbeat. Condition messages carry the same completed/total counts. + """ # noqa: E501 + completed: StrictInt = Field(description="Number of joined generation pairs that are already terminal.") + total: StrictInt = Field(description="Number of unique generation pairs in this prepare.") + last_updated: Optional[datetime] = Field(default=None, description="Time of the last completed/total write for this prepare.", alias="lastUpdated") + __properties: ClassVar[List[str]] = ["completed", "total", "lastUpdated"] + + 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 DeltaGenerationStatus 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 DeltaGenerationStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "completed": obj.get("completed"), + "total": obj.get("total"), + "lastUpdated": obj.get("lastUpdated") + }) + return _obj diff --git a/flightctl/models/device_application_status.py b/flightctl/models/device_application_status.py index 659f053..7c0cca8 100644 --- a/flightctl/models/device_application_status.py +++ b/flightctl/models/device_application_status.py @@ -21,8 +21,10 @@ 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_image_digest import ApplicationImageDigest from flightctl.models.application_status_type import ApplicationStatusType from flightctl.models.application_volume_status import ApplicationVolumeStatus +from flightctl.models.device_delta_apply_status import DeviceDeltaApplyStatus from typing import Optional, Set from typing_extensions import Self @@ -38,7 +40,10 @@ class DeviceApplicationStatus(BaseModel): app_type: AppType = Field(alias="appType") run_as: Optional[StrictStr] = Field(default=None, description="The username of the system user this application is runing under. If blank, the application is run as the same user as the agent (generally root).", alias="runAs") volumes: Optional[List[ApplicationVolumeStatus]] = Field(default=None, description="Status of volumes used by this application.") - __properties: ClassVar[List[str]] = ["name", "ready", "restarts", "status", "embedded", "appType", "runAs", "volumes"] + last_delta: Optional[DeviceDeltaApplyStatus] = Field(default=None, alias="lastDelta") + image_digests: Optional[List[ApplicationImageDigest]] = Field(default=None, description="Image references this application uses and the registry digest associated with each image. image is the ref from the current rendered spec (tag or digest). For a multi-platform index, digest is the platform-specific manifest selected by the runtime when available; if the runtime exposes only an opaque ID, an immutable image reference's digest may be reported. digest is omitted when no registry digest is known.", alias="imageDigests") + delta_size: Optional[StrictStr] = Field(default=None, description="Expected total size of control-plane generated delta images for this application update in IEC units (e.g. \"245.3 MiB\", \"1 GiB\"). Computed as the sum of generated delta image sizes across the application. Absent when no delta image was generated or any generated delta image size is unknown. Full image sizes are not included.", alias="deltaSize") + __properties: ClassVar[List[str]] = ["name", "ready", "restarts", "status", "embedded", "appType", "runAs", "volumes", "lastDelta", "imageDigests", "deltaSize"] model_config = ConfigDict( populate_by_name=True, @@ -86,6 +91,16 @@ 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 last_delta + if self.last_delta: + _dict['lastDelta'] = self.last_delta.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in image_digests (list) + _items = [] + if self.image_digests: + for _item_image_digests in self.image_digests: + if _item_image_digests: + _items.append(_item_image_digests.to_dict()) + _dict['imageDigests'] = _items return _dict @classmethod @@ -105,7 +120,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "embedded": obj.get("embedded"), "appType": obj.get("appType"), "runAs": obj.get("runAs"), - "volumes": [ApplicationVolumeStatus.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None + "volumes": [ApplicationVolumeStatus.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "lastDelta": DeviceDeltaApplyStatus.from_dict(obj["lastDelta"]) if obj.get("lastDelta") is not None else None, + "imageDigests": [ApplicationImageDigest.from_dict(_item) for _item in obj["imageDigests"]] if obj.get("imageDigests") is not None else None, + "deltaSize": obj.get("deltaSize") }) return _obj diff --git a/flightctl/models/device_capabilities.py b/flightctl/models/device_capabilities.py index 7a47e37..bcc905a 100644 --- a/flightctl/models/device_capabilities.py +++ b/flightctl/models/device_capabilities.py @@ -28,7 +28,7 @@ class DeviceCapabilities(BaseModel): """ Capabilities reported by the device agent. """ # noqa: E501 - os_mode: Optional[OsModeType] = Field(default=None, alias="osMode") + os_mode: Optional[OsModeType] = Field(default=None, description="Deprecated since v1.4 and will be removed in a future release. Use status.systemInfo.osMode instead. The service reads status.systemInfo.osMode and only falls back to this field for devices reported by older agents that do not populate systemInfo.", alias="osMode") __properties: ClassVar[List[str]] = ["osMode"] model_config = ConfigDict( diff --git a/flightctl/models/device_delta_apply_outcome_type.py b/flightctl/models/device_delta_apply_outcome_type.py new file mode 100644 index 0000000..c39fa5f --- /dev/null +++ b/flightctl/models/device_delta_apply_outcome_type.py @@ -0,0 +1,39 @@ +# 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 DeviceDeltaApplyOutcomeType(str, Enum): + """ + Result reported by the agent for an update target. NotRequired means the existing target image satisfies the agent's image pull rules, so no delta or pull was needed. NotUsed means the agent skipped delta application without a delta-apply failure; it may still use a full image pull. Applied means all delta work for the target succeeded. Fallback means a delta attempt failed and the agent attempted a full image pull. Partial means an application applied at least one delta while another image target used a full image pull or skipped delta application. + """ + + """ + allowed enum values + """ + DeviceDeltaApplyOutcomeNotUsed = 'NotUsed' + DeviceDeltaApplyOutcomeNotRequired = 'NotRequired' + DeviceDeltaApplyOutcomeApplied = 'Applied' + DeviceDeltaApplyOutcomeFallback = 'Fallback' + DeviceDeltaApplyOutcomePartial = 'Partial' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DeviceDeltaApplyOutcomeType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/models/device_delta_apply_status.py b/flightctl/models/device_delta_apply_status.py new file mode 100644 index 0000000..bd07c1d --- /dev/null +++ b/flightctl/models/device_delta_apply_status.py @@ -0,0 +1,89 @@ +# 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.device_delta_apply_outcome_type import DeviceDeltaApplyOutcomeType +from typing import Optional, Set +from typing_extensions import Self + +class DeviceDeltaApplyStatus(BaseModel): + """ + Agent-reported result for delta apply attempts for this update target. For an application with multiple image targets, the outcome is aggregated across image targets. The lastDelta field is omitted until the agent reports an outcome; server-side delta preparation is reported separately. + """ # noqa: E501 + outcome: DeviceDeltaApplyOutcomeType + fallback_reason: Optional[StrictStr] = Field(default=None, description="Set when one or more delta attempts failed and the agent attempted a full image pull. For an application with multiple image targets, this reports one representative failure reason.", alias="fallbackReason") + __properties: ClassVar[List[str]] = ["outcome", "fallbackReason"] + + 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 DeviceDeltaApplyStatus 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 DeviceDeltaApplyStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "outcome": obj.get("outcome"), + "fallbackReason": obj.get("fallbackReason") + }) + return _obj diff --git a/flightctl/models/device_enrollment_hooks_status.py b/flightctl/models/device_enrollment_hooks_status.py new file mode 100644 index 0000000..b8725b7 --- /dev/null +++ b/flightctl/models/device_enrollment_hooks_status.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 +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.enrollment_hook_snapshot import EnrollmentHookSnapshot +from typing import Optional, Set +from typing_extensions import Self + +class DeviceEnrollmentHooksStatus(BaseModel): + """ + Enrollment hooks state for a device. + """ # noqa: E501 + snapshot: Optional[EnrollmentHookSnapshot] = None + __properties: ClassVar[List[str]] = ["snapshot"] + + 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 DeviceEnrollmentHooksStatus 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 snapshot + if self.snapshot: + _dict['snapshot'] = self.snapshot.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceEnrollmentHooksStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "snapshot": EnrollmentHookSnapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) + return _obj diff --git a/flightctl/models/device_gpu.py b/flightctl/models/device_gpu.py new file mode 100644 index 0000000..e20b721 --- /dev/null +++ b/flightctl/models/device_gpu.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DeviceGpu(BaseModel): + """ + Information about a GPU device discovered on the device. + """ # noqa: E501 + index: StrictInt = Field(description="Zero-based enumeration index of the GPU on the system, assigned in PCI bus discovery order.") + vendor: Optional[StrictStr] = Field(default=None, description="The GPU vendor name (e.g., \"NVIDIA\", \"AMD\", \"Intel\").") + model: Optional[StrictStr] = Field(default=None, description="The GPU model name (e.g., \"RTX 4090\", \"GA10B\").") + pci_device_id: Optional[StrictStr] = Field(default=None, description="PCI device ID of the GPU, as read from the PCI configuration register (e.g., \"0x2717\").", alias="pciDeviceId") + pci_address: Optional[StrictStr] = Field(default=None, description="PCI bus address in BDF notation (e.g., \"0000:01:00.0\").", alias="pciAddress") + pci_revision_id: Optional[StrictStr] = Field(default=None, description="PCI revision ID of the GPU (e.g., \"0xa1\").", alias="pciRevisionId") + pci_vendor_id: Optional[StrictStr] = Field(default=None, description="PCI vendor ID of the GPU (e.g., \"0x10de\" for NVIDIA).", alias="pciVendorId") + memory_bytes: Optional[StrictInt] = Field(default=None, description="The amount of GPU memory in bytes.", alias="memoryBytes") + arch: Optional[StrictStr] = Field(default=None, description="GPU microarchitecture generation name as defined in the hardware map or platform lookup table (e.g., \"Ada\", \"Ampere\", \"Volta\", \"Maxwell\" for NVIDIA; \"RDNA3\", \"CDNA3\" for AMD). This is the vendor marketing name for the GPU microarchitecture, not the host CPU ISA or a compute-capability version string.") + features: Optional[List[StrictStr]] = Field(default=None, description="Vendor-specific GPU capability identifiers sourced from the hardware map. Values are lowercase tokens describing supported compute or display features (e.g., \"cuda\", \"rocm\", \"opencl\", \"sriov\", \"mig\"). The vocabulary is extensible and determined by the hardware map; no fixed enum is enforced.") + __properties: ClassVar[List[str]] = ["index", "vendor", "model", "pciDeviceId", "pciAddress", "pciRevisionId", "pciVendorId", "memoryBytes", "arch", "features"] + + 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 DeviceGpu 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 DeviceGpu from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "vendor": obj.get("vendor"), + "model": obj.get("model"), + "pciDeviceId": obj.get("pciDeviceId"), + "pciAddress": obj.get("pciAddress"), + "pciRevisionId": obj.get("pciRevisionId"), + "pciVendorId": obj.get("pciVendorId"), + "memoryBytes": obj.get("memoryBytes"), + "arch": obj.get("arch"), + "features": obj.get("features") + }) + return _obj diff --git a/flightctl/models/device_kvm.py b/flightctl/models/device_kvm.py new file mode 100644 index 0000000..f9b5f71 --- /dev/null +++ b/flightctl/models/device_kvm.py @@ -0,0 +1,86 @@ +# 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 +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class DeviceKvm(BaseModel): + """ + KVM virtualization information reported by the device. + """ # noqa: E501 + enabled: Optional[StrictBool] = Field(default=None, description="Whether KVM virtualization is active and available on the device.") + __properties: ClassVar[List[str]] = ["enabled"] + + 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 DeviceKvm 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 DeviceKvm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "enabled": obj.get("enabled") + }) + return _obj diff --git a/flightctl/models/device_lifecycle_hook_type.py b/flightctl/models/device_lifecycle_hook_type.py index d514534..293b8bc 100644 --- a/flightctl/models/device_lifecycle_hook_type.py +++ b/flightctl/models/device_lifecycle_hook_type.py @@ -31,6 +31,8 @@ class DeviceLifecycleHookType(str, Enum): DeviceLifecycleHookAfterUpdating = 'AfterUpdating' DeviceLifecycleHookBeforeRebooting = 'BeforeRebooting' DeviceLifecycleHookAfterRebooting = 'AfterRebooting' + DeviceLifecycleHookBeforeEnrolling = 'BeforeEnrolling' + DeviceLifecycleHookAfterEnrolling = 'AfterEnrolling' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/device_os_spec.py b/flightctl/models/device_os_spec.py index f509ef6..53b7dfe 100644 --- a/flightctl/models/device_os_spec.py +++ b/flightctl/models/device_os_spec.py @@ -19,16 +19,19 @@ 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.catalog_item_ref_spec import CatalogItemRefSpec from typing import Optional, Set from typing_extensions import Self class DeviceOsSpec(BaseModel): """ - DeviceOsSpec describes the target OS for the device. + Either a specific OCI image reference, or a reference to a catalog item version that can be resolved to an OCI image ref. """ # noqa: E501 - image: StrictStr = Field(description="The target OS image name or URL.") - __properties: ClassVar[List[str]] = ["image"] + image: Optional[StrictStr] = Field(default=None, description="Reference to an OCI image or artifact with tag.") + catalog_item_ref: Optional[CatalogItemRefSpec] = Field(default=None, alias="catalogItemRef") + delta_image: Optional[StrictStr] = Field(default=None, description="Optional hint: a reference to a delta artifact the control plane's generation records indicate may be applicable to reach `image` from this device's current image. Absent does not imply no delta exists — the device independently discovers candidate delta artifacts (e.g. deltas published by a customer's own CI) regardless of this field, and falls back to a full pull only if none is usable. Read-only: generated by the control plane and only present in the rendered device spec delivered to the agent.", alias="deltaImage") + __properties: ClassVar[List[str]] = ["image", "catalogItemRef", "deltaImage"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ + "delta_image", ]) _dict = self.model_dump( @@ -69,6 +74,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of catalog_item_ref + if self.catalog_item_ref: + _dict['catalogItemRef'] = self.catalog_item_ref.to_dict() return _dict @classmethod @@ -81,7 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "image": obj.get("image") + "image": obj.get("image"), + "catalogItemRef": CatalogItemRefSpec.from_dict(obj["catalogItemRef"]) if obj.get("catalogItemRef") is not None else None, + "deltaImage": obj.get("deltaImage") }) return _obj diff --git a/flightctl/models/device_os_status.py b/flightctl/models/device_os_status.py index 5721d1e..9f8418e 100644 --- a/flightctl/models/device_os_status.py +++ b/flightctl/models/device_os_status.py @@ -19,7 +19,8 @@ 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.device_delta_apply_status import DeviceDeltaApplyStatus from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,9 @@ class DeviceOsStatus(BaseModel): """ # noqa: E501 image: StrictStr = Field(description="Version of the OS image.") image_digest: StrictStr = Field(description="The digest of the OS image (e.g. sha256:a0...).", alias="imageDigest") - __properties: ClassVar[List[str]] = ["image", "imageDigest"] + delta_size: Optional[StrictStr] = Field(default=None, description="Size of the control-plane generated OS delta image in IEC units (e.g. \"245.3 MiB\", \"1 GiB\"). Absent when no delta image was generated or its size is unknown.", alias="deltaSize") + last_delta: Optional[DeviceDeltaApplyStatus] = Field(default=None, alias="lastDelta") + __properties: ClassVar[List[str]] = ["image", "imageDigest", "deltaSize", "lastDelta"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +73,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of last_delta + if self.last_delta: + _dict['lastDelta'] = self.last_delta.to_dict() return _dict @classmethod @@ -83,7 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "image": obj.get("image"), - "imageDigest": obj.get("imageDigest") + "imageDigest": obj.get("imageDigest"), + "deltaSize": obj.get("deltaSize"), + "lastDelta": DeviceDeltaApplyStatus.from_dict(obj["lastDelta"]) if obj.get("lastDelta") is not None else None }) return _obj diff --git a/flightctl/models/device_spec.py b/flightctl/models/device_spec.py index b1ef4db..3e27a39 100644 --- a/flightctl/models/device_spec.py +++ b/flightctl/models/device_spec.py @@ -24,9 +24,9 @@ from flightctl.models.config_provider_spec import ConfigProviderSpec from flightctl.models.device_console import DeviceConsole from flightctl.models.device_decommission import DeviceDecommission +from flightctl.models.device_os_spec import DeviceOsSpec from flightctl.models.device_spec_systemd import DeviceSpecSystemd from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec -from flightctl.models.image_or_catalog_item_ref_spec import ImageOrCatalogItemRefSpec from flightctl.models.resource_monitor import ResourceMonitor from typing import Optional, Set from typing_extensions import Self @@ -36,7 +36,7 @@ class DeviceSpec(BaseModel): DeviceSpec describes a device. """ # noqa: E501 update_policy: Optional[DeviceUpdatePolicySpec] = Field(default=None, alias="updatePolicy") - os: Optional[ImageOrCatalogItemRefSpec] = None + os: Optional[DeviceOsSpec] = None config: Optional[List[ConfigProviderSpec]] = Field(default=None, description="List of config providers.") applications: Optional[List[ApplicationProviderSpec]] = Field(default=None, description="List of application providers.") systemd: Optional[DeviceSpecSystemd] = None @@ -137,7 +137,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "updatePolicy": DeviceUpdatePolicySpec.from_dict(obj["updatePolicy"]) if obj.get("updatePolicy") is not None else None, - "os": ImageOrCatalogItemRefSpec.from_dict(obj["os"]) if obj.get("os") is not None else None, + "os": DeviceOsSpec.from_dict(obj["os"]) if obj.get("os") is not None else None, "config": [ConfigProviderSpec.from_dict(_item) for _item in obj["config"]] if obj.get("config") is not None else None, "applications": [ApplicationProviderSpec.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None, "systemd": DeviceSpecSystemd.from_dict(obj["systemd"]) if obj.get("systemd") is not None else None, diff --git a/flightctl/models/device_status.py b/flightctl/models/device_status.py index a3261c6..4bbe839 100644 --- a/flightctl/models/device_status.py +++ b/flightctl/models/device_status.py @@ -22,17 +22,20 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.condition import Condition +from flightctl.models.delta_generation_status import DeltaGenerationStatus from flightctl.models.dependency_sync_status import DependencySyncStatus from flightctl.models.device_application_status import DeviceApplicationStatus from flightctl.models.device_applications_summary_status import DeviceApplicationsSummaryStatus from flightctl.models.device_capabilities import DeviceCapabilities from flightctl.models.device_config_status import DeviceConfigStatus +from flightctl.models.device_enrollment_hooks_status import DeviceEnrollmentHooksStatus from flightctl.models.device_integrity_status import DeviceIntegrityStatus from flightctl.models.device_lifecycle_status import DeviceLifecycleStatus from flightctl.models.device_os_status import DeviceOsStatus from flightctl.models.device_resource_status import DeviceResourceStatus from flightctl.models.device_summary_status import DeviceSummaryStatus from flightctl.models.device_system_info import DeviceSystemInfo +from flightctl.models.device_system_info_status import DeviceSystemInfoStatus from flightctl.models.device_updated_status import DeviceUpdatedStatus from flightctl.models.systemd_unit_status import SystemdUnitStatus from typing import Optional, Set @@ -57,7 +60,10 @@ class DeviceStatus(BaseModel): lifecycle: DeviceLifecycleStatus dependency_sync: Optional[DependencySyncStatus] = Field(default=None, alias="dependencySync") capabilities: Optional[DeviceCapabilities] = None - __properties: ClassVar[List[str]] = ["conditions", "systemInfo", "systemd", "applications", "applicationsSummary", "resources", "integrity", "config", "os", "updated", "summary", "lastSeen", "lifecycle", "dependencySync", "capabilities"] + delta_generation: Optional[DeltaGenerationStatus] = Field(default=None, alias="deltaGeneration") + enrollment_hooks: Optional[DeviceEnrollmentHooksStatus] = Field(default=None, alias="enrollmentHooks") + system_info_status: Optional[DeviceSystemInfoStatus] = Field(default=None, alias="systemInfoStatus") + __properties: ClassVar[List[str]] = ["conditions", "systemInfo", "systemd", "applications", "applicationsSummary", "resources", "integrity", "config", "os", "updated", "summary", "lastSeen", "lifecycle", "dependencySync", "capabilities", "deltaGeneration", "enrollmentHooks", "systemInfoStatus"] model_config = ConfigDict( populate_by_name=True, @@ -152,6 +158,15 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of capabilities if self.capabilities: _dict['capabilities'] = self.capabilities.to_dict() + # override the default output from pydantic by calling `to_dict()` of delta_generation + if self.delta_generation: + _dict['deltaGeneration'] = self.delta_generation.to_dict() + # override the default output from pydantic by calling `to_dict()` of enrollment_hooks + if self.enrollment_hooks: + _dict['enrollmentHooks'] = self.enrollment_hooks.to_dict() + # override the default output from pydantic by calling `to_dict()` of system_info_status + if self.system_info_status: + _dict['systemInfoStatus'] = self.system_info_status.to_dict() return _dict @classmethod @@ -178,7 +193,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "lastSeen": obj.get("lastSeen"), "lifecycle": DeviceLifecycleStatus.from_dict(obj["lifecycle"]) if obj.get("lifecycle") is not None else None, "dependencySync": DependencySyncStatus.from_dict(obj["dependencySync"]) if obj.get("dependencySync") is not None else None, - "capabilities": DeviceCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None + "capabilities": DeviceCapabilities.from_dict(obj["capabilities"]) if obj.get("capabilities") is not None else None, + "deltaGeneration": DeltaGenerationStatus.from_dict(obj["deltaGeneration"]) if obj.get("deltaGeneration") is not None else None, + "enrollmentHooks": DeviceEnrollmentHooksStatus.from_dict(obj["enrollmentHooks"]) if obj.get("enrollmentHooks") is not None else None, + "systemInfoStatus": DeviceSystemInfoStatus.from_dict(obj["systemInfoStatus"]) if obj.get("systemInfoStatus") is not None else None }) return _obj diff --git a/flightctl/models/device_system_info.py b/flightctl/models/device_system_info.py index 46b03f3..f6c34ba 100644 --- a/flightctl/models/device_system_info.py +++ b/flightctl/models/device_system_info.py @@ -18,8 +18,11 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.device_gpu import DeviceGpu +from flightctl.models.device_kvm import DeviceKvm +from flightctl.models.os_mode_type import OsModeType from typing import Optional, Set from typing_extensions import Self @@ -31,9 +34,15 @@ class DeviceSystemInfo(BaseModel): boot_id: StrictStr = Field(description="Boot ID reported by the device.", alias="bootID") operating_system: StrictStr = Field(description="The Operating System reported by the device.", alias="operatingSystem") agent_version: StrictStr = Field(description="The Agent version.", alias="agentVersion") + bootc_version: Optional[StrictStr] = Field(default=None, description="Version reported by `bootc --version`. Absent when bootc is not installed or the version command fails.", alias="bootcVersion") + oci_delta_version: Optional[StrictStr] = Field(default=None, description="Version reported by `oci-delta --version`, or from Go module build information when that flag is unsupported. Absent when oci-delta is not installed or its version cannot be determined.", alias="ociDeltaVersion") + delta_eligible: Optional[StrictBool] = Field(default=None, description="Whether this device can consume OCI deltas. True when the oci-delta binary is present. False when it is not. Omitted when an older agent does not report the field.", alias="deltaEligible") custom_info: Optional[Dict[str, StrictStr]] = Field(default=None, description="User-defined information about the device.", alias="customInfo") + gpus: Optional[List[DeviceGpu]] = Field(default=None, description="List of GPU devices discovered on the device.") + kvm: Optional[DeviceKvm] = None + os_mode: Optional[OsModeType] = Field(default=None, alias="osMode") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["architecture", "bootID", "operatingSystem", "agentVersion", "customInfo"] + __properties: ClassVar[List[str]] = ["architecture", "bootID", "operatingSystem", "agentVersion", "bootcVersion", "ociDeltaVersion", "deltaEligible", "customInfo", "gpus", "kvm", "osMode"] model_config = ConfigDict( populate_by_name=True, @@ -76,6 +85,16 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in gpus (list) + _items = [] + if self.gpus: + for _item_gpus in self.gpus: + if _item_gpus: + _items.append(_item_gpus.to_dict()) + _dict['gpus'] = _items + # override the default output from pydantic by calling `to_dict()` of kvm + if self.kvm: + _dict['kvm'] = self.kvm.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -97,7 +116,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bootID": obj.get("bootID"), "operatingSystem": obj.get("operatingSystem"), "agentVersion": obj.get("agentVersion"), - "customInfo": obj.get("customInfo") + "bootcVersion": obj.get("bootcVersion"), + "ociDeltaVersion": obj.get("ociDeltaVersion"), + "deltaEligible": obj.get("deltaEligible"), + "customInfo": obj.get("customInfo"), + "gpus": [DeviceGpu.from_dict(_item) for _item in obj["gpus"]] if obj.get("gpus") is not None else None, + "kvm": DeviceKvm.from_dict(obj["kvm"]) if obj.get("kvm") is not None else None, + "osMode": obj.get("osMode") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/flightctl/models/device_system_info_status.py b/flightctl/models/device_system_info_status.py new file mode 100644 index 0000000..f9ff6cb --- /dev/null +++ b/flightctl/models/device_system_info_status.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 +from typing import Any, ClassVar, Dict, List +from flightctl.models.device_system_info_statuses import DeviceSystemInfoStatuses +from flightctl.models.device_system_info_summary_status import DeviceSystemInfoSummaryStatus +from typing import Optional, Set +from typing_extensions import Self + +class DeviceSystemInfoStatus(BaseModel): + """ + Status of the system information collection sources for a device. + """ # noqa: E501 + summary: DeviceSystemInfoSummaryStatus + statuses: DeviceSystemInfoStatuses + __properties: ClassVar[List[str]] = ["summary", "statuses"] + + 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 DeviceSystemInfoStatus 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 summary + if self.summary: + _dict['summary'] = self.summary.to_dict() + # override the default output from pydantic by calling `to_dict()` of statuses + if self.statuses: + _dict['statuses'] = self.statuses.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceSystemInfoStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "summary": DeviceSystemInfoSummaryStatus.from_dict(obj["summary"]) if obj.get("summary") is not None else None, + "statuses": DeviceSystemInfoStatuses.from_dict(obj["statuses"]) if obj.get("statuses") is not None else None + }) + return _obj diff --git a/flightctl/models/device_system_info_statuses.py b/flightctl/models/device_system_info_statuses.py new file mode 100644 index 0000000..dcf18d5 --- /dev/null +++ b/flightctl/models/device_system_info_statuses.py @@ -0,0 +1,113 @@ +# 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.system_info_source_status import SystemInfoSourceStatus +from typing import Optional, Set +from typing_extensions import Self + +class DeviceSystemInfoStatuses(BaseModel): + """ + Collection statuses for built-in and custom information sources. + """ # noqa: E501 + system_info: Dict[str, SystemInfoSourceStatus] = Field(description="Per-source collection status for built-in system information.", alias="systemInfo") + custom_info: Dict[str, SystemInfoSourceStatus] = Field(description="Per-source collection status for custom device information.", alias="customInfo") + __properties: ClassVar[List[str]] = ["systemInfo", "customInfo"] + + 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 DeviceSystemInfoStatuses 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 value in system_info (dict) + _field_dict = {} + if self.system_info: + for _key_system_info in self.system_info: + if self.system_info[_key_system_info]: + _field_dict[_key_system_info] = self.system_info[_key_system_info].to_dict() + _dict['systemInfo'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of each value in custom_info (dict) + _field_dict = {} + if self.custom_info: + for _key_custom_info in self.custom_info: + if self.custom_info[_key_custom_info]: + _field_dict[_key_custom_info] = self.custom_info[_key_custom_info].to_dict() + _dict['customInfo'] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceSystemInfoStatuses from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "systemInfo": dict( + (_k, SystemInfoSourceStatus.from_dict(_v)) + for _k, _v in obj["systemInfo"].items() + ) + if obj.get("systemInfo") is not None + else None, + "customInfo": dict( + (_k, SystemInfoSourceStatus.from_dict(_v)) + for _k, _v in obj["customInfo"].items() + ) + if obj.get("customInfo") is not None + else None + }) + return _obj diff --git a/flightctl/models/device_system_info_summary_status.py b/flightctl/models/device_system_info_summary_status.py new file mode 100644 index 0000000..e2c6356 --- /dev/null +++ b/flightctl/models/device_system_info_summary_status.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 + + +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.system_info_summary_status_type import SystemInfoSummaryStatusType +from typing import Optional, Set +from typing_extensions import Self + +class DeviceSystemInfoSummaryStatus(BaseModel): + """ + Aggregate summary of the system information collection health. + """ # noqa: E501 + status: SystemInfoSummaryStatusType + __properties: ClassVar[List[str]] = ["status"] + + 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 DeviceSystemInfoSummaryStatus 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 DeviceSystemInfoSummaryStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + return _obj diff --git a/flightctl/models/devices_summary_capabilities.py b/flightctl/models/devices_summary_capabilities.py index 59f48c0..37ec870 100644 --- a/flightctl/models/devices_summary_capabilities.py +++ b/flightctl/models/devices_summary_capabilities.py @@ -25,9 +25,9 @@ class DevicesSummaryCapabilities(BaseModel): """ - Breakdowns of devices by status.capabilities fields. + Breakdowns of devices by status.systemInfo fields, falling back to the deprecated status.capabilities fields when unavailable. """ # noqa: E501 - os_mode: Optional[Dict[str, StrictInt]] = Field(default=None, description="Counts by status.capabilities.osMode (e.g. image, package). The key \"unknown\" counts devices that have not reported the capability.", alias="osMode") + os_mode: Optional[Dict[str, StrictInt]] = Field(default=None, description="Counts by device OS mode (e.g. image, package), taken from status.systemInfo.osMode with fallback to the deprecated status.capabilities.osMode. The key \"unknown\" counts devices that have not reported an OS mode.", alias="osMode") __properties: ClassVar[List[str]] = ["osMode"] model_config = ConfigDict( diff --git a/flightctl/models/enrollment_hook_auth.py b/flightctl/models/enrollment_hook_auth.py new file mode 100644 index 0000000..588ca86 --- /dev/null +++ b/flightctl/models/enrollment_hook_auth.py @@ -0,0 +1,86 @@ +# 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, SecretStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookAuth(BaseModel): + """ + Authentication configuration for an enrollment hook action. + """ # noqa: E501 + bearer_token: Optional[SecretStr] = Field(default=None, description="Bearer token for HTTP authentication.", alias="bearerToken") + __properties: ClassVar[List[str]] = ["bearerToken"] + + 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 EnrollmentHookAuth 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 EnrollmentHookAuth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bearerToken": obj.get("bearerToken") + }) + return _obj diff --git a/flightctl/models/enrollment_hook_http_action.py b/flightctl/models/enrollment_hook_http_action.py new file mode 100644 index 0000000..42b01d9 --- /dev/null +++ b/flightctl/models/enrollment_hook_http_action.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 +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flightctl.models.enrollment_hook_auth import EnrollmentHookAuth +from flightctl.models.enrollment_hook_retry_policy import EnrollmentHookRetryPolicy +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookHttpAction(BaseModel): + """ + An HTTP action to execute as part of an enrollment hook. + """ # noqa: E501 + url: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The HTTPS URL to call.") + timeout: Optional[StrictStr] = Field(default=None, description="Timeout duration (e.g. \"30s\"). Defaults to 30s, max 5m.") + retry: Optional[EnrollmentHookRetryPolicy] = None + auth: Optional[EnrollmentHookAuth] = None + __properties: ClassVar[List[str]] = ["url", "timeout", "retry", "auth"] + + 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 EnrollmentHookHttpAction 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 retry + if self.retry: + _dict['retry'] = self.retry.to_dict() + # override the default output from pydantic by calling `to_dict()` of auth + if self.auth: + _dict['auth'] = self.auth.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnrollmentHookHttpAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "url": obj.get("url"), + "timeout": obj.get("timeout"), + "retry": EnrollmentHookRetryPolicy.from_dict(obj["retry"]) if obj.get("retry") is not None else None, + "auth": EnrollmentHookAuth.from_dict(obj["auth"]) if obj.get("auth") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_hook_policy.py b/flightctl/models/enrollment_hook_policy.py new file mode 100644 index 0000000..16ead72 --- /dev/null +++ b/flightctl/models/enrollment_hook_policy.py @@ -0,0 +1,107 @@ +# 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.api_version import ApiVersion +from flightctl.models.enrollment_hook_policy_spec import EnrollmentHookPolicySpec +from flightctl.models.enrollment_hook_policy_status import EnrollmentHookPolicyStatus +from flightctl.models.object_meta import ObjectMeta +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookPolicy(BaseModel): + """ + EnrollmentHookPolicy defines an org-scoped enrollment hook policy. + """ # noqa: E501 + api_version: ApiVersion = Field(alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents.") + metadata: ObjectMeta + spec: EnrollmentHookPolicySpec + status: Optional[EnrollmentHookPolicyStatus] = None + __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "spec", "status"] + + 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 EnrollmentHookPolicy 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() + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnrollmentHookPolicy 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": EnrollmentHookPolicySpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "status": EnrollmentHookPolicyStatus.from_dict(obj["status"]) if obj.get("status") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_hook_policy_list.py b/flightctl/models/enrollment_hook_policy_list.py new file mode 100644 index 0000000..5cb7e0e --- /dev/null +++ b/flightctl/models/enrollment_hook_policy_list.py @@ -0,0 +1,105 @@ +# 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.api_version import ApiVersion +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy +from flightctl.models.list_meta import ListMeta +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookPolicyList(BaseModel): + """ + EnrollmentHookPolicyList is a list of EnrollmentHookPolicy resources. + """ # noqa: E501 + api_version: ApiVersion = Field(alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents.") + metadata: ListMeta + items: List[EnrollmentHookPolicy] = Field(description="List of enrollment hook policies.") + __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 EnrollmentHookPolicyList 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 EnrollmentHookPolicyList 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": [EnrollmentHookPolicy.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_hook_policy_spec.py b/flightctl/models/enrollment_hook_policy_spec.py new file mode 100644 index 0000000..8de6c6e --- /dev/null +++ b/flightctl/models/enrollment_hook_policy_spec.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 +from typing import Any, ClassVar, Dict, List +from flightctl.models.enrollment_hook_stage_spec import EnrollmentHookStageSpec +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookPolicySpec(BaseModel): + """ + Specification for an enrollment hook policy. + """ # noqa: E501 + after_enrolling: EnrollmentHookStageSpec = Field(alias="afterEnrolling") + __properties: ClassVar[List[str]] = ["afterEnrolling"] + + 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 EnrollmentHookPolicySpec 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 after_enrolling + if self.after_enrolling: + _dict['afterEnrolling'] = self.after_enrolling.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnrollmentHookPolicySpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "afterEnrolling": EnrollmentHookStageSpec.from_dict(obj["afterEnrolling"]) if obj.get("afterEnrolling") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_hook_policy_status.py b/flightctl/models/enrollment_hook_policy_status.py new file mode 100644 index 0000000..d35b8de --- /dev/null +++ b/flightctl/models/enrollment_hook_policy_status.py @@ -0,0 +1,94 @@ +# 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, Optional +from flightctl.models.condition import Condition +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookPolicyStatus(BaseModel): + """ + Status of an enrollment hook policy. + """ # noqa: E501 + conditions: Optional[List[Condition]] = Field(default=None, description="Current conditions of the enrollment hook policy.") + __properties: ClassVar[List[str]] = ["conditions"] + + 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 EnrollmentHookPolicyStatus 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 conditions (list) + _items = [] + if self.conditions: + for _item_conditions in self.conditions: + if _item_conditions: + _items.append(_item_conditions.to_dict()) + _dict['conditions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnrollmentHookPolicyStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_hook_retry_policy.py b/flightctl/models/enrollment_hook_retry_policy.py new file mode 100644 index 0000000..676774f --- /dev/null +++ b/flightctl/models/enrollment_hook_retry_policy.py @@ -0,0 +1,95 @@ +# 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookRetryPolicy(BaseModel): + """ + Retry policy for an enrollment hook action. + """ # noqa: E501 + max_attempts: Optional[Annotated[int, Field(le=20, strict=True, ge=1)]] = Field(default=None, description="Maximum number of retry attempts. Defaults to 5, max 20.", alias="maxAttempts") + backoff_policy: Optional[StrictStr] = Field(default=None, description="Backoff strategy (e.g. \"exponential\"). Defaults to \"exponential\".", alias="backoffPolicy") + backoff_delay: Optional[StrictStr] = Field(default=None, description="Initial backoff delay duration (e.g. \"2s\"). Defaults to \"2s\".", alias="backoffDelay") + max_backoff: Optional[StrictStr] = Field(default=None, description="Maximum backoff duration (e.g. \"2m\"). Defaults to \"2m\".", alias="maxBackoff") + deadline: Optional[StrictStr] = Field(default=None, description="Overall deadline for all retry attempts (e.g. \"10m\"). Defaults to \"10m\".") + __properties: ClassVar[List[str]] = ["maxAttempts", "backoffPolicy", "backoffDelay", "maxBackoff", "deadline"] + + 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 EnrollmentHookRetryPolicy 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 EnrollmentHookRetryPolicy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "maxAttempts": obj.get("maxAttempts"), + "backoffPolicy": obj.get("backoffPolicy"), + "backoffDelay": obj.get("backoffDelay"), + "maxBackoff": obj.get("maxBackoff"), + "deadline": obj.get("deadline") + }) + return _obj diff --git a/flightctl/models/enrollment_hook_snapshot.py b/flightctl/models/enrollment_hook_snapshot.py new file mode 100644 index 0000000..4173d27 --- /dev/null +++ b/flightctl/models/enrollment_hook_snapshot.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 +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.enrollment_hook_snapshot_action import EnrollmentHookSnapshotAction +from flightctl.models.failure_policy_type import FailurePolicyType +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookSnapshot(BaseModel): + """ + Immutable non-secret copy of EnrollmentHookPolicy fields captured at approval time. + """ # noqa: E501 + failure_policy: FailurePolicyType = Field(alias="failurePolicy") + control_plane_actions: Optional[List[EnrollmentHookSnapshotAction]] = Field(default=None, description="Non-secret copies of control-plane actions from the policy at approval time.", alias="controlPlaneActions") + __properties: ClassVar[List[str]] = ["failurePolicy", "controlPlaneActions"] + + 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 EnrollmentHookSnapshot 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 control_plane_actions (list) + _items = [] + if self.control_plane_actions: + for _item_control_plane_actions in self.control_plane_actions: + if _item_control_plane_actions: + _items.append(_item_control_plane_actions.to_dict()) + _dict['controlPlaneActions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnrollmentHookSnapshot from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "failurePolicy": obj.get("failurePolicy"), + "controlPlaneActions": [EnrollmentHookSnapshotAction.from_dict(_item) for _item in obj["controlPlaneActions"]] if obj.get("controlPlaneActions") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_hook_snapshot_action.py b/flightctl/models/enrollment_hook_snapshot_action.py new file mode 100644 index 0000000..d64f8d9 --- /dev/null +++ b/flightctl/models/enrollment_hook_snapshot_action.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.enrollment_hook_retry_policy import EnrollmentHookRetryPolicy +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookSnapshotAction(BaseModel): + """ + Non-secret copy of an enrollment hook HTTP action. Excludes auth/bearerToken. + """ # noqa: E501 + index: StrictInt = Field(description="Original action index in the policy.") + url: StrictStr = Field(description="The HTTPS URL to call.") + timeout: Optional[StrictStr] = Field(default=None, description="Timeout duration (e.g. \"30s\").") + retry: Optional[EnrollmentHookRetryPolicy] = None + __properties: ClassVar[List[str]] = ["index", "url", "timeout", "retry"] + + 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 EnrollmentHookSnapshotAction 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 retry + if self.retry: + _dict['retry'] = self.retry.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnrollmentHookSnapshotAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index": obj.get("index"), + "url": obj.get("url"), + "timeout": obj.get("timeout"), + "retry": EnrollmentHookRetryPolicy.from_dict(obj["retry"]) if obj.get("retry") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_hook_stage_spec.py b/flightctl/models/enrollment_hook_stage_spec.py new file mode 100644 index 0000000..9db3122 --- /dev/null +++ b/flightctl/models/enrollment_hook_stage_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 +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.enrollment_hook_http_action import EnrollmentHookHttpAction +from flightctl.models.failure_policy_type import FailurePolicyType +from typing import Optional, Set +from typing_extensions import Self + +class EnrollmentHookStageSpec(BaseModel): + """ + Configuration for a stage of enrollment hooks. + """ # noqa: E501 + failure_policy: Optional[FailurePolicyType] = Field(default=None, alias="failurePolicy") + control_plane_actions: Optional[List[EnrollmentHookHttpAction]] = Field(default=None, description="List of HTTP actions to execute during this enrollment stage.", alias="controlPlaneActions") + __properties: ClassVar[List[str]] = ["failurePolicy", "controlPlaneActions"] + + 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 EnrollmentHookStageSpec 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 control_plane_actions (list) + _items = [] + if self.control_plane_actions: + for _item_control_plane_actions in self.control_plane_actions: + if _item_control_plane_actions: + _items.append(_item_control_plane_actions.to_dict()) + _dict['controlPlaneActions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EnrollmentHookStageSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "failurePolicy": obj.get("failurePolicy"), + "controlPlaneActions": [EnrollmentHookHttpAction.from_dict(_item) for _item in obj["controlPlaneActions"]] if obj.get("controlPlaneActions") is not None else None + }) + return _obj diff --git a/flightctl/models/enrollment_request_spec.py b/flightctl/models/enrollment_request_spec.py index 40ec70b..4fe4cb1 100644 --- a/flightctl/models/enrollment_request_spec.py +++ b/flightctl/models/enrollment_request_spec.py @@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.device_status import DeviceStatus from flightctl.models.os_mode_type import OsModeType +from flightctl.models.pre_enrollment_result import PreEnrollmentResult from typing import Optional, Set from typing_extensions import Self @@ -34,7 +35,8 @@ class EnrollmentRequestSpec(BaseModel): 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.") known_rendered_version: Optional[StrictStr] = Field(default=None, description="The rendered version of the device from desired.json (optional).", alias="knownRenderedVersion") os_mode: Optional[OsModeType] = Field(default=None, alias="osMode") - __properties: ClassVar[List[str]] = ["csr", "deviceStatus", "labels", "knownRenderedVersion", "osMode"] + pre_enrollment: Optional[PreEnrollmentResult] = Field(default=None, alias="preEnrollment") + __properties: ClassVar[List[str]] = ["csr", "deviceStatus", "labels", "knownRenderedVersion", "osMode", "preEnrollment"] model_config = ConfigDict( populate_by_name=True, @@ -78,6 +80,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of device_status if self.device_status: _dict['deviceStatus'] = self.device_status.to_dict() + # override the default output from pydantic by calling `to_dict()` of pre_enrollment + if self.pre_enrollment: + _dict['preEnrollment'] = self.pre_enrollment.to_dict() return _dict @classmethod @@ -94,7 +99,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "deviceStatus": DeviceStatus.from_dict(obj["deviceStatus"]) if obj.get("deviceStatus") is not None else None, "labels": obj.get("labels"), "knownRenderedVersion": obj.get("knownRenderedVersion"), - "osMode": obj.get("osMode") + "osMode": obj.get("osMode"), + "preEnrollment": PreEnrollmentResult.from_dict(obj["preEnrollment"]) if obj.get("preEnrollment") is not None else None }) return _obj diff --git a/flightctl/models/event.py b/flightctl/models/event.py index 67f2ff6..24349ad 100644 --- a/flightctl/models/event.py +++ b/flightctl/models/event.py @@ -46,8 +46,8 @@ class Event(BaseModel): @field_validator('reason') def reason_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ResourceCreated', 'ResourceCreationFailed', 'ResourceUpdated', 'ResourceUpdateFailed', 'ResourceDeleted', 'ResourceDeletionFailed', 'DeviceDecommissioned', 'DeviceDecommissionFailed', 'DeviceCPUCritical', 'DeviceCPUWarning', 'DeviceCPUNormal', 'DeviceMemoryCritical', 'DeviceMemoryWarning', 'DeviceMemoryNormal', 'DeviceDiskCritical', 'DeviceDiskWarning', 'DeviceDiskNormal', 'DeviceApplicationError', 'DeviceApplicationDegraded', 'DeviceApplicationHealthy', 'DeviceDisconnected', 'DeviceIsRebooting', 'DeviceConflictPaused', 'DeviceConflictResolved', 'DeviceConnected', 'DeviceContentUpToDate', 'DeviceContentOutOfDate', 'DeviceContentUpdating', 'DeviceUpdateFailed', 'DeviceVulnerabilityCVECritical', 'DeviceVulnerabilityCVEResolved', 'DeviceVulnerabilityCVEWarning', 'DeviceOSImageChanged', 'EnrollmentRequestApproved', 'EnrollmentRequestApprovalFailed', 'DeviceMultipleOwnersDetected', 'DeviceMultipleOwnersResolved', 'DeviceSpecValid', 'DeviceSpecInvalid', 'InternalTaskFailed', 'InternalTaskPermanentlyFailed', 'RepositoryAccessible', 'RepositoryInaccessible', 'ReferencedRepositoryUpdated', 'FleetValid', 'FleetInvalid', 'FleetRolloutCreated', 'FleetRolloutStarted', 'FleetRolloutFailed', 'FleetRolloutCompleted', 'FleetRolloutBatchDispatched', 'FleetRolloutDeviceSelected', 'FleetRolloutBatchCompleted', 'ResourceSyncCommitDetected', 'ResourceSyncAccessible', 'ResourceSyncInaccessible', 'ResourceSyncParsed', 'ResourceSyncParsingFailed', 'ResourceSyncSynced', 'ResourceSyncSyncFailed', 'DependencyChangeDetected', 'DependencySyncProbeFailed', 'SystemRestored', 'EncryptionMigrationStarted', 'EncryptionMigrationCompleted', 'ApplicationLifecycleChanged']): - raise ValueError("must be one of enum values ('ResourceCreated', 'ResourceCreationFailed', 'ResourceUpdated', 'ResourceUpdateFailed', 'ResourceDeleted', 'ResourceDeletionFailed', 'DeviceDecommissioned', 'DeviceDecommissionFailed', 'DeviceCPUCritical', 'DeviceCPUWarning', 'DeviceCPUNormal', 'DeviceMemoryCritical', 'DeviceMemoryWarning', 'DeviceMemoryNormal', 'DeviceDiskCritical', 'DeviceDiskWarning', 'DeviceDiskNormal', 'DeviceApplicationError', 'DeviceApplicationDegraded', 'DeviceApplicationHealthy', 'DeviceDisconnected', 'DeviceIsRebooting', 'DeviceConflictPaused', 'DeviceConflictResolved', 'DeviceConnected', 'DeviceContentUpToDate', 'DeviceContentOutOfDate', 'DeviceContentUpdating', 'DeviceUpdateFailed', 'DeviceVulnerabilityCVECritical', 'DeviceVulnerabilityCVEResolved', 'DeviceVulnerabilityCVEWarning', 'DeviceOSImageChanged', 'EnrollmentRequestApproved', 'EnrollmentRequestApprovalFailed', 'DeviceMultipleOwnersDetected', 'DeviceMultipleOwnersResolved', 'DeviceSpecValid', 'DeviceSpecInvalid', 'InternalTaskFailed', 'InternalTaskPermanentlyFailed', 'RepositoryAccessible', 'RepositoryInaccessible', 'ReferencedRepositoryUpdated', 'FleetValid', 'FleetInvalid', 'FleetRolloutCreated', 'FleetRolloutStarted', 'FleetRolloutFailed', 'FleetRolloutCompleted', 'FleetRolloutBatchDispatched', 'FleetRolloutDeviceSelected', 'FleetRolloutBatchCompleted', 'ResourceSyncCommitDetected', 'ResourceSyncAccessible', 'ResourceSyncInaccessible', 'ResourceSyncParsed', 'ResourceSyncParsingFailed', 'ResourceSyncSynced', 'ResourceSyncSyncFailed', 'DependencyChangeDetected', 'DependencySyncProbeFailed', 'SystemRestored', 'EncryptionMigrationStarted', 'EncryptionMigrationCompleted', 'ApplicationLifecycleChanged')") + if value not in set(['ResourceCreated', 'ResourceCreationFailed', 'ResourceUpdated', 'ResourceUpdateFailed', 'ResourceDeleted', 'ResourceDeletionFailed', 'DeviceDecommissioned', 'DeviceDecommissionFailed', 'DeviceCPUCritical', 'DeviceCPUWarning', 'DeviceCPUNormal', 'DeviceMemoryCritical', 'DeviceMemoryWarning', 'DeviceMemoryNormal', 'DeviceDiskCritical', 'DeviceDiskWarning', 'DeviceDiskNormal', 'DeviceApplicationError', 'DeviceApplicationDegraded', 'DeviceApplicationHealthy', 'DeviceDisconnected', 'DeviceIsRebooting', 'DeviceConflictPaused', 'DeviceConflictResolved', 'DeviceConnected', 'DeviceContentUpToDate', 'DeviceContentOutOfDate', 'DeviceContentUpdating', 'DeviceUpdateFailed', 'DeviceVulnerabilityCVECritical', 'DeviceVulnerabilityCVEResolved', 'DeviceVulnerabilityCVEWarning', 'DeviceOSImageChanged', 'EnrollmentRequestApproved', 'EnrollmentRequestApprovalFailed', 'DeviceMultipleOwnersDetected', 'DeviceMultipleOwnersResolved', 'DeviceSpecValid', 'DeviceSpecInvalid', 'InternalTaskFailed', 'InternalTaskPermanentlyFailed', 'RepositoryAccessible', 'RepositoryInaccessible', 'ReferencedRepositoryUpdated', 'FleetValid', 'FleetInvalid', 'FleetRolloutCreated', 'FleetRolloutStarted', 'FleetRolloutFailed', 'FleetRolloutCompleted', 'FleetRolloutBatchDispatched', 'FleetRolloutDeviceSelected', 'FleetRolloutBatchCompleted', 'ResourceSyncCommitDetected', 'ResourceSyncAccessible', 'ResourceSyncInaccessible', 'ResourceSyncParsed', 'ResourceSyncParsingFailed', 'ResourceSyncSynced', 'ResourceSyncSyncFailed', 'DependencyChangeDetected', 'DependencySyncProbeFailed', 'SystemRestored', 'EncryptionMigrationStarted', 'EncryptionMigrationCompleted', 'ApplicationLifecycleChanged', 'PrepareDeltas', 'DeltaGenerationProgress', 'DeltaGenerationCompleted', 'EnrollmentHookSucceeded', 'EnrollmentHookFailed', 'EnrollmentHookNotifyFailed', 'EnrollmentHookManualOverride']): + raise ValueError("must be one of enum values ('ResourceCreated', 'ResourceCreationFailed', 'ResourceUpdated', 'ResourceUpdateFailed', 'ResourceDeleted', 'ResourceDeletionFailed', 'DeviceDecommissioned', 'DeviceDecommissionFailed', 'DeviceCPUCritical', 'DeviceCPUWarning', 'DeviceCPUNormal', 'DeviceMemoryCritical', 'DeviceMemoryWarning', 'DeviceMemoryNormal', 'DeviceDiskCritical', 'DeviceDiskWarning', 'DeviceDiskNormal', 'DeviceApplicationError', 'DeviceApplicationDegraded', 'DeviceApplicationHealthy', 'DeviceDisconnected', 'DeviceIsRebooting', 'DeviceConflictPaused', 'DeviceConflictResolved', 'DeviceConnected', 'DeviceContentUpToDate', 'DeviceContentOutOfDate', 'DeviceContentUpdating', 'DeviceUpdateFailed', 'DeviceVulnerabilityCVECritical', 'DeviceVulnerabilityCVEResolved', 'DeviceVulnerabilityCVEWarning', 'DeviceOSImageChanged', 'EnrollmentRequestApproved', 'EnrollmentRequestApprovalFailed', 'DeviceMultipleOwnersDetected', 'DeviceMultipleOwnersResolved', 'DeviceSpecValid', 'DeviceSpecInvalid', 'InternalTaskFailed', 'InternalTaskPermanentlyFailed', 'RepositoryAccessible', 'RepositoryInaccessible', 'ReferencedRepositoryUpdated', 'FleetValid', 'FleetInvalid', 'FleetRolloutCreated', 'FleetRolloutStarted', 'FleetRolloutFailed', 'FleetRolloutCompleted', 'FleetRolloutBatchDispatched', 'FleetRolloutDeviceSelected', 'FleetRolloutBatchCompleted', 'ResourceSyncCommitDetected', 'ResourceSyncAccessible', 'ResourceSyncInaccessible', 'ResourceSyncParsed', 'ResourceSyncParsingFailed', 'ResourceSyncSynced', 'ResourceSyncSyncFailed', 'DependencyChangeDetected', 'DependencySyncProbeFailed', 'SystemRestored', 'EncryptionMigrationStarted', 'EncryptionMigrationCompleted', 'ApplicationLifecycleChanged', 'PrepareDeltas', 'DeltaGenerationProgress', 'DeltaGenerationCompleted', 'EnrollmentHookSucceeded', 'EnrollmentHookFailed', 'EnrollmentHookNotifyFailed', 'EnrollmentHookManualOverride')") return value @field_validator('type') diff --git a/flightctl/models/event_details.py b/flightctl/models/event_details.py index d8923bb..9c25150 100644 --- a/flightctl/models/event_details.py +++ b/flightctl/models/event_details.py @@ -19,6 +19,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from flightctl.models.application_lifecycle_changed_details import ApplicationLifecycleChangedDetails +from flightctl.models.delta_generation_progress_details import DeltaGenerationProgressDetails from flightctl.models.dependency_change_detected_details import DependencyChangeDetectedDetails from flightctl.models.dependency_sync_probe_failed_details import DependencySyncProbeFailedDetails from flightctl.models.device_multiple_owners_detected_details import DeviceMultipleOwnersDetectedDetails @@ -31,6 +32,7 @@ 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.prepare_deltas_details import PrepareDeltasDetails from flightctl.models.referenced_repository_updated_details import ReferencedRepositoryUpdatedDetails from flightctl.models.resource_sync_completed_details import ResourceSyncCompletedDetails from flightctl.models.resource_updated_details import ResourceUpdatedDetails @@ -38,7 +40,7 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -EVENTDETAILS_ONE_OF_SCHEMAS = ["ApplicationLifecycleChangedDetails", "DependencyChangeDetectedDetails", "DependencySyncProbeFailedDetails", "DeviceMultipleOwnersDetectedDetails", "DeviceMultipleOwnersResolvedDetails", "DeviceOwnershipChangedDetails", "DeviceVulnerabilityCveDetails", "FleetRolloutBatchCompletedDetails", "FleetRolloutBatchDispatchedDetails", "FleetRolloutCompletedDetails", "FleetRolloutDeviceSelectedDetails", "FleetRolloutFailedDetails", "FleetRolloutStartedDetails", "InternalTaskFailedDetails", "InternalTaskPermanentlyFailedDetails", "ReferencedRepositoryUpdatedDetails", "ResourceSyncCompletedDetails", "ResourceUpdatedDetails"] +EVENTDETAILS_ONE_OF_SCHEMAS = ["ApplicationLifecycleChangedDetails", "DeltaGenerationProgressDetails", "DependencyChangeDetectedDetails", "DependencySyncProbeFailedDetails", "DeviceMultipleOwnersDetectedDetails", "DeviceMultipleOwnersResolvedDetails", "DeviceOwnershipChangedDetails", "DeviceVulnerabilityCveDetails", "FleetRolloutBatchCompletedDetails", "FleetRolloutBatchDispatchedDetails", "FleetRolloutCompletedDetails", "FleetRolloutDeviceSelectedDetails", "FleetRolloutFailedDetails", "FleetRolloutStartedDetails", "InternalTaskFailedDetails", "InternalTaskPermanentlyFailedDetails", "PrepareDeltasDetails", "ReferencedRepositoryUpdatedDetails", "ResourceSyncCompletedDetails", "ResourceUpdatedDetails"] class EventDetails(BaseModel): """ @@ -80,8 +82,12 @@ class EventDetails(BaseModel): oneof_schema_17_validator: Optional[DependencySyncProbeFailedDetails] = None # data type: ApplicationLifecycleChangedDetails oneof_schema_18_validator: Optional[ApplicationLifecycleChangedDetails] = None - actual_instance: Optional[Union[ApplicationLifecycleChangedDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails]] = None - one_of_schemas: Set[str] = { "ApplicationLifecycleChangedDetails", "DependencyChangeDetectedDetails", "DependencySyncProbeFailedDetails", "DeviceMultipleOwnersDetectedDetails", "DeviceMultipleOwnersResolvedDetails", "DeviceOwnershipChangedDetails", "DeviceVulnerabilityCveDetails", "FleetRolloutBatchCompletedDetails", "FleetRolloutBatchDispatchedDetails", "FleetRolloutCompletedDetails", "FleetRolloutDeviceSelectedDetails", "FleetRolloutFailedDetails", "FleetRolloutStartedDetails", "InternalTaskFailedDetails", "InternalTaskPermanentlyFailedDetails", "ReferencedRepositoryUpdatedDetails", "ResourceSyncCompletedDetails", "ResourceUpdatedDetails" } + # data type: PrepareDeltasDetails + oneof_schema_19_validator: Optional[PrepareDeltasDetails] = None + # data type: DeltaGenerationProgressDetails + oneof_schema_20_validator: Optional[DeltaGenerationProgressDetails] = None + actual_instance: Optional[Union[ApplicationLifecycleChangedDetails, DeltaGenerationProgressDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, PrepareDeltasDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails]] = None + one_of_schemas: Set[str] = { "ApplicationLifecycleChangedDetails", "DeltaGenerationProgressDetails", "DependencyChangeDetectedDetails", "DependencySyncProbeFailedDetails", "DeviceMultipleOwnersDetectedDetails", "DeviceMultipleOwnersResolvedDetails", "DeviceOwnershipChangedDetails", "DeviceVulnerabilityCveDetails", "FleetRolloutBatchCompletedDetails", "FleetRolloutBatchDispatchedDetails", "FleetRolloutCompletedDetails", "FleetRolloutDeviceSelectedDetails", "FleetRolloutFailedDetails", "FleetRolloutStartedDetails", "InternalTaskFailedDetails", "InternalTaskPermanentlyFailedDetails", "PrepareDeltasDetails", "ReferencedRepositoryUpdatedDetails", "ResourceSyncCompletedDetails", "ResourceUpdatedDetails" } model_config = ConfigDict( validate_assignment=True, @@ -197,12 +203,22 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `ApplicationLifecycleChangedDetails`") else: match += 1 + # validate data type: PrepareDeltasDetails + if not isinstance(v, PrepareDeltasDetails): + error_messages.append(f"Error! Input type `{type(v)}` is not `PrepareDeltasDetails`") + else: + match += 1 + # validate data type: DeltaGenerationProgressDetails + if not isinstance(v, DeltaGenerationProgressDetails): + error_messages.append(f"Error! Input type `{type(v)}` is not `DeltaGenerationProgressDetails`") + else: + match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DeltaGenerationProgressDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, PrepareDeltasDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DeltaGenerationProgressDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, PrepareDeltasDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) else: return v @@ -227,6 +243,11 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = ApplicationLifecycleChangedDetails.from_json(json_str) return instance + # check if data type is `DeltaGenerationProgressDetails` + if _data_type == "DeltaGenerationProgress": + instance.actual_instance = DeltaGenerationProgressDetails.from_json(json_str) + return instance + # check if data type is `DependencyChangeDetectedDetails` if _data_type == "DependencyChangeDetected": instance.actual_instance = DependencyChangeDetectedDetails.from_json(json_str) @@ -297,6 +318,11 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = InternalTaskPermanentlyFailedDetails.from_json(json_str) return instance + # check if data type is `PrepareDeltasDetails` + if _data_type == "PrepareDeltas": + instance.actual_instance = PrepareDeltasDetails.from_json(json_str) + return instance + # check if data type is `ReferencedRepositoryUpdatedDetails` if _data_type == "ReferencedRepositoryUpdated": instance.actual_instance = ReferencedRepositoryUpdatedDetails.from_json(json_str) @@ -420,13 +446,25 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into PrepareDeltasDetails + try: + instance.actual_instance = PrepareDeltasDetails.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DeltaGenerationProgressDetails + try: + instance.actual_instance = DeltaGenerationProgressDetails.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 EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DeltaGenerationProgressDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, PrepareDeltasDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into EventDetails with oneOf schemas: ApplicationLifecycleChangedDetails, DeltaGenerationProgressDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, PrepareDeltasDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails. Details: " + ", ".join(error_messages)) else: return instance @@ -440,7 +478,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationLifecycleChangedDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], ApplicationLifecycleChangedDetails, DeltaGenerationProgressDetails, DependencyChangeDetectedDetails, DependencySyncProbeFailedDetails, DeviceMultipleOwnersDetectedDetails, DeviceMultipleOwnersResolvedDetails, DeviceOwnershipChangedDetails, DeviceVulnerabilityCveDetails, FleetRolloutBatchCompletedDetails, FleetRolloutBatchDispatchedDetails, FleetRolloutCompletedDetails, FleetRolloutDeviceSelectedDetails, FleetRolloutFailedDetails, FleetRolloutStartedDetails, InternalTaskFailedDetails, InternalTaskPermanentlyFailedDetails, PrepareDeltasDetails, ReferencedRepositoryUpdatedDetails, ResourceSyncCompletedDetails, ResourceUpdatedDetails]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/flightctl/models/failure_policy_type.py b/flightctl/models/failure_policy_type.py new file mode 100644 index 0000000..ba35366 --- /dev/null +++ b/flightctl/models/failure_policy_type.py @@ -0,0 +1,36 @@ +# 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 FailurePolicyType(str, Enum): + """ + Determines behavior when a hook action fails. + """ + + """ + allowed enum values + """ + FailurePolicyBlock = 'Block' + FailurePolicyContinue = 'Continue' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FailurePolicyType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/models/fleet_status.py b/flightctl/models/fleet_status.py index bd9d989..c9517ff 100644 --- a/flightctl/models/fleet_status.py +++ b/flightctl/models/fleet_status.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.condition import Condition +from flightctl.models.delta_generation_status import DeltaGenerationStatus from flightctl.models.devices_summary import DevicesSummary from flightctl.models.fleet_rollout_status import FleetRolloutStatus from typing import Optional, Set @@ -33,7 +34,8 @@ class FleetStatus(BaseModel): rollout: Optional[FleetRolloutStatus] = None conditions: List[Condition] = Field(description="Current state of the fleet.") devices_summary: Optional[DevicesSummary] = Field(default=None, alias="devicesSummary") - __properties: ClassVar[List[str]] = ["rollout", "conditions", "devicesSummary"] + delta_generation: Optional[DeltaGenerationStatus] = Field(default=None, alias="deltaGeneration") + __properties: ClassVar[List[str]] = ["rollout", "conditions", "devicesSummary", "deltaGeneration"] model_config = ConfigDict( populate_by_name=True, @@ -87,6 +89,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of devices_summary if self.devices_summary: _dict['devicesSummary'] = self.devices_summary.to_dict() + # override the default output from pydantic by calling `to_dict()` of delta_generation + if self.delta_generation: + _dict['deltaGeneration'] = self.delta_generation.to_dict() return _dict @classmethod @@ -101,7 +106,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "rollout": FleetRolloutStatus.from_dict(obj["rollout"]) if obj.get("rollout") is not None else None, "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None, - "devicesSummary": DevicesSummary.from_dict(obj["devicesSummary"]) if obj.get("devicesSummary") is not None else None + "devicesSummary": DevicesSummary.from_dict(obj["devicesSummary"]) if obj.get("devicesSummary") is not None else None, + "deltaGeneration": DeltaGenerationStatus.from_dict(obj["deltaGeneration"]) if obj.get("deltaGeneration") is not None else None }) return _obj diff --git a/flightctl/models/helm_application.py b/flightctl/models/helm_application.py index ace5f44..d6f076c 100644 --- a/flightctl/models/helm_application.py +++ b/flightctl/models/helm_application.py @@ -23,6 +23,7 @@ from flightctl.models.app_type import AppType from flightctl.models.application_desired_state import ApplicationDesiredState from flightctl.models.catalog_item_ref_spec import CatalogItemRefSpec +from flightctl.models.image_delta_hint import ImageDeltaHint from typing import Optional, Set from typing_extensions import Self @@ -36,11 +37,13 @@ class HelmApplication(BaseModel): desired_state: Optional[ApplicationDesiredState] = Field(default=None, description="Desired lifecycle state for this application, as most recently set by the stop/start device APIs. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent.", alias="desiredState") restart_generation: Optional[StrictInt] = Field(default=None, description="Counter incremented by the restart device API each time the application is restarted. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent.", alias="restartGeneration") image: StrictStr = Field(description="Reference to an OCI image or artifact with tag.") + delta_image: Optional[StrictStr] = Field(default=None, description="Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImage") + delta_images: Optional[List[ImageDeltaHint]] = Field(default=None, description="Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry identifies a target image reference and digest and names its delta artifact reference. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImages") catalog_item_ref: CatalogItemRefSpec = Field(alias="catalogItemRef") namespace: Optional[StrictStr] = Field(default=None, description="The target namespace for the application deployment.") values: Optional[Dict[str, Any]] = Field(default=None, description="Configuration values for the application. Supports arbitrarily nested structures.") values_files: Optional[List[StrictStr]] = Field(default=None, description="List of values files to apply during deployment. Files are relative paths and applied in array order before user-provided values.", alias="valuesFiles") - __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "image", "catalogItemRef", "namespace", "values", "valuesFiles"] + __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "image", "deltaImage", "deltaImages", "catalogItemRef", "namespace", "values", "valuesFiles"] model_config = ConfigDict( populate_by_name=True, @@ -75,11 +78,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "annotations", "desired_state", "restart_generation", + "delta_image", + "delta_images", ]) _dict = self.model_dump( @@ -87,6 +94,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 each item in delta_images (list) + _items = [] + if self.delta_images: + for _item_delta_images in self.delta_images: + if _item_delta_images: + _items.append(_item_delta_images.to_dict()) + _dict['deltaImages'] = _items # override the default output from pydantic by calling `to_dict()` of catalog_item_ref if self.catalog_item_ref: _dict['catalogItemRef'] = self.catalog_item_ref.to_dict() @@ -108,6 +122,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "desiredState": obj.get("desiredState"), "restartGeneration": obj.get("restartGeneration"), "image": obj.get("image"), + "deltaImage": obj.get("deltaImage"), + "deltaImages": [ImageDeltaHint.from_dict(_item) for _item in obj["deltaImages"]] if obj.get("deltaImages") is not None else None, "catalogItemRef": CatalogItemRefSpec.from_dict(obj["catalogItemRef"]) if obj.get("catalogItemRef") is not None else None, "namespace": obj.get("namespace"), "values": obj.get("values"), diff --git a/flightctl/models/image_delta_hint.py b/flightctl/models/image_delta_hint.py new file mode 100644 index 0000000..757355c --- /dev/null +++ b/flightctl/models/image_delta_hint.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 ImageDeltaHint(BaseModel): + """ + A control-plane-generated delta hint for a nested image within an application. Present only in rendered application specs delivered to the agent. + """ # noqa: E501 + target_image: StrictStr = Field(description="The target image reference this delta applies to.", alias="targetImage") + target_digest: StrictStr = Field(description="The content digest of the target image.", alias="targetDigest") + delta_image: StrictStr = Field(description="Reference to the delta artifact for this nested image.", alias="deltaImage") + __properties: ClassVar[List[str]] = ["targetImage", "targetDigest", "deltaImage"] + + 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 ImageDeltaHint 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 ImageDeltaHint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetImage": obj.get("targetImage"), + "targetDigest": obj.get("targetDigest"), + "deltaImage": obj.get("deltaImage") + }) + return _obj diff --git a/flightctl/models/image_spec.py b/flightctl/models/image_spec.py index 13e04d2..6b1f2a2 100644 --- a/flightctl/models/image_spec.py +++ b/flightctl/models/image_spec.py @@ -19,7 +19,8 @@ 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.image_delta_hint import ImageDeltaHint from typing import Optional, Set from typing_extensions import Self @@ -28,7 +29,9 @@ class ImageSpec(BaseModel): Reference to an OCI image or artifact with tag. """ # noqa: E501 image: StrictStr = Field(description="Reference to an OCI image or artifact with tag.") - __properties: ClassVar[List[str]] = ["image"] + delta_image: Optional[StrictStr] = Field(default=None, description="Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImage") + delta_images: Optional[List[ImageDeltaHint]] = Field(default=None, description="Optional hints for nested images within this application (e.g. service images in a compose app, OCI volume images). Each entry identifies a target image reference and digest and names its delta artifact reference. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImages") + __properties: ClassVar[List[str]] = ["image", "deltaImage", "deltaImages"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +63,12 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ + "delta_image", + "delta_images", ]) _dict = self.model_dump( @@ -69,6 +76,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 each item in delta_images (list) + _items = [] + if self.delta_images: + for _item_delta_images in self.delta_images: + if _item_delta_images: + _items.append(_item_delta_images.to_dict()) + _dict['deltaImages'] = _items return _dict @classmethod @@ -81,7 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "image": obj.get("image") + "image": obj.get("image"), + "deltaImage": obj.get("deltaImage"), + "deltaImages": [ImageDeltaHint.from_dict(_item) for _item in obj["deltaImages"]] if obj.get("deltaImages") is not None else None }) return _obj diff --git a/flightctl/models/inline_application_provider_spec.py b/flightctl/models/inline_application_provider_spec.py index 701ee34..a10d34d 100644 --- a/flightctl/models/inline_application_provider_spec.py +++ b/flightctl/models/inline_application_provider_spec.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.application_content import ApplicationContent +from flightctl.models.image_delta_hint import ImageDeltaHint from typing import Optional, Set from typing_extensions import Self @@ -29,7 +30,8 @@ class InlineApplicationProviderSpec(BaseModel): InlineApplicationProviderSpec """ # noqa: E501 inline: List[ApplicationContent] = Field(description="A list of application content.") - __properties: ClassVar[List[str]] = ["inline"] + delta_images: Optional[List[ImageDeltaHint]] = Field(default=None, description="Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImages") + __properties: ClassVar[List[str]] = ["inline", "deltaImages"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ + "delta_images", ]) _dict = self.model_dump( @@ -77,6 +81,13 @@ def to_dict(self) -> Dict[str, Any]: if _item_inline: _items.append(_item_inline.to_dict()) _dict['inline'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in delta_images (list) + _items = [] + if self.delta_images: + for _item_delta_images in self.delta_images: + if _item_delta_images: + _items.append(_item_delta_images.to_dict()) + _dict['deltaImages'] = _items return _dict @classmethod @@ -89,7 +100,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None + "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None, + "deltaImages": [ImageDeltaHint.from_dict(_item) for _item in obj["deltaImages"]] if obj.get("deltaImages") is not None else None }) return _obj diff --git a/flightctl/models/label_sync_mapping.py b/flightctl/models/label_sync_mapping.py new file mode 100644 index 0000000..0c64fd7 --- /dev/null +++ b/flightctl/models/label_sync_mapping.py @@ -0,0 +1,114 @@ +# 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 flightctl.models.api_version import ApiVersion +from flightctl.models.label_sync_mapping_spec import LabelSyncMappingSpec +from flightctl.models.label_sync_mapping_status import LabelSyncMappingStatus +from flightctl.models.object_meta import ObjectMeta +from typing import Optional, Set +from typing_extensions import Self + +class LabelSyncMapping(BaseModel): + """ + LabelSyncMapping defines an organization-scoped device label mapping. + """ # noqa: E501 + api_version: ApiVersion = Field(alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing this resource type.") + metadata: ObjectMeta + spec: LabelSyncMappingSpec + status: Optional[LabelSyncMappingStatus] = None + __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "spec", "status"] + + @field_validator('kind') + def kind_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['LabelSyncMapping']): + raise ValueError("must be one of enum values ('LabelSyncMapping')") + 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 LabelSyncMapping 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() + # override the default output from pydantic by calling `to_dict()` of status + if self.status: + _dict['status'] = self.status.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LabelSyncMapping 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": LabelSyncMappingSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None, + "status": LabelSyncMappingStatus.from_dict(obj["status"]) if obj.get("status") is not None else None + }) + return _obj diff --git a/flightctl/models/label_sync_mapping_list.py b/flightctl/models/label_sync_mapping_list.py new file mode 100644 index 0000000..e73cde6 --- /dev/null +++ b/flightctl/models/label_sync_mapping_list.py @@ -0,0 +1,105 @@ +# 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.api_version import ApiVersion +from flightctl.models.label_sync_mapping import LabelSyncMapping +from flightctl.models.list_meta import ListMeta +from typing import Optional, Set +from typing_extensions import Self + +class LabelSyncMappingList(BaseModel): + """ + LabelSyncMappingList is a list of LabelSyncMapping resources. + """ # noqa: E501 + api_version: ApiVersion = Field(alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents.") + metadata: ListMeta + items: List[LabelSyncMapping] = Field(description="List of LabelSyncMapping resources.") + __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 LabelSyncMappingList 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 LabelSyncMappingList 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": [LabelSyncMapping.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj diff --git a/flightctl/models/label_sync_mapping_spec.py b/flightctl/models/label_sync_mapping_spec.py new file mode 100644 index 0000000..03f74f7 --- /dev/null +++ b/flightctl/models/label_sync_mapping_spec.py @@ -0,0 +1,113 @@ +# 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class LabelSyncMappingSpec(BaseModel): + """ + Desired state for a label synchronization mapping. + """ # noqa: E501 + resource_type: StrictStr = Field(description="Immutable resource type evaluated by the mapping.", alias="resourceType") + key: Optional[Annotated[str, Field(strict=True, max_length=317)]] = Field(default=None, description="Complete destination label key for scalar mode. Omitted or null selects map mode; no prefix is added.") + expression: Annotated[str, Field(min_length=1, strict=True)] = Field(description="CEL expression evaluated for the selected resource type.") + __properties: ClassVar[List[str]] = ["resourceType", "key", "expression"] + + @field_validator('resource_type') + def resource_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Device']): + raise ValueError("must be one of enum values ('Device')") + return value + + @field_validator('key') + def key_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*\/)?[A-Za-z0-9](?:[-A-Za-z0-9_.]*[A-Za-z0-9])?$", value): + raise ValueError(r"must validate the regular expression /^(?:[a-z0-9](?:[-a-z0-9]*[a-z0-9])?(?:\.[a-z0-9](?:[-a-z0-9]*[a-z0-9])?)*\/)?[A-Za-z0-9](?:[-A-Za-z0-9_.]*[A-Za-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 LabelSyncMappingSpec 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 key (nullable) is None + # and model_fields_set contains the field + if self.key is None and "key" in self.model_fields_set: + _dict['key'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LabelSyncMappingSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "resourceType": obj.get("resourceType"), + "key": obj.get("key"), + "expression": obj.get("expression") + }) + return _obj diff --git a/flightctl/models/label_sync_mapping_status.py b/flightctl/models/label_sync_mapping_status.py new file mode 100644 index 0000000..a2e21e8 --- /dev/null +++ b/flightctl/models/label_sync_mapping_status.py @@ -0,0 +1,94 @@ +# 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, Optional +from flightctl.models.condition import Condition +from typing import Optional, Set +from typing_extensions import Self + +class LabelSyncMappingStatus(BaseModel): + """ + Current propagation state for a label synchronization mapping. + """ # noqa: E501 + conditions: Optional[List[Condition]] = Field(default=None, description="The Ready condition reports Pending, Degraded, or Success state.") + __properties: ClassVar[List[str]] = ["conditions"] + + 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 LabelSyncMappingStatus 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 conditions (list) + _items = [] + if self.conditions: + for _item_conditions in self.conditions: + if _item_conditions: + _items.append(_item_conditions.to_dict()) + _dict['conditions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LabelSyncMappingStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "conditions": [Condition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None + }) + return _obj diff --git a/flightctl/models/label_sync_provenance_item.py b/flightctl/models/label_sync_provenance_item.py new file mode 100644 index 0000000..2bcbb93 --- /dev/null +++ b/flightctl/models/label_sync_provenance_item.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 LabelSyncProvenanceItem(BaseModel): + """ + Current owning LabelSyncMapping names for one exact label key. + """ # noqa: E501 + key: StrictStr = Field(description="Exact label key.") + owners: List[StrictStr] = Field(description="Names of current owning LabelSyncMapping resources. An empty array means the key has no current mapping owner.") + __properties: ClassVar[List[str]] = ["key", "owners"] + + 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 LabelSyncProvenanceItem 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 LabelSyncProvenanceItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "key": obj.get("key"), + "owners": obj.get("owners") + }) + return _obj diff --git a/flightctl/models/label_sync_provenance_list.py b/flightctl/models/label_sync_provenance_list.py new file mode 100644 index 0000000..76968c3 --- /dev/null +++ b/flightctl/models/label_sync_provenance_list.py @@ -0,0 +1,94 @@ +# 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.label_sync_provenance_item import LabelSyncProvenanceItem +from typing import Optional, Set +from typing_extensions import Self + +class LabelSyncProvenanceList(BaseModel): + """ + Current LabelSyncMapping ownership grouped by exact label key. + """ # noqa: E501 + items: List[LabelSyncProvenanceItem] = Field(description="For organization queries, one item per supplied key in request order, including duplicates. For Device queries, one item per currently owned key, sorted by key.") + __properties: ClassVar[List[str]] = ["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 LabelSyncProvenanceList 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 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 LabelSyncProvenanceList from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [LabelSyncProvenanceItem.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + }) + return _obj diff --git a/flightctl/models/o_auth2_provider_spec.py b/flightctl/models/o_auth2_provider_spec.py index e2e7abf..117e047 100644 --- a/flightctl/models/o_auth2_provider_spec.py +++ b/flightctl/models/o_auth2_provider_spec.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment from flightctl.models.auth_role_assignment import AuthRoleAssignment from flightctl.models.o_auth2_introspection import OAuth2Introspection @@ -40,11 +41,12 @@ class OAuth2ProviderSpec(BaseModel): 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.") + prompt: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Space-separated, case-sensitive authorization prompt values, such as login, consent, select_account, none, or provider-specific values. Omitted and null values are preserved in AuthProvider resources and exposed as select_account in public authentication configuration. An empty string instructs clients to omit the prompt parameter. Values must be printable ASCII separated by spaces; none cannot accompany a different value. Accepted values are preserved, including extra spaces and duplicates.") 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"] + __properties: ClassVar[List[str]] = ["providerType", "displayName", "issuer", "authorizationUrl", "tokenUrl", "userinfoUrl", "clientId", "clientSecret", "enabled", "scopes", "prompt", "organizationAssignment", "usernameClaim", "roleAssignment", "introspection"] @field_validator('provider_type') def provider_type_validate_enum(cls, value): @@ -53,6 +55,16 @@ def provider_type_validate_enum(cls, value): raise ValueError("must be one of enum values ('oauth2')") return value + @field_validator('prompt') + def prompt_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(| *[!-~]+( +[!-~]+)* *)$", value): + raise ValueError(r"must validate the regular expression /^(| *[!-~]+( +[!-~]+)* *)$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -101,6 +113,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of introspection if self.introspection: _dict['introspection'] = self.introspection.to_dict() + # set to None if prompt (nullable) is None + # and model_fields_set contains the field + if self.prompt is None and "prompt" in self.model_fields_set: + _dict['prompt'] = None + return _dict @classmethod @@ -123,6 +140,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "clientSecret": obj.get("clientSecret"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, "scopes": obj.get("scopes"), + "prompt": obj.get("prompt"), "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, diff --git a/flightctl/models/oci_repo_spec.py b/flightctl/models/oci_repo_spec.py index 2c32911..b0f8681 100644 --- a/flightctl/models/oci_repo_spec.py +++ b/flightctl/models/oci_repo_spec.py @@ -36,8 +36,11 @@ class OciRepoSpec(BaseModel): oci_auth: Optional[DockerAuth] = Field(default=None, alias="ociAuth") ca_crt: Optional[StrictStr] = Field(default=None, description="Base64 encoded root CA.", alias="ca.crt") skip_server_verification: Optional[StrictBool] = Field(default=None, description="Skip remote server verification.", alias="skipServerVerification") + repository: Optional[StrictStr] = Field(default=None, description="Optional OCI repository path under spec.registry (e.g. my-org/diffs). When set, this object is that repo (`my-registry.com/my-org/diffs`), not only a registry. Mutually exclusive with namespace. ImageBuild destination imageName must equal this value.") + namespace: Optional[StrictStr] = Field(default=None, description="Optional org/subpath under spec.registry (e.g. my-org). Concrete names are spec.registry/namespace/. Mutually exclusive with repository. Used by delta push (`{registry}/{namespace}/{imageName}`). Invalid on an ImageBuild or ImageExport destination Repository.") + delta_storage_target: Optional[StrictBool] = Field(default=None, description="When true, generated deltas are pushed to this object (at most one per org). Auth is the existing ociAuth / accessMode. Placement follows repository / namespace / registry-only as above.", alias="deltaStorageTarget") base_images: Optional[List[BaseImageEntry]] = Field(default=None, description="Curated list of trusted base images available in this registry. When present, the Image Builder source picker surfaces these entries as selectable options.", alias="baseImages") - __properties: ClassVar[List[str]] = ["registry", "scheme", "type", "accessMode", "ociAuth", "ca.crt", "skipServerVerification", "baseImages"] + __properties: ClassVar[List[str]] = ["registry", "scheme", "type", "accessMode", "ociAuth", "ca.crt", "skipServerVerification", "repository", "namespace", "deltaStorageTarget", "baseImages"] @field_validator('scheme') def scheme_validate_enum(cls, value): @@ -134,6 +137,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "ociAuth": DockerAuth.from_dict(obj["ociAuth"]) if obj.get("ociAuth") is not None else None, "ca.crt": obj.get("ca.crt"), "skipServerVerification": obj.get("skipServerVerification"), + "repository": obj.get("repository"), + "namespace": obj.get("namespace"), + "deltaStorageTarget": obj.get("deltaStorageTarget"), "baseImages": [BaseImageEntry.from_dict(_item) for _item in obj["baseImages"]] if obj.get("baseImages") is not None else None }) return _obj diff --git a/flightctl/models/oidc_provider_spec.py b/flightctl/models/oidc_provider_spec.py index 39a9c37..144a5ee 100644 --- a/flightctl/models/oidc_provider_spec.py +++ b/flightctl/models/oidc_provider_spec.py @@ -20,6 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from flightctl.models.auth_organization_assignment import AuthOrganizationAssignment from flightctl.models.auth_role_assignment import AuthRoleAssignment from typing import Optional, Set @@ -36,10 +37,11 @@ class OIDCProviderSpec(BaseModel): 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.") + prompt: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Space-separated, case-sensitive authorization prompt values, such as login, consent, select_account, none, or provider-specific values. Omitted and null values are preserved in AuthProvider resources and exposed as select_account in public authentication configuration. An empty string instructs clients to omit the prompt parameter. Values must be printable ASCII separated by spaces; none cannot accompany a different value. Accepted values are preserved, including extra spaces and duplicates.") 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"] + __properties: ClassVar[List[str]] = ["providerType", "displayName", "issuer", "clientId", "clientSecret", "enabled", "scopes", "prompt", "organizationAssignment", "usernameClaim", "roleAssignment"] @field_validator('provider_type') def provider_type_validate_enum(cls, value): @@ -48,6 +50,16 @@ def provider_type_validate_enum(cls, value): raise ValueError("must be one of enum values ('oidc')") return value + @field_validator('prompt') + def prompt_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(| *[!-~]+( +[!-~]+)* *)$", value): + raise ValueError(r"must validate the regular expression /^(| *[!-~]+( +[!-~]+)* *)$/") + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -93,6 +105,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of role_assignment if self.role_assignment: _dict['roleAssignment'] = self.role_assignment.to_dict() + # set to None if prompt (nullable) is None + # and model_fields_set contains the field + if self.prompt is None and "prompt" in self.model_fields_set: + _dict['prompt'] = None + return _dict @classmethod @@ -112,6 +129,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "clientSecret": obj.get("clientSecret"), "enabled": obj.get("enabled") if obj.get("enabled") is not None else True, "scopes": obj.get("scopes"), + "prompt": obj.get("prompt"), "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 diff --git a/flightctl/models/pre_enrollment_action_result.py b/flightctl/models/pre_enrollment_action_result.py new file mode 100644 index 0000000..0f3190f --- /dev/null +++ b/flightctl/models/pre_enrollment_action_result.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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PreEnrollmentActionResult(BaseModel): + """ + Result of a single executed pre-enrollment hook action, agent-populated. + """ # noqa: E501 + source: StrictStr = Field(description="Path to the hook definition YAML that contained this action (for example /etc/flightctl/hooks.d/beforeenrolling/10-network.yaml).") + exit_code: StrictInt = Field(description="Process exit code from the hook action.", alias="exitCode") + output: Optional[StrictStr] = Field(default=None, description="Redacted stdout/stderr from this action. The total size across all actions is capped at 4KiB. Secret patterns (PEM blocks, Bearer prefixes, known token env names) are redacted before persistence.") + __properties: ClassVar[List[str]] = ["source", "exitCode", "output"] + + 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 PreEnrollmentActionResult 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 PreEnrollmentActionResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "source": obj.get("source"), + "exitCode": obj.get("exitCode"), + "output": obj.get("output") + }) + return _obj diff --git a/flightctl/models/pre_enrollment_result.py b/flightctl/models/pre_enrollment_result.py new file mode 100644 index 0000000..d2c8856 --- /dev/null +++ b/flightctl/models/pre_enrollment_result.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, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.pre_enrollment_action_result import PreEnrollmentActionResult +from typing import Optional, Set +from typing_extensions import Self + +class PreEnrollmentResult(BaseModel): + """ + Result of pre-enrollment hook execution, agent-populated. + """ # noqa: E501 + success: StrictBool = Field(description="Whether all pre-enrollment hooks completed with exit code 0.") + actions: Optional[List[PreEnrollmentActionResult]] = Field(default=None, description="Per-action results in execution order.") + __properties: ClassVar[List[str]] = ["success", "actions"] + + 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 PreEnrollmentResult 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 actions (list) + _items = [] + if self.actions: + for _item_actions in self.actions: + if _item_actions: + _items.append(_item_actions.to_dict()) + _dict['actions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PreEnrollmentResult from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "success": obj.get("success"), + "actions": [PreEnrollmentActionResult.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None + }) + return _obj diff --git a/flightctl/models/prepare_deltas_details.py b/flightctl/models/prepare_deltas_details.py new file mode 100644 index 0000000..f3e0bf3 --- /dev/null +++ b/flightctl/models/prepare_deltas_details.py @@ -0,0 +1,100 @@ +# 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_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PrepareDeltasDetails(BaseModel): + """ + Structured details for PrepareDeltas events. + """ # noqa: E501 + detail_type: StrictStr = Field(description="The type of detail for discriminator purposes.", alias="detailType") + template_version: Optional[StrictStr] = Field(default=None, description="Fleet only. The TemplateVersion this prepare is for. Required when involvedObject.kind is Fleet; omitted for Device.", alias="templateVersion") + generation: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Device only. The desired spec generation this prepare is for. Required when involvedObject.kind is Device; omitted for Fleet.") + resource_version: Optional[StrictStr] = Field(default=None, description="The resource version of the involved Fleet or Device when this prepare event was created. Used to ignore stale prepare events. May be omitted for retained events created before this field was introduced.", alias="resourceVersion") + __properties: ClassVar[List[str]] = ["detailType", "templateVersion", "generation", "resourceVersion"] + + @field_validator('detail_type') + def detail_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PrepareDeltas']): + raise ValueError("must be one of enum values ('PrepareDeltas')") + 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 PrepareDeltasDetails 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 PrepareDeltasDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "detailType": obj.get("detailType"), + "templateVersion": obj.get("templateVersion"), + "generation": obj.get("generation"), + "resourceVersion": obj.get("resourceVersion") + }) + return _obj diff --git a/flightctl/models/quadlet_application.py b/flightctl/models/quadlet_application.py index 0b698f6..99f9b79 100644 --- a/flightctl/models/quadlet_application.py +++ b/flightctl/models/quadlet_application.py @@ -25,6 +25,7 @@ from flightctl.models.application_desired_state import ApplicationDesiredState from flightctl.models.application_volume import ApplicationVolume from flightctl.models.catalog_item_ref_spec import CatalogItemRefSpec +from flightctl.models.image_delta_hint import ImageDeltaHint from typing import Optional, Set from typing_extensions import Self @@ -41,9 +42,11 @@ class QuadletApplication(BaseModel): run_as: Optional[StrictStr] = Field(default=None, description="The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified.", alias="runAs") volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") image: StrictStr = Field(description="Reference to an OCI image or artifact with tag.") + delta_image: Optional[StrictStr] = Field(default=None, description="Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImage") + delta_images: Optional[List[ImageDeltaHint]] = Field(default=None, description="Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImages") catalog_item_ref: CatalogItemRefSpec = Field(alias="catalogItemRef") inline: List[ApplicationContent] = Field(description="A list of application content.") - __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "envVars", "runAs", "volumes", "image", "catalogItemRef", "inline"] + __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "envVars", "runAs", "volumes", "image", "deltaImage", "deltaImages", "catalogItemRef", "inline"] model_config = ConfigDict( populate_by_name=True, @@ -78,11 +81,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "annotations", "desired_state", "restart_generation", + "delta_image", + "delta_images", ]) _dict = self.model_dump( @@ -97,6 +104,13 @@ 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 each item in delta_images (list) + _items = [] + if self.delta_images: + for _item_delta_images in self.delta_images: + if _item_delta_images: + _items.append(_item_delta_images.to_dict()) + _dict['deltaImages'] = _items # override the default output from pydantic by calling `to_dict()` of catalog_item_ref if self.catalog_item_ref: _dict['catalogItemRef'] = self.catalog_item_ref.to_dict() @@ -128,6 +142,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "runAs": obj.get("runAs"), "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, "image": obj.get("image"), + "deltaImage": obj.get("deltaImage"), + "deltaImages": [ImageDeltaHint.from_dict(_item) for _item in obj["deltaImages"]] if obj.get("deltaImages") is not None else None, "catalogItemRef": CatalogItemRefSpec.from_dict(obj["catalogItemRef"]) if obj.get("catalogItemRef") is not None else None, "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None }) diff --git a/flightctl/models/resource_updated_details.py b/flightctl/models/resource_updated_details.py index 011169e..3a94bc1 100644 --- a/flightctl/models/resource_updated_details.py +++ b/flightctl/models/resource_updated_details.py @@ -44,8 +44,8 @@ def detail_type_validate_enum(cls, value): def updated_fields_validate_enum(cls, value): """Validates the enum""" for i in value: - if i not in set(['owner', 'labels', 'spec', 'spec.selector', 'spec.template']): - raise ValueError("each list item must be one of ('owner', 'labels', 'spec', 'spec.selector', 'spec.template')") + if i not in set(['owner', 'labels', 'spec', 'spec.selector', 'spec.template', 'status.conditions.EnrollmentHooks']): + raise ValueError("each list item must be one of ('owner', 'labels', 'spec', 'spec.selector', 'spec.template', 'status.conditions.EnrollmentHooks')") return value model_config = ConfigDict( diff --git a/flightctl/models/rollout_policy.py b/flightctl/models/rollout_policy.py index 157d97b..d741b90 100644 --- a/flightctl/models/rollout_policy.py +++ b/flightctl/models/rollout_policy.py @@ -23,6 +23,7 @@ from typing_extensions import Annotated from flightctl.models.batch_sequence import BatchSequence from flightctl.models.disruption_budget import DisruptionBudget +from flightctl.models.rollout_policy_delta_generation import RolloutPolicyDeltaGeneration from typing import Optional, Set from typing_extensions import Self @@ -34,7 +35,8 @@ class RolloutPolicy(BaseModel): 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=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"] + delta_generation: Optional[RolloutPolicyDeltaGeneration] = Field(default=None, alias="deltaGeneration") + __properties: ClassVar[List[str]] = ["disruptionBudget", "deviceSelection", "successThreshold", "defaultUpdateTimeout", "deltaGeneration"] @field_validator('default_update_timeout') def default_update_timeout_validate_regular_expression(cls, value): @@ -91,6 +93,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of device_selection if self.device_selection: _dict['deviceSelection'] = self.device_selection.to_dict() + # override the default output from pydantic by calling `to_dict()` of delta_generation + if self.delta_generation: + _dict['deltaGeneration'] = self.delta_generation.to_dict() return _dict @classmethod @@ -106,7 +111,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "disruptionBudget": DisruptionBudget.from_dict(obj["disruptionBudget"]) if obj.get("disruptionBudget") 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") + "defaultUpdateTimeout": obj.get("defaultUpdateTimeout"), + "deltaGeneration": RolloutPolicyDeltaGeneration.from_dict(obj["deltaGeneration"]) if obj.get("deltaGeneration") is not None else None }) return _obj diff --git a/flightctl/models/rollout_policy_delta_generation.py b/flightctl/models/rollout_policy_delta_generation.py new file mode 100644 index 0000000..0ee72a6 --- /dev/null +++ b/flightctl/models/rollout_policy_delta_generation.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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class RolloutPolicyDeltaGeneration(BaseModel): + """ + Controls OS delta generation for this fleet rollout. + """ # noqa: E501 + generate_delta: Optional[StrictBool] = Field(default=None, description="When false, skip control-plane OS delta generation for this fleet. Omitted means true.", alias="generateDelta") + max_wait_for_delta: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="How long a prepare may wait before periodic resume. Omitted uses DeltaGeneration.maxWaitForDelta. Ignored when generateDelta is false. 0s still generates then resumes immediately.", alias="maxWaitForDelta") + delta_generation_timeout: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Context deadline for each generation job. Omitted uses DeltaGeneration.timeout.", alias="deltaGenerationTimeout") + __properties: ClassVar[List[str]] = ["generateDelta", "maxWaitForDelta", "deltaGenerationTimeout"] + + @field_validator('max_wait_for_delta') + def max_wait_for_delta_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 + + @field_validator('delta_generation_timeout') + def delta_generation_timeout_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 + + 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 RolloutPolicyDeltaGeneration 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 RolloutPolicyDeltaGeneration from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "generateDelta": obj.get("generateDelta"), + "maxWaitForDelta": obj.get("maxWaitForDelta"), + "deltaGenerationTimeout": obj.get("deltaGenerationTimeout") + }) + return _obj diff --git a/flightctl/models/system_info_source_status.py b/flightctl/models/system_info_source_status.py new file mode 100644 index 0000000..8f20d8a --- /dev/null +++ b/flightctl/models/system_info_source_status.py @@ -0,0 +1,93 @@ +# 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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flightctl.models.system_info_source_status_type import SystemInfoSourceStatusType +from typing import Optional, Set +from typing_extensions import Self + +class SystemInfoSourceStatus(BaseModel): + """ + Collection status for a single system information source. + """ # noqa: E501 + status: SystemInfoSourceStatusType + last_transition_time: datetime = Field(description="The last time the collection status of this source changed.", alias="lastTransitionTime") + message: Optional[Annotated[str, Field(strict=True, max_length=260)]] = Field(default=None, description="Human readable message providing details about the source status.") + __properties: ClassVar[List[str]] = ["status", "lastTransitionTime", "message"] + + 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 SystemInfoSourceStatus 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 SystemInfoSourceStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "lastTransitionTime": obj.get("lastTransitionTime"), + "message": obj.get("message") + }) + return _obj diff --git a/flightctl/models/system_info_source_status_type.py b/flightctl/models/system_info_source_status_type.py new file mode 100644 index 0000000..9905b6a --- /dev/null +++ b/flightctl/models/system_info_source_status_type.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 SystemInfoSourceStatusType(str, Enum): + """ + Collection health of a single system information source. + """ + + """ + allowed enum values + """ + SystemInfoSourceStatusHealthy = 'Healthy' + SystemInfoSourceStatusError = 'Error' + SystemInfoSourceStatusUnknown = 'Unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SystemInfoSourceStatusType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/models/system_info_summary_status_type.py b/flightctl/models/system_info_summary_status_type.py new file mode 100644 index 0000000..7b4d332 --- /dev/null +++ b/flightctl/models/system_info_summary_status_type.py @@ -0,0 +1,38 @@ +# 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 SystemInfoSummaryStatusType(str, Enum): + """ + Aggregate health of the system information collection. + """ + + """ + allowed enum values + """ + SystemInfoSummaryStatusHealthy = 'Healthy' + SystemInfoSummaryStatusDegraded = 'Degraded' + SystemInfoSummaryStatusError = 'Error' + SystemInfoSummaryStatusUnknown = 'Unknown' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SystemInfoSummaryStatusType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/models/template_version_status.py b/flightctl/models/template_version_status.py index 90c278e..a8fb9b2 100644 --- a/flightctl/models/template_version_status.py +++ b/flightctl/models/template_version_status.py @@ -26,9 +26,9 @@ from flightctl.models.config_provider_spec import ConfigProviderSpec from flightctl.models.device_console import DeviceConsole from flightctl.models.device_decommission import DeviceDecommission +from flightctl.models.device_os_spec import DeviceOsSpec from flightctl.models.device_spec_systemd import DeviceSpecSystemd from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec -from flightctl.models.image_or_catalog_item_ref_spec import ImageOrCatalogItemRefSpec from flightctl.models.resource_monitor import ResourceMonitor from typing import Optional, Set from typing_extensions import Self @@ -38,7 +38,7 @@ class TemplateVersionStatus(BaseModel): TemplateVersionStatus represents information about the status of a template version. """ # noqa: E501 update_policy: Optional[DeviceUpdatePolicySpec] = Field(default=None, alias="updatePolicy") - os: Optional[ImageOrCatalogItemRefSpec] = None + os: Optional[DeviceOsSpec] = None config: Optional[List[ConfigProviderSpec]] = Field(default=None, description="List of config providers.") applications: Optional[List[ApplicationProviderSpec]] = Field(default=None, description="List of application providers.") systemd: Optional[DeviceSpecSystemd] = None @@ -148,7 +148,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "updatePolicy": DeviceUpdatePolicySpec.from_dict(obj["updatePolicy"]) if obj.get("updatePolicy") is not None else None, - "os": ImageOrCatalogItemRefSpec.from_dict(obj["os"]) if obj.get("os") is not None else None, + "os": DeviceOsSpec.from_dict(obj["os"]) if obj.get("os") is not None else None, "config": [ConfigProviderSpec.from_dict(_item) for _item in obj["config"]] if obj.get("config") is not None else None, "applications": [ApplicationProviderSpec.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None, "systemd": DeviceSpecSystemd.from_dict(obj["systemd"]) if obj.get("systemd") is not None else None, diff --git a/flightctl/models/vm_application.py b/flightctl/models/vm_application.py index 7e7380f..1af199d 100644 --- a/flightctl/models/vm_application.py +++ b/flightctl/models/vm_application.py @@ -24,6 +24,7 @@ from flightctl.models.app_type import AppType from flightctl.models.application_content import ApplicationContent from flightctl.models.application_desired_state import ApplicationDesiredState +from flightctl.models.image_delta_hint import ImageDeltaHint from typing import Optional, Set from typing_extensions import Self @@ -36,10 +37,13 @@ class VmApplication(BaseModel): annotations: Optional[Dict[str, StrictStr]] = Field(default=None, description="Arbitrary metadata annotations. Used internally by the control plane (e.g., flightctl.io/workload-type) when transforming application types at render time.") desired_state: Optional[ApplicationDesiredState] = Field(default=None, description="Desired lifecycle state for this application, as most recently set by the stop/start device APIs. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent.", alias="desiredState") restart_generation: Optional[StrictInt] = Field(default=None, description="Counter incremented by the restart device API each time the application is restarted. Read-only: cannot be set directly by apply; only present in the rendered application spec delivered to the agent.", alias="restartGeneration") + run_as: Optional[StrictStr] = Field(default=None, description="The username of the system user this application should be run under. This is not the same as the user within any containers of the application (if applicable). Defaults to the user that the agent runs as (generally root) if not specified.", alias="runAs") publish_ports: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="List of host-to-guest port mappings for the VM. Each entry must follow the format \"hostPort:guestPort\" or \"hostPort:guestPort/protocol\" (e.g. \"8080:80\" or \"8080:80/tcp\").", alias="publishPorts") image: StrictStr = Field(description="Reference to an OCI image or artifact with tag.") + delta_image: Optional[StrictStr] = Field(default=None, description="Optional hint: a reference to a delta artifact for the main image. Set by the control plane when a successful delta generation record exists for the current-to-target digest transition. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImage") + delta_images: Optional[List[ImageDeltaHint]] = Field(default=None, description="Optional hints for nested OCI images referenced by this inline application. Each entry identifies a target image reference and digest and names its delta artifact. Read-only: generated by the control plane and only present in the rendered application spec delivered to the agent.", alias="deltaImages") inline: List[ApplicationContent] = Field(description="A list of application content.") - __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "publishPorts", "image", "inline"] + __properties: ClassVar[List[str]] = ["name", "appType", "annotations", "desiredState", "restartGeneration", "runAs", "publishPorts", "image", "deltaImage", "deltaImages", "inline"] model_config = ConfigDict( populate_by_name=True, @@ -74,11 +78,15 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ "annotations", "desired_state", "restart_generation", + "delta_image", + "delta_images", ]) _dict = self.model_dump( @@ -86,6 +94,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 each item in delta_images (list) + _items = [] + if self.delta_images: + for _item_delta_images in self.delta_images: + if _item_delta_images: + _items.append(_item_delta_images.to_dict()) + _dict['deltaImages'] = _items # override the default output from pydantic by calling `to_dict()` of each item in inline (list) _items = [] if self.inline: @@ -110,8 +125,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "annotations": obj.get("annotations"), "desiredState": obj.get("desiredState"), "restartGeneration": obj.get("restartGeneration"), + "runAs": obj.get("runAs"), "publishPorts": obj.get("publishPorts"), "image": obj.get("image"), + "deltaImage": obj.get("deltaImage"), + "deltaImages": [ImageDeltaHint.from_dict(_item) for _item in obj["deltaImages"]] if obj.get("deltaImages") 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/v1alpha1/__init__.py b/flightctl/v1alpha1/__init__.py index feb57f5..d069525 100644 --- a/flightctl/v1alpha1/__init__.py +++ b/flightctl/v1alpha1/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "1.3.0" +__version__ = "1.4.0" # Define package exports __all__ = [ @@ -56,11 +56,14 @@ "ConditionType", "CveCountsBySeverity", "DeviceCountsBySeverity", + "DeviceFeatureBoolean", + "DeviceFeatures", "DeviceVulnerabilitySummaryResponse", "FleetVulnerabilitySummary", "FleetVulnerabilitySummaryResponse", "ListMeta", "ObjectMeta", + "OsModeType", "PatchRequestInner", "Status", "Vulnerability", @@ -71,6 +74,7 @@ "VulnerabilityImpact", "VulnerabilityList", "VulnerabilitySeveritySummary", + "VulnerabilitySource", "VulnerabilitySummaryResponse", ] @@ -116,11 +120,14 @@ from flightctl.v1alpha1.models.condition_type import ConditionType as ConditionType from flightctl.v1alpha1.models.cve_counts_by_severity import CveCountsBySeverity as CveCountsBySeverity from flightctl.v1alpha1.models.device_counts_by_severity import DeviceCountsBySeverity as DeviceCountsBySeverity +from flightctl.v1alpha1.models.device_feature_boolean import DeviceFeatureBoolean as DeviceFeatureBoolean +from flightctl.v1alpha1.models.device_features import DeviceFeatures as DeviceFeatures from flightctl.v1alpha1.models.device_vulnerability_summary_response import DeviceVulnerabilitySummaryResponse as DeviceVulnerabilitySummaryResponse from flightctl.v1alpha1.models.fleet_vulnerability_summary import FleetVulnerabilitySummary as FleetVulnerabilitySummary from flightctl.v1alpha1.models.fleet_vulnerability_summary_response import FleetVulnerabilitySummaryResponse as FleetVulnerabilitySummaryResponse from flightctl.v1alpha1.models.list_meta import ListMeta as ListMeta from flightctl.v1alpha1.models.object_meta import ObjectMeta as ObjectMeta +from flightctl.v1alpha1.models.os_mode_type import OsModeType as OsModeType from flightctl.v1alpha1.models.patch_request_inner import PatchRequestInner as PatchRequestInner from flightctl.v1alpha1.models.status import Status as Status from flightctl.v1alpha1.models.vulnerability import Vulnerability as Vulnerability @@ -131,5 +138,6 @@ from flightctl.v1alpha1.models.vulnerability_impact import VulnerabilityImpact as VulnerabilityImpact from flightctl.v1alpha1.models.vulnerability_list import VulnerabilityList as VulnerabilityList from flightctl.v1alpha1.models.vulnerability_severity_summary import VulnerabilitySeveritySummary as VulnerabilitySeveritySummary +from flightctl.v1alpha1.models.vulnerability_source import VulnerabilitySource as VulnerabilitySource from flightctl.v1alpha1.models.vulnerability_summary_response import VulnerabilitySummaryResponse as VulnerabilitySummaryResponse diff --git a/flightctl/v1alpha1/api_client.py b/flightctl/v1alpha1/api_client.py index 796808d..e338b5f 100644 --- a/flightctl/v1alpha1/api_client.py +++ b/flightctl/v1alpha1/api_client.py @@ -92,7 +92,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.3.0/python' + self.user_agent = 'OpenAPI-Generator/1.4.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/flightctl/v1alpha1/configuration.py b/flightctl/v1alpha1/configuration.py index 558bca9..72119af 100644 --- a/flightctl/v1alpha1/configuration.py +++ b/flightctl/v1alpha1/configuration.py @@ -545,7 +545,7 @@ def to_debug_report(self) -> str: "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v1alpha1\n"\ - "SDK Package Version: 1.3.0".\ + "SDK Package Version: 1.4.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/flightctl/v1alpha1/docs/CatalogItemVersion.md b/flightctl/v1alpha1/docs/CatalogItemVersion.md index 386f113..a724892 100644 --- a/flightctl/v1alpha1/docs/CatalogItemVersion.md +++ b/flightctl/v1alpha1/docs/CatalogItemVersion.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **skips** | **List[str]** | Additional versions that can upgrade directly to this one. Use when stable channel skips intermediate fast-only versions. | [optional] **skip_range** | **str** | Semver range of versions that can upgrade directly to this one. Use for z-stream updates or hotfixes. | [optional] **deprecation** | [**CatalogItemDeprecation**](CatalogItemDeprecation.md) | | [optional] +**device_features** | [**DeviceFeatures**](DeviceFeatures.md) | Device feature requirements that a target device must satisfy for this version to be considered compatible. | [optional] ## Example diff --git a/flightctl/v1alpha1/docs/Condition.md b/flightctl/v1alpha1/docs/Condition.md index 8d71a5b..f2f1528 100644 --- a/flightctl/v1alpha1/docs/Condition.md +++ b/flightctl/v1alpha1/docs/Condition.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | **type** | [**ConditionType**](ConditionType.md) | | ## Example diff --git a/flightctl/v1alpha1/docs/ConditionBase.md b/flightctl/v1alpha1/docs/ConditionBase.md index cd16a8f..7a3fb02 100644 --- a/flightctl/v1alpha1/docs/ConditionBase.md +++ b/flightctl/v1alpha1/docs/ConditionBase.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **status** | [**ConditionStatus**](ConditionStatus.md) | | **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | -**message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | A (brief) reason for the condition's last transition. | +**message** | **str** | A human-readable message describing the condition, including details or progress. Consumers should not parse this field. | +**reason** | **str** | A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message. | ## Example diff --git a/flightctl/v1alpha1/docs/ConditionType.md b/flightctl/v1alpha1/docs/ConditionType.md index c8b86ef..f5d4853 100644 --- a/flightctl/v1alpha1/docs/ConditionType.md +++ b/flightctl/v1alpha1/docs/ConditionType.md @@ -24,6 +24,8 @@ Type of condition in CamelCase. * `ResourceSyncSynced` (value: `'Synced'`) +* `LabelSyncMappingReady` (value: `'Ready'`) + * `FleetValid` (value: `'Valid'`) * `FleetRolloutInProgress` (value: `'RolloutInProgress'`) @@ -34,8 +36,16 @@ Type of condition in CamelCase. * `DeviceMultipleOwners` (value: `'MultipleOwners'`) +* `DeviceLabelsSynced` (value: `'LabelsSynced'`) + * `DeviceDecommissioning` (value: `'DeviceDecommissioning'`) +* `FleetDeltaPreparing` (value: `'FleetDeltaPreparing'`) + +* `DeviceDeltaPreparing` (value: `'DeviceDeltaPreparing'`) + +* `DeviceEnrollmentHooks` (value: `'EnrollmentHooks'`) + [[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/v1alpha1/docs/DeviceFeatureBoolean.md b/flightctl/v1alpha1/docs/DeviceFeatureBoolean.md new file mode 100644 index 0000000..1d2a0c5 --- /dev/null +++ b/flightctl/v1alpha1/docs/DeviceFeatureBoolean.md @@ -0,0 +1,11 @@ +# DeviceFeatureBoolean + +Value of a boolean device feature requirement, expressed as the string \"true\" or \"false\". + +## Enum + +* `DeviceFeatureBooleanTrue` (value: `'true'`) + +* `DeviceFeatureBooleanFalse` (value: `'false'`) + +[[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/v1alpha1/docs/DeviceFeatures.md b/flightctl/v1alpha1/docs/DeviceFeatures.md new file mode 100644 index 0000000..a342d4e --- /dev/null +++ b/flightctl/v1alpha1/docs/DeviceFeatures.md @@ -0,0 +1,30 @@ +# DeviceFeatures + +Device feature requirements declared by a catalog item version. Each field names a device feature that a target device must provide with a matching value for this version to be considered compatible. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**gpu_present** | [**DeviceFeatureBoolean**](DeviceFeatureBoolean.md) | Whether the target device is required to have a GPU present. | [optional] +**kvm_enabled** | [**DeviceFeatureBoolean**](DeviceFeatureBoolean.md) | Whether the target device is required to have KVM enabled. | [optional] +**os_mode** | [**OsModeType**](OsModeType.md) | The OS management mode the target device is required to run. | [optional] + +## Example + +```python +from flightctl.v1alpha1.models.device_features import DeviceFeatures + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceFeatures from a JSON string +device_features_instance = DeviceFeatures.from_json(json) +# print the JSON string representation of the object +print(DeviceFeatures.to_json()) + +# convert the object into a dict +device_features_dict = device_features_instance.to_dict() +# create an instance of DeviceFeatures from a dict +device_features_from_dict = DeviceFeatures.from_dict(device_features_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/v1alpha1/docs/OsModeType.md b/flightctl/v1alpha1/docs/OsModeType.md new file mode 100644 index 0000000..e9a5d6b --- /dev/null +++ b/flightctl/v1alpha1/docs/OsModeType.md @@ -0,0 +1,11 @@ +# OsModeType + +OS management mode. \"image\" indicates the OS is managed via bootc or rpm-ostree image updates. \"package\" indicates no image-based OS management is available. + +## Enum + +* `OsModeImage` (value: `'image'`) + +* `OsModePackage` (value: `'package'`) + +[[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/v1alpha1/docs/Vulnerability.md b/flightctl/v1alpha1/docs/Vulnerability.md index 0a00a2d..47a5bc6 100644 --- a/flightctl/v1alpha1/docs/Vulnerability.md +++ b/flightctl/v1alpha1/docs/Vulnerability.md @@ -1,6 +1,6 @@ # Vulnerability -A single vulnerability (CVE) finding. Vulnerabilities are global CVE records from Trustify; they are not tenant-owned resources. Tenancy is determined by the device or fleet context through which they are queried. +A single vulnerability (CVE) finding. Vulnerabilities are global CVE records produced by the configured vulnerability scanner; they are not tenant-owned resources. Tenancy is determined by the device or fleet context through which they are queried. ## Properties @@ -16,6 +16,7 @@ Name | Type | Description | Notes **cvss_score** | **float** | CVSS base score when available. | [optional] **description** | **str** | Short summary of the vulnerability. | [optional] **published_at** | **datetime** | Advisory publish time when known. | [optional] +**source** | [**VulnerabilitySource**](VulnerabilitySource.md) | | [optional] **image** | **str** | Image reference (name or URL) from the device context. | [optional] **image_digest** | **str** | Immutable image digest from the device context. | [optional] **affected_devices** | **int** | Distinct devices affected by this CVE. For device context this is always 1; for fleet context it is the number of devices in the fleet running an image with this CVE; for organization-wide context it is the count across the whole organization. | [optional] diff --git a/flightctl/v1alpha1/docs/VulnerabilityGroupItem.md b/flightctl/v1alpha1/docs/VulnerabilityGroupItem.md index 297214f..535824c 100644 --- a/flightctl/v1alpha1/docs/VulnerabilityGroupItem.md +++ b/flightctl/v1alpha1/docs/VulnerabilityGroupItem.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **image_digest** | **str** | Immutable image digest. | **image_refs** | **List[str]** | Image references observed for this digest within the query scope. | **severity** | **str** | Severity of this CVE for this digest. | +**source** | [**VulnerabilitySource**](VulnerabilitySource.md) | | [optional] **cvss_score** | **float** | CVSS base score when available. | [optional] **advisory_id** | **str** | Vendor advisory identifier when available. | [optional] **issuer** | **str** | Name of the advisory issuer (e.g. Red Hat, NVD) when known. | [optional] diff --git a/flightctl/v1alpha1/docs/VulnerabilitySource.md b/flightctl/v1alpha1/docs/VulnerabilitySource.md new file mode 100644 index 0000000..f189c0b --- /dev/null +++ b/flightctl/v1alpha1/docs/VulnerabilitySource.md @@ -0,0 +1,11 @@ +# VulnerabilitySource + +The vulnerability backend that produced the finding. + +## Enum + +* `Trustify` (value: `'trustify'`) + +* `Quay` (value: `'quay'`) + +[[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/v1alpha1/models/__init__.py b/flightctl/v1alpha1/models/__init__.py index 8ceffcd..ffc4456 100644 --- a/flightctl/v1alpha1/models/__init__.py +++ b/flightctl/v1alpha1/models/__init__.py @@ -40,11 +40,14 @@ from flightctl.v1alpha1.models.condition_type import ConditionType from flightctl.v1alpha1.models.cve_counts_by_severity import CveCountsBySeverity from flightctl.v1alpha1.models.device_counts_by_severity import DeviceCountsBySeverity +from flightctl.v1alpha1.models.device_feature_boolean import DeviceFeatureBoolean +from flightctl.v1alpha1.models.device_features import DeviceFeatures from flightctl.v1alpha1.models.device_vulnerability_summary_response import DeviceVulnerabilitySummaryResponse from flightctl.v1alpha1.models.fleet_vulnerability_summary import FleetVulnerabilitySummary from flightctl.v1alpha1.models.fleet_vulnerability_summary_response import FleetVulnerabilitySummaryResponse from flightctl.v1alpha1.models.list_meta import ListMeta from flightctl.v1alpha1.models.object_meta import ObjectMeta +from flightctl.v1alpha1.models.os_mode_type import OsModeType from flightctl.v1alpha1.models.patch_request_inner import PatchRequestInner from flightctl.v1alpha1.models.status import Status from flightctl.v1alpha1.models.vulnerability import Vulnerability @@ -55,5 +58,6 @@ from flightctl.v1alpha1.models.vulnerability_impact import VulnerabilityImpact from flightctl.v1alpha1.models.vulnerability_list import VulnerabilityList from flightctl.v1alpha1.models.vulnerability_severity_summary import VulnerabilitySeveritySummary +from flightctl.v1alpha1.models.vulnerability_source import VulnerabilitySource from flightctl.v1alpha1.models.vulnerability_summary_response import VulnerabilitySummaryResponse diff --git a/flightctl/v1alpha1/models/catalog_item_version.py b/flightctl/v1alpha1/models/catalog_item_version.py index c24fec6..b815c04 100644 --- a/flightctl/v1alpha1/models/catalog_item_version.py +++ b/flightctl/v1alpha1/models/catalog_item_version.py @@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from flightctl.v1alpha1.models.catalog_item_deprecation import CatalogItemDeprecation +from flightctl.v1alpha1.models.device_features import DeviceFeatures from typing import Optional, Set from typing_extensions import Self @@ -39,7 +40,8 @@ class CatalogItemVersion(BaseModel): skips: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, description="Additional versions that can upgrade directly to this one. Use when stable channel skips intermediate fast-only versions.") skip_range: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Semver range of versions that can upgrade directly to this one. Use for z-stream updates or hotfixes.", alias="skipRange") deprecation: Optional[CatalogItemDeprecation] = None - __properties: ClassVar[List[str]] = ["config", "configSchema", "readme", "version", "references", "channels", "replaces", "skips", "skipRange", "deprecation"] + device_features: Optional[DeviceFeatures] = Field(default=None, description="Device feature requirements that a target device must satisfy for this version to be considered compatible.", alias="deviceFeatures") + __properties: ClassVar[List[str]] = ["config", "configSchema", "readme", "version", "references", "channels", "replaces", "skips", "skipRange", "deprecation", "deviceFeatures"] @field_validator('version') def version_validate_regular_expression(cls, value): @@ -64,8 +66,8 @@ def skip_range_validate_regular_expression(cls, value): if value is None: return value - if not re.match(r"^[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*$", value): - raise ValueError(r"must validate the regular expression /^[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*$/") + if not re.match(r"^[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*( *\|\| *[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*)*$", value): + raise ValueError(r"must validate the regular expression /^[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*( *\|\| *[>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?( [>=<~^]*[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9a-zA-Z.-]+)?(\+[0-9a-zA-Z.-]+)?)*)*$/") return value model_config = ConfigDict( @@ -110,6 +112,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of deprecation if self.deprecation: _dict['deprecation'] = self.deprecation.to_dict() + # override the default output from pydantic by calling `to_dict()` of device_features + if self.device_features: + _dict['deviceFeatures'] = self.device_features.to_dict() return _dict @classmethod @@ -131,7 +136,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "replaces": obj.get("replaces"), "skips": obj.get("skips"), "skipRange": obj.get("skipRange"), - "deprecation": CatalogItemDeprecation.from_dict(obj["deprecation"]) if obj.get("deprecation") is not None else None + "deprecation": CatalogItemDeprecation.from_dict(obj["deprecation"]) if obj.get("deprecation") is not None else None, + "deviceFeatures": DeviceFeatures.from_dict(obj["deviceFeatures"]) if obj.get("deviceFeatures") is not None else None }) return _obj diff --git a/flightctl/v1alpha1/models/condition.py b/flightctl/v1alpha1/models/condition.py index 707349d..7b11063 100644 --- a/flightctl/v1alpha1/models/condition.py +++ b/flightctl/v1alpha1/models/condition.py @@ -33,8 +33,8 @@ class Condition(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") type: ConditionType __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason", "type"] diff --git a/flightctl/v1alpha1/models/condition_base.py b/flightctl/v1alpha1/models/condition_base.py index 6b40705..73d2346 100644 --- a/flightctl/v1alpha1/models/condition_base.py +++ b/flightctl/v1alpha1/models/condition_base.py @@ -32,8 +32,8 @@ class ConditionBase(BaseModel): status: ConditionStatus observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") - message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") + message: StrictStr = Field(description="A human-readable message describing the condition, including details or progress. Consumers should not parse this field.") + reason: StrictStr = Field(description="A brief, machine-readable reason for the condition's last transition. Use a stable CamelCase identifier and put human-readable details in message.") __properties: ClassVar[List[str]] = ["status", "observedGeneration", "lastTransitionTime", "message", "reason"] model_config = ConfigDict( diff --git a/flightctl/v1alpha1/models/condition_type.py b/flightctl/v1alpha1/models/condition_type.py index 55d4e17..054947c 100644 --- a/flightctl/v1alpha1/models/condition_type.py +++ b/flightctl/v1alpha1/models/condition_type.py @@ -37,12 +37,17 @@ class ConditionType(str, Enum): ResourceSyncAccessible = 'Accessible' ResourceSyncResourceParsed = 'ResourceParsed' ResourceSyncSynced = 'Synced' + LabelSyncMappingReady = 'Ready' FleetValid = 'Valid' FleetRolloutInProgress = 'RolloutInProgress' DeviceUpdating = 'Updating' DeviceSpecValid = 'SpecValid' DeviceMultipleOwners = 'MultipleOwners' + DeviceLabelsSynced = 'LabelsSynced' DeviceDecommissioning = 'DeviceDecommissioning' + FleetDeltaPreparing = 'FleetDeltaPreparing' + DeviceDeltaPreparing = 'DeviceDeltaPreparing' + DeviceEnrollmentHooks = 'EnrollmentHooks' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/v1alpha1/models/device_feature_boolean.py b/flightctl/v1alpha1/models/device_feature_boolean.py new file mode 100644 index 0000000..780ba51 --- /dev/null +++ b/flightctl/v1alpha1/models/device_feature_boolean.py @@ -0,0 +1,36 @@ +# 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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + 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 DeviceFeatureBoolean(str, Enum): + """ + Value of a boolean device feature requirement, expressed as the string \"true\" or \"false\". + """ + + """ + allowed enum values + """ + DeviceFeatureBooleanTrue = 'true' + DeviceFeatureBooleanFalse = 'false' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DeviceFeatureBoolean from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/v1alpha1/models/device_features.py b/flightctl/v1alpha1/models/device_features.py new file mode 100644 index 0000000..7cc3c66 --- /dev/null +++ b/flightctl/v1alpha1/models/device_features.py @@ -0,0 +1,105 @@ +# 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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + 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, Optional +from flightctl.v1alpha1.models.device_feature_boolean import DeviceFeatureBoolean +from flightctl.v1alpha1.models.os_mode_type import OsModeType +from typing import Optional, Set +from typing_extensions import Self + +class DeviceFeatures(BaseModel): + """ + Device feature requirements declared by a catalog item version. Each field names a device feature that a target device must provide with a matching value for this version to be considered compatible. + """ # noqa: E501 + gpu_present: Optional[DeviceFeatureBoolean] = Field(default=None, description="Whether the target device is required to have a GPU present.", alias="gpu.present") + kvm_enabled: Optional[DeviceFeatureBoolean] = Field(default=None, description="Whether the target device is required to have KVM enabled.", alias="kvm.enabled") + os_mode: Optional[OsModeType] = Field(default=None, description="The OS management mode the target device is required to run.", alias="os.mode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["gpu.present", "kvm.enabled", "os.mode"] + + 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 DeviceFeatures 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceFeatures from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "gpu.present": obj.get("gpu.present"), + "kvm.enabled": obj.get("kvm.enabled"), + "os.mode": obj.get("os.mode") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/flightctl/v1alpha1/models/os_mode_type.py b/flightctl/v1alpha1/models/os_mode_type.py new file mode 100644 index 0000000..4b211b0 --- /dev/null +++ b/flightctl/v1alpha1/models/os_mode_type.py @@ -0,0 +1,36 @@ +# 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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + 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 OsModeType(str, Enum): + """ + OS management mode. \"image\" indicates the OS is managed via bootc or rpm-ostree image updates. \"package\" indicates no image-based OS management is available. + """ + + """ + allowed enum values + """ + OsModeImage = 'image' + OsModePackage = 'package' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of OsModeType from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/v1alpha1/models/vulnerability.py b/flightctl/v1alpha1/models/vulnerability.py index ae5a860..ca31bd6 100644 --- a/flightctl/v1alpha1/models/vulnerability.py +++ b/flightctl/v1alpha1/models/vulnerability.py @@ -22,12 +22,13 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from flightctl.v1alpha1.models.api_version import ApiVersion +from flightctl.v1alpha1.models.vulnerability_source import VulnerabilitySource from typing import Optional, Set from typing_extensions import Self class Vulnerability(BaseModel): """ - A single vulnerability (CVE) finding. Vulnerabilities are global CVE records from Trustify; they are not tenant-owned resources. Tenancy is determined by the device or fleet context through which they are queried. + A single vulnerability (CVE) finding. Vulnerabilities are global CVE records produced by the configured vulnerability scanner; they are not tenant-owned resources. Tenancy is determined by the device or fleet context through which they are queried. """ # noqa: E501 api_version: ApiVersion = Field(alias="apiVersion") kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Always Vulnerability.") @@ -39,10 +40,11 @@ class Vulnerability(BaseModel): cvss_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CVSS base score when available.", alias="cvssScore") description: Optional[StrictStr] = Field(default=None, description="Short summary of the vulnerability.") published_at: Optional[datetime] = Field(default=None, description="Advisory publish time when known.", alias="publishedAt") + source: Optional[VulnerabilitySource] = None image: Optional[StrictStr] = Field(default=None, description="Image reference (name or URL) from the device context.") image_digest: Optional[StrictStr] = Field(default=None, description="Immutable image digest from the device context.", alias="imageDigest") affected_devices: Optional[StrictInt] = Field(default=None, description="Distinct devices affected by this CVE. For device context this is always 1; for fleet context it is the number of devices in the fleet running an image with this CVE; for organization-wide context it is the count across the whole organization.", alias="affectedDevices") - __properties: ClassVar[List[str]] = ["apiVersion", "kind", "cveId", "advisoryId", "issuer", "link", "severity", "cvssScore", "description", "publishedAt", "image", "imageDigest", "affectedDevices"] + __properties: ClassVar[List[str]] = ["apiVersion", "kind", "cveId", "advisoryId", "issuer", "link", "severity", "cvssScore", "description", "publishedAt", "source", "image", "imageDigest", "affectedDevices"] @field_validator('severity') def severity_validate_enum(cls, value): @@ -112,6 +114,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "cvssScore": obj.get("cvssScore"), "description": obj.get("description"), "publishedAt": obj.get("publishedAt"), + "source": obj.get("source"), "image": obj.get("image"), "imageDigest": obj.get("imageDigest"), "affectedDevices": obj.get("affectedDevices") diff --git a/flightctl/v1alpha1/models/vulnerability_group_item.py b/flightctl/v1alpha1/models/vulnerability_group_item.py index 17b630a..4d9cd3a 100644 --- a/flightctl/v1alpha1/models/vulnerability_group_item.py +++ b/flightctl/v1alpha1/models/vulnerability_group_item.py @@ -21,6 +21,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union +from flightctl.v1alpha1.models.vulnerability_source import VulnerabilitySource from typing import Optional, Set from typing_extensions import Self @@ -31,6 +32,7 @@ class VulnerabilityGroupItem(BaseModel): image_digest: StrictStr = Field(description="Immutable image digest.", alias="imageDigest") image_refs: List[StrictStr] = Field(description="Image references observed for this digest within the query scope.", alias="imageRefs") severity: StrictStr = Field(description="Severity of this CVE for this digest.") + source: Optional[VulnerabilitySource] = None cvss_score: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="CVSS base score when available.", alias="cvssScore") advisory_id: Optional[StrictStr] = Field(default=None, description="Vendor advisory identifier when available.", alias="advisoryId") issuer: Optional[StrictStr] = Field(default=None, description="Name of the advisory issuer (e.g. Red Hat, NVD) when known.") @@ -39,7 +41,7 @@ class VulnerabilityGroupItem(BaseModel): published_at: Optional[datetime] = Field(default=None, description="Advisory publish time when known.", alias="publishedAt") affected_devices: Optional[StrictInt] = Field(default=None, description="Number of devices in scope running this digest.", alias="affectedDevices") first_seen_at: Optional[datetime] = Field(default=None, description="When this CVE was first observed in this digest.", alias="firstSeenAt") - __properties: ClassVar[List[str]] = ["imageDigest", "imageRefs", "severity", "cvssScore", "advisoryId", "issuer", "link", "description", "publishedAt", "affectedDevices", "firstSeenAt"] + __properties: ClassVar[List[str]] = ["imageDigest", "imageRefs", "severity", "source", "cvssScore", "advisoryId", "issuer", "link", "description", "publishedAt", "affectedDevices", "firstSeenAt"] @field_validator('severity') def severity_validate_enum(cls, value): @@ -102,6 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "imageDigest": obj.get("imageDigest"), "imageRefs": obj.get("imageRefs"), "severity": obj.get("severity"), + "source": obj.get("source"), "cvssScore": obj.get("cvssScore"), "advisoryId": obj.get("advisoryId"), "issuer": obj.get("issuer"), diff --git a/flightctl/v1alpha1/models/vulnerability_source.py b/flightctl/v1alpha1/models/vulnerability_source.py new file mode 100644 index 0000000..9d63431 --- /dev/null +++ b/flightctl/v1alpha1/models/vulnerability_source.py @@ -0,0 +1,36 @@ +# 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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + 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 VulnerabilitySource(str, Enum): + """ + The vulnerability backend that produced the finding. + """ + + """ + allowed enum values + """ + Trustify = 'trustify' + Quay = 'quay' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of VulnerabilitySource from a JSON string""" + return cls(json.loads(json_str)) diff --git a/flightctl/v1alpha1/test/test_device_feature_boolean.py b/flightctl/v1alpha1/test/test_device_feature_boolean.py new file mode 100644 index 0000000..6b97874 --- /dev/null +++ b/flightctl/v1alpha1/test/test_device_feature_boolean.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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.v1alpha1.models.device_feature_boolean import DeviceFeatureBoolean + +class TestDeviceFeatureBoolean(unittest.TestCase): + """DeviceFeatureBoolean unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeviceFeatureBoolean(self): + """Test DeviceFeatureBoolean""" + # inst = DeviceFeatureBoolean() + +if __name__ == '__main__': + unittest.main() diff --git a/flightctl/v1alpha1/test/test_device_features.py b/flightctl/v1alpha1/test/test_device_features.py new file mode 100644 index 0000000..f4cdf39 --- /dev/null +++ b/flightctl/v1alpha1/test/test_device_features.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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.v1alpha1.models.device_features import DeviceFeatures + +class TestDeviceFeatures(unittest.TestCase): + """DeviceFeatures unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceFeatures: + """Test DeviceFeatures + 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 `DeviceFeatures` + """ + model = DeviceFeatures() + if include_optional: + return DeviceFeatures( + gpu_present = 'true', + kvm_enabled = 'true', + os_mode = 'image' + ) + else: + return DeviceFeatures( + ) + """ + + def testDeviceFeatures(self): + """Test DeviceFeatures""" + # 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/flightctl/v1alpha1/test/test_os_mode_type.py b/flightctl/v1alpha1/test/test_os_mode_type.py new file mode 100644 index 0000000..928deb3 --- /dev/null +++ b/flightctl/v1alpha1/test/test_os_mode_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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.v1alpha1.models.os_mode_type import OsModeType + +class TestOsModeType(unittest.TestCase): + """OsModeType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOsModeType(self): + """Test OsModeType""" + # inst = OsModeType() + +if __name__ == '__main__': + unittest.main() diff --git a/flightctl/v1alpha1/test/test_vulnerability_source.py b/flightctl/v1alpha1/test/test_vulnerability_source.py new file mode 100644 index 0000000..b4ae861 --- /dev/null +++ b/flightctl/v1alpha1/test/test_vulnerability_source.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. This API version (v1alpha1) contains alpha-stage resources that are subject to change. + + The version of the OpenAPI document: v1alpha1 + Contact: team@flightctl.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from flightctl.v1alpha1.models.vulnerability_source import VulnerabilitySource + +class TestVulnerabilitySource(unittest.TestCase): + """VulnerabilitySource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testVulnerabilitySource(self): + """Test VulnerabilitySource""" + # inst = VulnerabilitySource() + +if __name__ == '__main__': + unittest.main() diff --git a/flightctl/v1alpha1_README.md b/flightctl/v1alpha1_README.md index 5632bfc..1a777a5 100644 --- a/flightctl/v1alpha1_README.md +++ b/flightctl/v1alpha1_README.md @@ -4,7 +4,7 @@ The `flightctl.v1alpha1` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1alpha1 -- Package version: 1.3.0 +- Package version: 1.4.0 - Generator version: 7.17.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://flightctl.io](https://flightctl.io) @@ -118,11 +118,14 @@ Class | Method | HTTP request | Description - [ConditionType](flightctl/v1alpha1/docs/ConditionType.md) - [CveCountsBySeverity](flightctl/v1alpha1/docs/CveCountsBySeverity.md) - [DeviceCountsBySeverity](flightctl/v1alpha1/docs/DeviceCountsBySeverity.md) + - [DeviceFeatureBoolean](flightctl/v1alpha1/docs/DeviceFeatureBoolean.md) + - [DeviceFeatures](flightctl/v1alpha1/docs/DeviceFeatures.md) - [DeviceVulnerabilitySummaryResponse](flightctl/v1alpha1/docs/DeviceVulnerabilitySummaryResponse.md) - [FleetVulnerabilitySummary](flightctl/v1alpha1/docs/FleetVulnerabilitySummary.md) - [FleetVulnerabilitySummaryResponse](flightctl/v1alpha1/docs/FleetVulnerabilitySummaryResponse.md) - [ListMeta](flightctl/v1alpha1/docs/ListMeta.md) - [ObjectMeta](flightctl/v1alpha1/docs/ObjectMeta.md) + - [OsModeType](flightctl/v1alpha1/docs/OsModeType.md) - [PatchRequestInner](flightctl/v1alpha1/docs/PatchRequestInner.md) - [Status](flightctl/v1alpha1/docs/Status.md) - [Vulnerability](flightctl/v1alpha1/docs/Vulnerability.md) @@ -133,6 +136,7 @@ Class | Method | HTTP request | Description - [VulnerabilityImpact](flightctl/v1alpha1/docs/VulnerabilityImpact.md) - [VulnerabilityList](flightctl/v1alpha1/docs/VulnerabilityList.md) - [VulnerabilitySeveritySummary](flightctl/v1alpha1/docs/VulnerabilitySeveritySummary.md) + - [VulnerabilitySource](flightctl/v1alpha1/docs/VulnerabilitySource.md) - [VulnerabilitySummaryResponse](flightctl/v1alpha1/docs/VulnerabilitySummaryResponse.md) diff --git a/pyproject.toml b/pyproject.toml index a28e998..8687d57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "flightctl-client" -version = "1.3.0" +version = "1.4.0" description = "Flight Control API" authors = [ {name = "The Flight Control Team",email = "team@flightctl.io"}, diff --git a/setup.py b/setup.py index cb9f12a..1a5743b 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "flightctl-client" -VERSION = "1.3.0" +VERSION = "1.4.0" PYTHON_REQUIRES = ">= 3.10" REQUIRES = [ "urllib3 >= 2.7.0, < 3.0.0", diff --git a/test/test_application_image_digest.py b/test/test_application_image_digest.py new file mode 100644 index 0000000..a9f390b --- /dev/null +++ b/test/test_application_image_digest.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_image_digest import ApplicationImageDigest + +class TestApplicationImageDigest(unittest.TestCase): + """ApplicationImageDigest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationImageDigest: + """Test ApplicationImageDigest + 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 `ApplicationImageDigest` + """ + model = ApplicationImageDigest() + if include_optional: + return ApplicationImageDigest( + image = '', + digest = '' + ) + else: + return ApplicationImageDigest( + image = '', + ) + """ + + def testApplicationImageDigest(self): + """Test ApplicationImageDigest""" + # 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_delta_generation_phase.py b/test/test_delta_generation_phase.py new file mode 100644 index 0000000..c1a24e5 --- /dev/null +++ b/test/test_delta_generation_phase.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.delta_generation_phase import DeltaGenerationPhase + +class TestDeltaGenerationPhase(unittest.TestCase): + """DeltaGenerationPhase unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeltaGenerationPhase(self): + """Test DeltaGenerationPhase""" + # inst = DeltaGenerationPhase() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delta_generation_progress_details.py b/test/test_delta_generation_progress_details.py new file mode 100644 index 0000000..042397f --- /dev/null +++ b/test/test_delta_generation_progress_details.py @@ -0,0 +1,64 @@ +# 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.delta_generation_progress_details import DeltaGenerationProgressDetails + +class TestDeltaGenerationProgressDetails(unittest.TestCase): + """DeltaGenerationProgressDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeltaGenerationProgressDetails: + """Test DeltaGenerationProgressDetails + 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 `DeltaGenerationProgressDetails` + """ + model = DeltaGenerationProgressDetails() + if include_optional: + return DeltaGenerationProgressDetails( + detail_type = 'DeltaGenerationProgress', + image_repository = '', + source_digest = '', + target_digest = '', + generation_status = 'in_progress', + phase = 'checkingExisting', + template_version = '', + generation = 1 + ) + else: + return DeltaGenerationProgressDetails( + detail_type = 'DeltaGenerationProgress', + image_repository = '', + source_digest = '', + target_digest = '', + generation_status = 'in_progress', + ) + """ + + def testDeltaGenerationProgressDetails(self): + """Test DeltaGenerationProgressDetails""" + # 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_delta_generation_status.py b/test/test_delta_generation_status.py new file mode 100644 index 0000000..e0fd74c --- /dev/null +++ b/test/test_delta_generation_status.py @@ -0,0 +1,56 @@ +# 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.delta_generation_status import DeltaGenerationStatus + +class TestDeltaGenerationStatus(unittest.TestCase): + """DeltaGenerationStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeltaGenerationStatus: + """Test DeltaGenerationStatus + 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 `DeltaGenerationStatus` + """ + model = DeltaGenerationStatus() + if include_optional: + return DeltaGenerationStatus( + completed = 56, + total = 56, + last_updated = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else: + return DeltaGenerationStatus( + completed = 56, + total = 56, + ) + """ + + def testDeltaGenerationStatus(self): + """Test DeltaGenerationStatus""" + # 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_device_delta_apply_outcome_type.py b/test/test_device_delta_apply_outcome_type.py new file mode 100644 index 0000000..b130ed8 --- /dev/null +++ b/test/test_device_delta_apply_outcome_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.device_delta_apply_outcome_type import DeviceDeltaApplyOutcomeType + +class TestDeviceDeltaApplyOutcomeType(unittest.TestCase): + """DeviceDeltaApplyOutcomeType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeviceDeltaApplyOutcomeType(self): + """Test DeviceDeltaApplyOutcomeType""" + # inst = DeviceDeltaApplyOutcomeType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_delta_apply_status.py b/test/test_device_delta_apply_status.py new file mode 100644 index 0000000..7fbf137 --- /dev/null +++ b/test/test_device_delta_apply_status.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.device_delta_apply_status import DeviceDeltaApplyStatus + +class TestDeviceDeltaApplyStatus(unittest.TestCase): + """DeviceDeltaApplyStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDeltaApplyStatus: + """Test DeviceDeltaApplyStatus + 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 `DeviceDeltaApplyStatus` + """ + model = DeviceDeltaApplyStatus() + if include_optional: + return DeviceDeltaApplyStatus( + outcome = 'NotUsed', + fallback_reason = '' + ) + else: + return DeviceDeltaApplyStatus( + outcome = 'NotUsed', + ) + """ + + def testDeviceDeltaApplyStatus(self): + """Test DeviceDeltaApplyStatus""" + # 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_device_enrollment_hooks_status.py b/test/test_device_enrollment_hooks_status.py new file mode 100644 index 0000000..53e0d6d --- /dev/null +++ b/test/test_device_enrollment_hooks_status.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.device_enrollment_hooks_status import DeviceEnrollmentHooksStatus + +class TestDeviceEnrollmentHooksStatus(unittest.TestCase): + """DeviceEnrollmentHooksStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceEnrollmentHooksStatus: + """Test DeviceEnrollmentHooksStatus + 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 `DeviceEnrollmentHooksStatus` + """ + model = DeviceEnrollmentHooksStatus() + if include_optional: + return DeviceEnrollmentHooksStatus( + snapshot = flightctl.models.enrollment_hook_snapshot.EnrollmentHookSnapshot( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_snapshot_action.EnrollmentHookSnapshotAction( + index = 56, + url = '', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), ) + ], ) + ) + else: + return DeviceEnrollmentHooksStatus( + ) + """ + + def testDeviceEnrollmentHooksStatus(self): + """Test DeviceEnrollmentHooksStatus""" + # 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_device_gpu.py b/test/test_device_gpu.py new file mode 100644 index 0000000..6c24398 --- /dev/null +++ b/test/test_device_gpu.py @@ -0,0 +1,64 @@ +# 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.device_gpu import DeviceGpu + +class TestDeviceGpu(unittest.TestCase): + """DeviceGpu unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceGpu: + """Test DeviceGpu + 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 `DeviceGpu` + """ + model = DeviceGpu() + if include_optional: + return DeviceGpu( + index = 56, + vendor = '', + model = '', + pci_device_id = '', + pci_address = '', + pci_revision_id = '', + pci_vendor_id = '', + memory_bytes = 56, + arch = '', + features = [ + '' + ] + ) + else: + return DeviceGpu( + index = 56, + ) + """ + + def testDeviceGpu(self): + """Test DeviceGpu""" + # 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_device_kvm.py b/test/test_device_kvm.py new file mode 100644 index 0000000..843216a --- /dev/null +++ b/test/test_device_kvm.py @@ -0,0 +1,52 @@ +# 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.device_kvm import DeviceKvm + +class TestDeviceKvm(unittest.TestCase): + """DeviceKvm unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceKvm: + """Test DeviceKvm + 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 `DeviceKvm` + """ + model = DeviceKvm() + if include_optional: + return DeviceKvm( + enabled = True + ) + else: + return DeviceKvm( + ) + """ + + def testDeviceKvm(self): + """Test DeviceKvm""" + # 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_device_system_info_status.py b/test/test_device_system_info_status.py new file mode 100644 index 0000000..346e619 --- /dev/null +++ b/test/test_device_system_info_status.py @@ -0,0 +1,81 @@ +# 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.device_system_info_status import DeviceSystemInfoStatus + +class TestDeviceSystemInfoStatus(unittest.TestCase): + """DeviceSystemInfoStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceSystemInfoStatus: + """Test DeviceSystemInfoStatus + 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 `DeviceSystemInfoStatus` + """ + model = DeviceSystemInfoStatus() + if include_optional: + return DeviceSystemInfoStatus( + summary = flightctl.models.device_system_info_summary_status.DeviceSystemInfoSummaryStatus( + status = 'Healthy', ), + statuses = flightctl.models.device_system_info_statuses.DeviceSystemInfoStatuses( + system_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + }, + custom_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + }, ) + ) + else: + return DeviceSystemInfoStatus( + summary = flightctl.models.device_system_info_summary_status.DeviceSystemInfoSummaryStatus( + status = 'Healthy', ), + statuses = flightctl.models.device_system_info_statuses.DeviceSystemInfoStatuses( + system_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + }, + custom_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + }, ), + ) + """ + + def testDeviceSystemInfoStatus(self): + """Test DeviceSystemInfoStatus""" + # 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_device_system_info_statuses.py b/test/test_device_system_info_statuses.py new file mode 100644 index 0000000..1381b65 --- /dev/null +++ b/test/test_device_system_info_statuses.py @@ -0,0 +1,75 @@ +# 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.device_system_info_statuses import DeviceSystemInfoStatuses + +class TestDeviceSystemInfoStatuses(unittest.TestCase): + """DeviceSystemInfoStatuses unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceSystemInfoStatuses: + """Test DeviceSystemInfoStatuses + 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 `DeviceSystemInfoStatuses` + """ + model = DeviceSystemInfoStatuses() + if include_optional: + return DeviceSystemInfoStatuses( + system_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + }, + custom_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + } + ) + else: + return DeviceSystemInfoStatuses( + system_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + }, + custom_info = { + 'key' : flightctl.models.system_info_source_status.SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '', ) + }, + ) + """ + + def testDeviceSystemInfoStatuses(self): + """Test DeviceSystemInfoStatuses""" + # 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_device_system_info_summary_status.py b/test/test_device_system_info_summary_status.py new file mode 100644 index 0000000..e91f7dc --- /dev/null +++ b/test/test_device_system_info_summary_status.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.device_system_info_summary_status import DeviceSystemInfoSummaryStatus + +class TestDeviceSystemInfoSummaryStatus(unittest.TestCase): + """DeviceSystemInfoSummaryStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceSystemInfoSummaryStatus: + """Test DeviceSystemInfoSummaryStatus + 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 `DeviceSystemInfoSummaryStatus` + """ + model = DeviceSystemInfoSummaryStatus() + if include_optional: + return DeviceSystemInfoSummaryStatus( + status = 'Healthy' + ) + else: + return DeviceSystemInfoSummaryStatus( + status = 'Healthy', + ) + """ + + def testDeviceSystemInfoSummaryStatus(self): + """Test DeviceSystemInfoSummaryStatus""" + # 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_enrollment_hook_auth.py b/test/test_enrollment_hook_auth.py new file mode 100644 index 0000000..cc0851d --- /dev/null +++ b/test/test_enrollment_hook_auth.py @@ -0,0 +1,52 @@ +# 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.enrollment_hook_auth import EnrollmentHookAuth + +class TestEnrollmentHookAuth(unittest.TestCase): + """EnrollmentHookAuth unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookAuth: + """Test EnrollmentHookAuth + 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 `EnrollmentHookAuth` + """ + model = EnrollmentHookAuth() + if include_optional: + return EnrollmentHookAuth( + bearer_token = '' + ) + else: + return EnrollmentHookAuth( + ) + """ + + def testEnrollmentHookAuth(self): + """Test EnrollmentHookAuth""" + # 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_enrollment_hook_http_action.py b/test/test_enrollment_hook_http_action.py new file mode 100644 index 0000000..c1dbb4a --- /dev/null +++ b/test/test_enrollment_hook_http_action.py @@ -0,0 +1,62 @@ +# 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.enrollment_hook_http_action import EnrollmentHookHttpAction + +class TestEnrollmentHookHttpAction(unittest.TestCase): + """EnrollmentHookHttpAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookHttpAction: + """Test EnrollmentHookHttpAction + 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 `EnrollmentHookHttpAction` + """ + model = EnrollmentHookHttpAction() + if include_optional: + return EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ) + ) + else: + return EnrollmentHookHttpAction( + url = '0', + ) + """ + + def testEnrollmentHookHttpAction(self): + """Test EnrollmentHookHttpAction""" + # 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_enrollment_hook_policy.py b/test/test_enrollment_hook_policy.py new file mode 100644 index 0000000..7cb264e --- /dev/null +++ b/test/test_enrollment_hook_policy.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 + + +import unittest + +from flightctl.models.enrollment_hook_policy import EnrollmentHookPolicy + +class TestEnrollmentHookPolicy(unittest.TestCase): + """EnrollmentHookPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookPolicy: + """Test EnrollmentHookPolicy + 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 `EnrollmentHookPolicy` + """ + model = EnrollmentHookPolicy() + if include_optional: + return EnrollmentHookPolicy( + api_version = 'v1beta1', + 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.enrollment_hook_policy_spec.EnrollmentHookPolicySpec( + after_enrolling = flightctl.models.enrollment_hook_stage_spec.EnrollmentHookStageSpec( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_http_action.EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ), ) + ], ), ), + status = flightctl.models.enrollment_hook_policy_status.EnrollmentHookPolicyStatus( + conditions = [ + null + ], ) + ) + else: + return EnrollmentHookPolicy( + api_version = 'v1beta1', + 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.enrollment_hook_policy_spec.EnrollmentHookPolicySpec( + after_enrolling = flightctl.models.enrollment_hook_stage_spec.EnrollmentHookStageSpec( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_http_action.EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ), ) + ], ), ), + ) + """ + + def testEnrollmentHookPolicy(self): + """Test EnrollmentHookPolicy""" + # 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_enrollment_hook_policy_list.py b/test/test_enrollment_hook_policy_list.py new file mode 100644 index 0000000..7b0e113 --- /dev/null +++ b/test/test_enrollment_hook_policy_list.py @@ -0,0 +1,137 @@ +# 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.enrollment_hook_policy_list import EnrollmentHookPolicyList + +class TestEnrollmentHookPolicyList(unittest.TestCase): + """EnrollmentHookPolicyList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookPolicyList: + """Test EnrollmentHookPolicyList + 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 `EnrollmentHookPolicyList` + """ + model = EnrollmentHookPolicyList() + if include_optional: + return EnrollmentHookPolicyList( + api_version = 'v1beta1', + kind = '', + metadata = flightctl.models.list_meta.ListMeta( + continue = '', + remaining_item_count = 56, ), + items = [ + flightctl.models.enrollment_hook_policy.EnrollmentHookPolicy( + api_version = 'v1beta1', + 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.enrollment_hook_policy_spec.EnrollmentHookPolicySpec( + after_enrolling = flightctl.models.enrollment_hook_stage_spec.EnrollmentHookStageSpec( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_http_action.EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ), ) + ], ), ), + status = flightctl.models.enrollment_hook_policy_status.EnrollmentHookPolicyStatus( + conditions = [ + null + ], ), ) + ] + ) + else: + return EnrollmentHookPolicyList( + api_version = 'v1beta1', + kind = '', + metadata = flightctl.models.list_meta.ListMeta( + continue = '', + remaining_item_count = 56, ), + items = [ + flightctl.models.enrollment_hook_policy.EnrollmentHookPolicy( + api_version = 'v1beta1', + 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.enrollment_hook_policy_spec.EnrollmentHookPolicySpec( + after_enrolling = flightctl.models.enrollment_hook_stage_spec.EnrollmentHookStageSpec( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_http_action.EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ), ) + ], ), ), + status = flightctl.models.enrollment_hook_policy_status.EnrollmentHookPolicyStatus( + conditions = [ + null + ], ), ) + ], + ) + """ + + def testEnrollmentHookPolicyList(self): + """Test EnrollmentHookPolicyList""" + # 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_enrollment_hook_policy_spec.py b/test/test_enrollment_hook_policy_spec.py new file mode 100644 index 0000000..da414f1 --- /dev/null +++ b/test/test_enrollment_hook_policy_spec.py @@ -0,0 +1,81 @@ +# 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.enrollment_hook_policy_spec import EnrollmentHookPolicySpec + +class TestEnrollmentHookPolicySpec(unittest.TestCase): + """EnrollmentHookPolicySpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookPolicySpec: + """Test EnrollmentHookPolicySpec + 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 `EnrollmentHookPolicySpec` + """ + model = EnrollmentHookPolicySpec() + if include_optional: + return EnrollmentHookPolicySpec( + after_enrolling = flightctl.models.enrollment_hook_stage_spec.EnrollmentHookStageSpec( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_http_action.EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ), ) + ], ) + ) + else: + return EnrollmentHookPolicySpec( + after_enrolling = flightctl.models.enrollment_hook_stage_spec.EnrollmentHookStageSpec( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_http_action.EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ), ) + ], ), + ) + """ + + def testEnrollmentHookPolicySpec(self): + """Test EnrollmentHookPolicySpec""" + # 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_enrollment_hook_policy_status.py b/test/test_enrollment_hook_policy_status.py new file mode 100644 index 0000000..cefa294 --- /dev/null +++ b/test/test_enrollment_hook_policy_status.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.enrollment_hook_policy_status import EnrollmentHookPolicyStatus + +class TestEnrollmentHookPolicyStatus(unittest.TestCase): + """EnrollmentHookPolicyStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookPolicyStatus: + """Test EnrollmentHookPolicyStatus + 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 `EnrollmentHookPolicyStatus` + """ + model = EnrollmentHookPolicyStatus() + if include_optional: + return EnrollmentHookPolicyStatus( + conditions = [ + null + ] + ) + else: + return EnrollmentHookPolicyStatus( + ) + """ + + def testEnrollmentHookPolicyStatus(self): + """Test EnrollmentHookPolicyStatus""" + # 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_enrollment_hook_retry_policy.py b/test/test_enrollment_hook_retry_policy.py new file mode 100644 index 0000000..3b048db --- /dev/null +++ b/test/test_enrollment_hook_retry_policy.py @@ -0,0 +1,56 @@ +# 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.enrollment_hook_retry_policy import EnrollmentHookRetryPolicy + +class TestEnrollmentHookRetryPolicy(unittest.TestCase): + """EnrollmentHookRetryPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookRetryPolicy: + """Test EnrollmentHookRetryPolicy + 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 `EnrollmentHookRetryPolicy` + """ + model = EnrollmentHookRetryPolicy() + if include_optional: + return EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '' + ) + else: + return EnrollmentHookRetryPolicy( + ) + """ + + def testEnrollmentHookRetryPolicy(self): + """Test EnrollmentHookRetryPolicy""" + # 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_enrollment_hook_snapshot.py b/test/test_enrollment_hook_snapshot.py new file mode 100644 index 0000000..227096c --- /dev/null +++ b/test/test_enrollment_hook_snapshot.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.enrollment_hook_snapshot import EnrollmentHookSnapshot + +class TestEnrollmentHookSnapshot(unittest.TestCase): + """EnrollmentHookSnapshot unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookSnapshot: + """Test EnrollmentHookSnapshot + 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 `EnrollmentHookSnapshot` + """ + model = EnrollmentHookSnapshot() + if include_optional: + return EnrollmentHookSnapshot( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_snapshot_action.EnrollmentHookSnapshotAction( + index = 56, + url = '', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), ) + ] + ) + else: + return EnrollmentHookSnapshot( + failure_policy = 'Block', + ) + """ + + def testEnrollmentHookSnapshot(self): + """Test EnrollmentHookSnapshot""" + # 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_enrollment_hook_snapshot_action.py b/test/test_enrollment_hook_snapshot_action.py new file mode 100644 index 0000000..a3abe51 --- /dev/null +++ b/test/test_enrollment_hook_snapshot_action.py @@ -0,0 +1,62 @@ +# 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.enrollment_hook_snapshot_action import EnrollmentHookSnapshotAction + +class TestEnrollmentHookSnapshotAction(unittest.TestCase): + """EnrollmentHookSnapshotAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookSnapshotAction: + """Test EnrollmentHookSnapshotAction + 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 `EnrollmentHookSnapshotAction` + """ + model = EnrollmentHookSnapshotAction() + if include_optional: + return EnrollmentHookSnapshotAction( + index = 56, + url = '', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ) + ) + else: + return EnrollmentHookSnapshotAction( + index = 56, + url = '', + ) + """ + + def testEnrollmentHookSnapshotAction(self): + """Test EnrollmentHookSnapshotAction""" + # 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_enrollment_hook_stage_spec.py b/test/test_enrollment_hook_stage_spec.py new file mode 100644 index 0000000..50c17d6 --- /dev/null +++ b/test/test_enrollment_hook_stage_spec.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.enrollment_hook_stage_spec import EnrollmentHookStageSpec + +class TestEnrollmentHookStageSpec(unittest.TestCase): + """EnrollmentHookStageSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EnrollmentHookStageSpec: + """Test EnrollmentHookStageSpec + 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 `EnrollmentHookStageSpec` + """ + model = EnrollmentHookStageSpec() + if include_optional: + return EnrollmentHookStageSpec( + failure_policy = 'Block', + control_plane_actions = [ + flightctl.models.enrollment_hook_http_action.EnrollmentHookHttpAction( + url = '0', + timeout = '', + retry = flightctl.models.enrollment_hook_retry_policy.EnrollmentHookRetryPolicy( + max_attempts = 1, + backoff_policy = '', + backoff_delay = '', + max_backoff = '', + deadline = '', ), + auth = flightctl.models.enrollment_hook_auth.EnrollmentHookAuth( + bearer_token = '', ), ) + ] + ) + else: + return EnrollmentHookStageSpec( + ) + """ + + def testEnrollmentHookStageSpec(self): + """Test EnrollmentHookStageSpec""" + # 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_enrollmenthookpolicy_api.py b/test/test_enrollmenthookpolicy_api.py new file mode 100644 index 0000000..ccc03e8 --- /dev/null +++ b/test/test_enrollmenthookpolicy_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.enrollmenthookpolicy_api import EnrollmenthookpolicyApi + + +class TestEnrollmenthookpolicyApi(unittest.TestCase): + """EnrollmenthookpolicyApi unit test stubs""" + + def setUp(self) -> None: + self.api = EnrollmenthookpolicyApi() + + def tearDown(self) -> None: + pass + + def test_create_enrollment_hook_policy(self) -> None: + """Test case for create_enrollment_hook_policy + + """ + pass + + def test_delete_enrollment_hook_policy(self) -> None: + """Test case for delete_enrollment_hook_policy + + """ + pass + + def test_get_enrollment_hook_policy(self) -> None: + """Test case for get_enrollment_hook_policy + + """ + pass + + def test_list_enrollment_hook_policies(self) -> None: + """Test case for list_enrollment_hook_policies + + """ + pass + + def test_patch_enrollment_hook_policy(self) -> None: + """Test case for patch_enrollment_hook_policy + + """ + pass + + def test_replace_enrollment_hook_policy(self) -> None: + """Test case for replace_enrollment_hook_policy + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_failure_policy_type.py b/test/test_failure_policy_type.py new file mode 100644 index 0000000..f36949c --- /dev/null +++ b/test/test_failure_policy_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.failure_policy_type import FailurePolicyType + +class TestFailurePolicyType(unittest.TestCase): + """FailurePolicyType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFailurePolicyType(self): + """Test FailurePolicyType""" + # inst = FailurePolicyType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_delta_hint.py b/test/test_image_delta_hint.py new file mode 100644 index 0000000..f4338af --- /dev/null +++ b/test/test_image_delta_hint.py @@ -0,0 +1,57 @@ +# 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_delta_hint import ImageDeltaHint + +class TestImageDeltaHint(unittest.TestCase): + """ImageDeltaHint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageDeltaHint: + """Test ImageDeltaHint + 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 `ImageDeltaHint` + """ + model = ImageDeltaHint() + if include_optional: + return ImageDeltaHint( + target_image = '', + target_digest = '', + delta_image = '' + ) + else: + return ImageDeltaHint( + target_image = '', + target_digest = '', + delta_image = '', + ) + """ + + def testImageDeltaHint(self): + """Test ImageDeltaHint""" + # 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_label_sync_mapping.py b/test/test_label_sync_mapping.py new file mode 100644 index 0000000..fa97aaf --- /dev/null +++ b/test/test_label_sync_mapping.py @@ -0,0 +1,93 @@ +# 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.label_sync_mapping import LabelSyncMapping + +class TestLabelSyncMapping(unittest.TestCase): + """LabelSyncMapping unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LabelSyncMapping: + """Test LabelSyncMapping + 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 `LabelSyncMapping` + """ + model = LabelSyncMapping() + if include_optional: + return LabelSyncMapping( + api_version = 'v1beta1', + kind = 'LabelSyncMapping', + 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.label_sync_mapping_spec.LabelSyncMappingSpec( + resource_type = 'Device', + key = '8.z.c.e.0.3zmetozkhdomha1bae37b8ocvx8o53ow2eg7p6qw9qklp6l4y010fog5ugcajvnh6nzn2yp6d7tmo7zxedi-pkbmh3.o.34ncp9spy.k.hf9r1ly-n2jyba-zuswj171d3kx6.vyykb66fgvcwlpe6fjm6div96l1hmssf5by0949ps5we28.kiw57.m.n50o3hq25-ctix-xt8fyuzw85-6ymflfzgfzdm4gro1y8vcn4nxdzyo.t2bsdqi-90qr77qnqf26kpzuf5a652r9yc8wgfitooko8u.wj5.b6ca0gq8ejs584qp107f5qv9ze3gk7q64-5mecujmelufynb1wtb8v2n1x9-y9o36-1meqixpaj.x.zay1yebs1kiembt-ho5.8.864bew-vpjuuty7-xv4qjygg3hwqd-5gynywalvhvvesyveyxp35spjahpsiagrj0jehh3a3x8z9axqtswj383252z.d6d4ifob3rgi7j1fao-vb9l55lz.bsk1mqype9zx3n6q-u55t879v1lf.1.k.isf-swgdlh.0.m4u5aoqakjc4xlcmbpoy4ndizk4s3cdhxttexawd8mnl6e4uzxalowdqy9rokd32ct-w5p-yt-emwrzfi.lulqkw0osnqktff9fp6xbt97440w4wt3xjayovyb7flljlnosgtrofp.o.j.p5-2p577rg1fwny6cq1e2d3p5aa62rscqk6cxzeqcrvjnbqd52lumjr3qda19c-7skjef4ovphp57sme4j.v/kvfKd3LB7Nke4pyLFXi20uV', + expression = '0', ), + status = flightctl.models.label_sync_mapping_status.LabelSyncMappingStatus( + conditions = [ + null + ], ) + ) + else: + return LabelSyncMapping( + api_version = 'v1beta1', + kind = 'LabelSyncMapping', + 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.label_sync_mapping_spec.LabelSyncMappingSpec( + resource_type = 'Device', + key = '8.z.c.e.0.3zmetozkhdomha1bae37b8ocvx8o53ow2eg7p6qw9qklp6l4y010fog5ugcajvnh6nzn2yp6d7tmo7zxedi-pkbmh3.o.34ncp9spy.k.hf9r1ly-n2jyba-zuswj171d3kx6.vyykb66fgvcwlpe6fjm6div96l1hmssf5by0949ps5we28.kiw57.m.n50o3hq25-ctix-xt8fyuzw85-6ymflfzgfzdm4gro1y8vcn4nxdzyo.t2bsdqi-90qr77qnqf26kpzuf5a652r9yc8wgfitooko8u.wj5.b6ca0gq8ejs584qp107f5qv9ze3gk7q64-5mecujmelufynb1wtb8v2n1x9-y9o36-1meqixpaj.x.zay1yebs1kiembt-ho5.8.864bew-vpjuuty7-xv4qjygg3hwqd-5gynywalvhvvesyveyxp35spjahpsiagrj0jehh3a3x8z9axqtswj383252z.d6d4ifob3rgi7j1fao-vb9l55lz.bsk1mqype9zx3n6q-u55t879v1lf.1.k.isf-swgdlh.0.m4u5aoqakjc4xlcmbpoy4ndizk4s3cdhxttexawd8mnl6e4uzxalowdqy9rokd32ct-w5p-yt-emwrzfi.lulqkw0osnqktff9fp6xbt97440w4wt3xjayovyb7flljlnosgtrofp.o.j.p5-2p577rg1fwny6cq1e2d3p5aa62rscqk6cxzeqcrvjnbqd52lumjr3qda19c-7skjef4ovphp57sme4j.v/kvfKd3LB7Nke4pyLFXi20uV', + expression = '0', ), + ) + """ + + def testLabelSyncMapping(self): + """Test LabelSyncMapping""" + # 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_label_sync_mapping_list.py b/test/test_label_sync_mapping_list.py new file mode 100644 index 0000000..59d551c --- /dev/null +++ b/test/test_label_sync_mapping_list.py @@ -0,0 +1,113 @@ +# 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.label_sync_mapping_list import LabelSyncMappingList + +class TestLabelSyncMappingList(unittest.TestCase): + """LabelSyncMappingList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LabelSyncMappingList: + """Test LabelSyncMappingList + 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 `LabelSyncMappingList` + """ + model = LabelSyncMappingList() + if include_optional: + return LabelSyncMappingList( + api_version = 'v1beta1', + kind = '', + metadata = flightctl.models.list_meta.ListMeta( + continue = '', + remaining_item_count = 56, ), + items = [ + flightctl.models.label_sync_mapping.LabelSyncMapping( + api_version = 'v1beta1', + kind = 'LabelSyncMapping', + 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.label_sync_mapping_spec.LabelSyncMappingSpec( + resource_type = 'Device', + key = '8.z.c.e.0.3zmetozkhdomha1bae37b8ocvx8o53ow2eg7p6qw9qklp6l4y010fog5ugcajvnh6nzn2yp6d7tmo7zxedi-pkbmh3.o.34ncp9spy.k.hf9r1ly-n2jyba-zuswj171d3kx6.vyykb66fgvcwlpe6fjm6div96l1hmssf5by0949ps5we28.kiw57.m.n50o3hq25-ctix-xt8fyuzw85-6ymflfzgfzdm4gro1y8vcn4nxdzyo.t2bsdqi-90qr77qnqf26kpzuf5a652r9yc8wgfitooko8u.wj5.b6ca0gq8ejs584qp107f5qv9ze3gk7q64-5mecujmelufynb1wtb8v2n1x9-y9o36-1meqixpaj.x.zay1yebs1kiembt-ho5.8.864bew-vpjuuty7-xv4qjygg3hwqd-5gynywalvhvvesyveyxp35spjahpsiagrj0jehh3a3x8z9axqtswj383252z.d6d4ifob3rgi7j1fao-vb9l55lz.bsk1mqype9zx3n6q-u55t879v1lf.1.k.isf-swgdlh.0.m4u5aoqakjc4xlcmbpoy4ndizk4s3cdhxttexawd8mnl6e4uzxalowdqy9rokd32ct-w5p-yt-emwrzfi.lulqkw0osnqktff9fp6xbt97440w4wt3xjayovyb7flljlnosgtrofp.o.j.p5-2p577rg1fwny6cq1e2d3p5aa62rscqk6cxzeqcrvjnbqd52lumjr3qda19c-7skjef4ovphp57sme4j.v/kvfKd3LB7Nke4pyLFXi20uV', + expression = '0', ), + status = flightctl.models.label_sync_mapping_status.LabelSyncMappingStatus( + conditions = [ + null + ], ), ) + ] + ) + else: + return LabelSyncMappingList( + api_version = 'v1beta1', + kind = '', + metadata = flightctl.models.list_meta.ListMeta( + continue = '', + remaining_item_count = 56, ), + items = [ + flightctl.models.label_sync_mapping.LabelSyncMapping( + api_version = 'v1beta1', + kind = 'LabelSyncMapping', + 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.label_sync_mapping_spec.LabelSyncMappingSpec( + resource_type = 'Device', + key = '8.z.c.e.0.3zmetozkhdomha1bae37b8ocvx8o53ow2eg7p6qw9qklp6l4y010fog5ugcajvnh6nzn2yp6d7tmo7zxedi-pkbmh3.o.34ncp9spy.k.hf9r1ly-n2jyba-zuswj171d3kx6.vyykb66fgvcwlpe6fjm6div96l1hmssf5by0949ps5we28.kiw57.m.n50o3hq25-ctix-xt8fyuzw85-6ymflfzgfzdm4gro1y8vcn4nxdzyo.t2bsdqi-90qr77qnqf26kpzuf5a652r9yc8wgfitooko8u.wj5.b6ca0gq8ejs584qp107f5qv9ze3gk7q64-5mecujmelufynb1wtb8v2n1x9-y9o36-1meqixpaj.x.zay1yebs1kiembt-ho5.8.864bew-vpjuuty7-xv4qjygg3hwqd-5gynywalvhvvesyveyxp35spjahpsiagrj0jehh3a3x8z9axqtswj383252z.d6d4ifob3rgi7j1fao-vb9l55lz.bsk1mqype9zx3n6q-u55t879v1lf.1.k.isf-swgdlh.0.m4u5aoqakjc4xlcmbpoy4ndizk4s3cdhxttexawd8mnl6e4uzxalowdqy9rokd32ct-w5p-yt-emwrzfi.lulqkw0osnqktff9fp6xbt97440w4wt3xjayovyb7flljlnosgtrofp.o.j.p5-2p577rg1fwny6cq1e2d3p5aa62rscqk6cxzeqcrvjnbqd52lumjr3qda19c-7skjef4ovphp57sme4j.v/kvfKd3LB7Nke4pyLFXi20uV', + expression = '0', ), + status = flightctl.models.label_sync_mapping_status.LabelSyncMappingStatus( + conditions = [ + null + ], ), ) + ], + ) + """ + + def testLabelSyncMappingList(self): + """Test LabelSyncMappingList""" + # 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_label_sync_mapping_spec.py b/test/test_label_sync_mapping_spec.py new file mode 100644 index 0000000..3cb6246 --- /dev/null +++ b/test/test_label_sync_mapping_spec.py @@ -0,0 +1,56 @@ +# 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.label_sync_mapping_spec import LabelSyncMappingSpec + +class TestLabelSyncMappingSpec(unittest.TestCase): + """LabelSyncMappingSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LabelSyncMappingSpec: + """Test LabelSyncMappingSpec + 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 `LabelSyncMappingSpec` + """ + model = LabelSyncMappingSpec() + if include_optional: + return LabelSyncMappingSpec( + resource_type = 'Device', + key = '8.z.c.e.0.3zmetozkhdomha1bae37b8ocvx8o53ow2eg7p6qw9qklp6l4y010fog5ugcajvnh6nzn2yp6d7tmo7zxedi-pkbmh3.o.34ncp9spy.k.hf9r1ly-n2jyba-zuswj171d3kx6.vyykb66fgvcwlpe6fjm6div96l1hmssf5by0949ps5we28.kiw57.m.n50o3hq25-ctix-xt8fyuzw85-6ymflfzgfzdm4gro1y8vcn4nxdzyo.t2bsdqi-90qr77qnqf26kpzuf5a652r9yc8wgfitooko8u.wj5.b6ca0gq8ejs584qp107f5qv9ze3gk7q64-5mecujmelufynb1wtb8v2n1x9-y9o36-1meqixpaj.x.zay1yebs1kiembt-ho5.8.864bew-vpjuuty7-xv4qjygg3hwqd-5gynywalvhvvesyveyxp35spjahpsiagrj0jehh3a3x8z9axqtswj383252z.d6d4ifob3rgi7j1fao-vb9l55lz.bsk1mqype9zx3n6q-u55t879v1lf.1.k.isf-swgdlh.0.m4u5aoqakjc4xlcmbpoy4ndizk4s3cdhxttexawd8mnl6e4uzxalowdqy9rokd32ct-w5p-yt-emwrzfi.lulqkw0osnqktff9fp6xbt97440w4wt3xjayovyb7flljlnosgtrofp.o.j.p5-2p577rg1fwny6cq1e2d3p5aa62rscqk6cxzeqcrvjnbqd52lumjr3qda19c-7skjef4ovphp57sme4j.v/kvfKd3LB7Nke4pyLFXi20uV', + expression = '0' + ) + else: + return LabelSyncMappingSpec( + resource_type = 'Device', + expression = '0', + ) + """ + + def testLabelSyncMappingSpec(self): + """Test LabelSyncMappingSpec""" + # 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_label_sync_mapping_status.py b/test/test_label_sync_mapping_status.py new file mode 100644 index 0000000..40fb471 --- /dev/null +++ b/test/test_label_sync_mapping_status.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.label_sync_mapping_status import LabelSyncMappingStatus + +class TestLabelSyncMappingStatus(unittest.TestCase): + """LabelSyncMappingStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LabelSyncMappingStatus: + """Test LabelSyncMappingStatus + 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 `LabelSyncMappingStatus` + """ + model = LabelSyncMappingStatus() + if include_optional: + return LabelSyncMappingStatus( + conditions = [ + null + ] + ) + else: + return LabelSyncMappingStatus( + ) + """ + + def testLabelSyncMappingStatus(self): + """Test LabelSyncMappingStatus""" + # 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_label_sync_provenance_item.py b/test/test_label_sync_provenance_item.py new file mode 100644 index 0000000..e07f30d --- /dev/null +++ b/test/test_label_sync_provenance_item.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.label_sync_provenance_item import LabelSyncProvenanceItem + +class TestLabelSyncProvenanceItem(unittest.TestCase): + """LabelSyncProvenanceItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LabelSyncProvenanceItem: + """Test LabelSyncProvenanceItem + 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 `LabelSyncProvenanceItem` + """ + model = LabelSyncProvenanceItem() + if include_optional: + return LabelSyncProvenanceItem( + key = '', + owners = [ + '' + ] + ) + else: + return LabelSyncProvenanceItem( + key = '', + owners = [ + '' + ], + ) + """ + + def testLabelSyncProvenanceItem(self): + """Test LabelSyncProvenanceItem""" + # 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_label_sync_provenance_list.py b/test/test_label_sync_provenance_list.py new file mode 100644 index 0000000..62a6b5d --- /dev/null +++ b/test/test_label_sync_provenance_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.label_sync_provenance_list import LabelSyncProvenanceList + +class TestLabelSyncProvenanceList(unittest.TestCase): + """LabelSyncProvenanceList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> LabelSyncProvenanceList: + """Test LabelSyncProvenanceList + 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 `LabelSyncProvenanceList` + """ + model = LabelSyncProvenanceList() + if include_optional: + return LabelSyncProvenanceList( + items = [ + flightctl.models.label_sync_provenance_item.LabelSyncProvenanceItem( + key = '', + owners = [ + '' + ], ) + ] + ) + else: + return LabelSyncProvenanceList( + items = [ + flightctl.models.label_sync_provenance_item.LabelSyncProvenanceItem( + key = '', + owners = [ + '' + ], ) + ], + ) + """ + + def testLabelSyncProvenanceList(self): + """Test LabelSyncProvenanceList""" + # 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_labelsyncmapping_api.py b/test/test_labelsyncmapping_api.py new file mode 100644 index 0000000..83000f3 --- /dev/null +++ b/test/test_labelsyncmapping_api.py @@ -0,0 +1,74 @@ +# 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.labelsyncmapping_api import LabelsyncmappingApi + + +class TestLabelsyncmappingApi(unittest.TestCase): + """LabelsyncmappingApi unit test stubs""" + + def setUp(self) -> None: + self.api = LabelsyncmappingApi() + + def tearDown(self) -> None: + pass + + def test_create_label_sync_mapping(self) -> None: + """Test case for create_label_sync_mapping + + """ + pass + + def test_delete_label_sync_mapping(self) -> None: + """Test case for delete_label_sync_mapping + + """ + pass + + def test_get_label_sync_mapping(self) -> None: + """Test case for get_label_sync_mapping + + """ + pass + + def test_get_label_sync_provenance(self) -> None: + """Test case for get_label_sync_provenance + + """ + pass + + def test_list_label_sync_mappings(self) -> None: + """Test case for list_label_sync_mappings + + """ + pass + + def test_patch_label_sync_mapping(self) -> None: + """Test case for patch_label_sync_mapping + + """ + pass + + def test_replace_label_sync_mapping(self) -> None: + """Test case for replace_label_sync_mapping + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pre_enrollment_action_result.py b/test/test_pre_enrollment_action_result.py new file mode 100644 index 0000000..64a3013 --- /dev/null +++ b/test/test_pre_enrollment_action_result.py @@ -0,0 +1,56 @@ +# 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.pre_enrollment_action_result import PreEnrollmentActionResult + +class TestPreEnrollmentActionResult(unittest.TestCase): + """PreEnrollmentActionResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PreEnrollmentActionResult: + """Test PreEnrollmentActionResult + 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 `PreEnrollmentActionResult` + """ + model = PreEnrollmentActionResult() + if include_optional: + return PreEnrollmentActionResult( + source = '', + exit_code = 56, + output = '' + ) + else: + return PreEnrollmentActionResult( + source = '', + exit_code = 56, + ) + """ + + def testPreEnrollmentActionResult(self): + """Test PreEnrollmentActionResult""" + # 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_pre_enrollment_result.py b/test/test_pre_enrollment_result.py new file mode 100644 index 0000000..8b67ffa --- /dev/null +++ b/test/test_pre_enrollment_result.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.pre_enrollment_result import PreEnrollmentResult + +class TestPreEnrollmentResult(unittest.TestCase): + """PreEnrollmentResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PreEnrollmentResult: + """Test PreEnrollmentResult + 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 `PreEnrollmentResult` + """ + model = PreEnrollmentResult() + if include_optional: + return PreEnrollmentResult( + success = True, + actions = [ + flightctl.models.pre_enrollment_action_result.PreEnrollmentActionResult( + source = '', + exit_code = 56, + output = '', ) + ] + ) + else: + return PreEnrollmentResult( + success = True, + ) + """ + + def testPreEnrollmentResult(self): + """Test PreEnrollmentResult""" + # 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_prepare_deltas_details.py b/test/test_prepare_deltas_details.py new file mode 100644 index 0000000..18fa294 --- /dev/null +++ b/test/test_prepare_deltas_details.py @@ -0,0 +1,56 @@ +# 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.prepare_deltas_details import PrepareDeltasDetails + +class TestPrepareDeltasDetails(unittest.TestCase): + """PrepareDeltasDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PrepareDeltasDetails: + """Test PrepareDeltasDetails + 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 `PrepareDeltasDetails` + """ + model = PrepareDeltasDetails() + if include_optional: + return PrepareDeltasDetails( + detail_type = 'PrepareDeltas', + template_version = '', + generation = 1, + resource_version = '' + ) + else: + return PrepareDeltasDetails( + detail_type = 'PrepareDeltas', + ) + """ + + def testPrepareDeltasDetails(self): + """Test PrepareDeltasDetails""" + # 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_rollout_policy_delta_generation.py b/test/test_rollout_policy_delta_generation.py new file mode 100644 index 0000000..cf100a4 --- /dev/null +++ b/test/test_rollout_policy_delta_generation.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.rollout_policy_delta_generation import RolloutPolicyDeltaGeneration + +class TestRolloutPolicyDeltaGeneration(unittest.TestCase): + """RolloutPolicyDeltaGeneration unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RolloutPolicyDeltaGeneration: + """Test RolloutPolicyDeltaGeneration + 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 `RolloutPolicyDeltaGeneration` + """ + model = RolloutPolicyDeltaGeneration() + if include_optional: + return RolloutPolicyDeltaGeneration( + generate_delta = True, + max_wait_for_delta = '90728880015280217980962255008507620686293393339756506851391026912917h', + delta_generation_timeout = '90728880015280217980962255008507620686293393339756506851391026912917h' + ) + else: + return RolloutPolicyDeltaGeneration( + ) + """ + + def testRolloutPolicyDeltaGeneration(self): + """Test RolloutPolicyDeltaGeneration""" + # 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_system_info_source_status.py b/test/test_system_info_source_status.py new file mode 100644 index 0000000..2ec70e7 --- /dev/null +++ b/test/test_system_info_source_status.py @@ -0,0 +1,56 @@ +# 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.system_info_source_status import SystemInfoSourceStatus + +class TestSystemInfoSourceStatus(unittest.TestCase): + """SystemInfoSourceStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SystemInfoSourceStatus: + """Test SystemInfoSourceStatus + 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 `SystemInfoSourceStatus` + """ + model = SystemInfoSourceStatus() + if include_optional: + return SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + message = '' + ) + else: + return SystemInfoSourceStatus( + status = 'Healthy', + last_transition_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + """ + + def testSystemInfoSourceStatus(self): + """Test SystemInfoSourceStatus""" + # 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_system_info_source_status_type.py b/test/test_system_info_source_status_type.py new file mode 100644 index 0000000..faf6307 --- /dev/null +++ b/test/test_system_info_source_status_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.system_info_source_status_type import SystemInfoSourceStatusType + +class TestSystemInfoSourceStatusType(unittest.TestCase): + """SystemInfoSourceStatusType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSystemInfoSourceStatusType(self): + """Test SystemInfoSourceStatusType""" + # inst = SystemInfoSourceStatusType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_system_info_summary_status_type.py b/test/test_system_info_summary_status_type.py new file mode 100644 index 0000000..02c4ea5 --- /dev/null +++ b/test/test_system_info_summary_status_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.system_info_summary_status_type import SystemInfoSummaryStatusType + +class TestSystemInfoSummaryStatusType(unittest.TestCase): + """SystemInfoSummaryStatusType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSystemInfoSummaryStatusType(self): + """Test SystemInfoSummaryStatusType""" + # inst = SystemInfoSummaryStatusType() + +if __name__ == '__main__': + unittest.main()