diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1cbdbf1..f27fca7 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -9,6 +9,9 @@ docs/ApplicationContent.md docs/ApplicationEnvVars.md docs/ApplicationProviderSpec.md docs/ApplicationStatusType.md +docs/ApplicationVolume.md +docs/ApplicationVolumeProviderSpec.md +docs/ApplicationVolumeStatus.md docs/ApplicationsSummaryStatusType.md docs/AuthConfig.md docs/AuthenticationApi.md @@ -95,6 +98,9 @@ docs/HttpConfigProviderSpec.md docs/HttpConfigProviderSpecHttpRef.md docs/HttpRepoSpec.md docs/ImageApplicationProviderSpec.md +docs/ImagePullPolicy.md +docs/ImageVolumeProviderSpec.md +docs/ImageVolumeSource.md docs/InlineApplicationProviderSpec.md docs/InlineConfigProviderSpec.md docs/KubernetesSecretProviderSpec.md @@ -161,6 +167,9 @@ flightctl/models/application_content.py flightctl/models/application_env_vars.py flightctl/models/application_provider_spec.py flightctl/models/application_status_type.py +flightctl/models/application_volume.py +flightctl/models/application_volume_provider_spec.py +flightctl/models/application_volume_status.py flightctl/models/applications_summary_status_type.py flightctl/models/auth_config.py flightctl/models/batch.py @@ -241,6 +250,9 @@ flightctl/models/http_config_provider_spec.py flightctl/models/http_config_provider_spec_http_ref.py flightctl/models/http_repo_spec.py flightctl/models/image_application_provider_spec.py +flightctl/models/image_pull_policy.py +flightctl/models/image_volume_provider_spec.py +flightctl/models/image_volume_source.py flightctl/models/inline_application_provider_spec.py flightctl/models/inline_config_provider_spec.py flightctl/models/kubernetes_secret_provider_spec.py @@ -289,139 +301,10 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_absolute_path.py -test/test_app_type.py -test/test_application_content.py -test/test_application_env_vars.py -test/test_application_provider_spec.py -test/test_application_status_type.py -test/test_applications_summary_status_type.py -test/test_auth_config.py -test/test_authentication_api.py -test/test_batch.py -test/test_batch_limit.py -test/test_batch_sequence.py -test/test_certificate_signing_request.py -test/test_certificate_signing_request_list.py -test/test_certificate_signing_request_spec.py -test/test_certificate_signing_request_status.py -test/test_certificatesigningrequest_api.py -test/test_condition.py -test/test_condition_status.py -test/test_condition_type.py -test/test_config_provider_spec.py -test/test_cpu_resource_monitor_spec.py -test/test_device.py -test/test_device_api.py -test/test_device_application_status.py -test/test_device_applications_summary_status.py -test/test_device_config_status.py -test/test_device_console.py -test/test_device_decommission.py -test/test_device_decommission_target_type.py -test/test_device_integrity_status.py -test/test_device_integrity_status_summary_type.py -test/test_device_lifecycle_hook_type.py -test/test_device_lifecycle_status.py -test/test_device_lifecycle_status_type.py -test/test_device_list.py -test/test_device_os_spec.py -test/test_device_os_status.py -test/test_device_resource_status.py -test/test_device_resource_status_type.py -test/test_device_spec.py -test/test_device_spec_systemd.py -test/test_device_status.py -test/test_device_summary_status.py -test/test_device_summary_status_type.py -test/test_device_system_info.py -test/test_device_update_policy_spec.py -test/test_device_updated_status.py -test/test_device_updated_status_type.py -test/test_devices_summary.py -test/test_disk_resource_monitor_spec.py -test/test_disruption_budget.py -test/test_encoding_type.py -test/test_enrollment_config.py -test/test_enrollment_request.py -test/test_enrollment_request_approval.py -test/test_enrollment_request_approval_status.py -test/test_enrollment_request_list.py -test/test_enrollment_request_spec.py -test/test_enrollment_request_status.py -test/test_enrollment_service.py -test/test_enrollment_service_auth.py -test/test_enrollment_service_service.py -test/test_enrollmentrequest_api.py -test/test_event.py -test/test_event_api.py -test/test_event_details.py -test/test_event_list.py -test/test_event_source.py -test/test_file_content.py -test/test_file_metadata.py -test/test_file_operation.py -test/test_file_spec.py -test/test_fleet.py -test/test_fleet_api.py -test/test_fleet_list.py -test/test_fleet_rollout_status.py -test/test_fleet_spec.py -test/test_fleet_spec_template.py -test/test_fleet_status.py -test/test_generic_repo_spec.py -test/test_git_config_provider_spec.py -test/test_git_config_provider_spec_git_ref.py -test/test_hook_action.py -test/test_hook_action_run.py -test/test_hook_condition.py -test/test_hook_condition_path_op.py -test/test_http_config.py -test/test_http_config_provider_spec.py -test/test_http_config_provider_spec_http_ref.py -test/test_http_repo_spec.py -test/test_image_application_provider_spec.py -test/test_inline_application_provider_spec.py -test/test_inline_config_provider_spec.py -test/test_kubernetes_secret_provider_spec.py -test/test_kubernetes_secret_provider_spec_secret_ref.py -test/test_label_api.py -test/test_label_selector.py -test/test_list_meta.py -test/test_match_expression.py -test/test_memory_resource_monitor_spec.py -test/test_object_meta.py -test/test_object_reference.py -test/test_patch_request_inner.py -test/test_relative_path.py -test/test_repo_spec_type.py -test/test_repository.py -test/test_repository_api.py -test/test_repository_list.py -test/test_repository_spec.py -test/test_repository_status.py -test/test_resource_alert_rule.py -test/test_resource_alert_severity_type.py -test/test_resource_kind.py -test/test_resource_monitor.py -test/test_resource_monitor_spec.py -test/test_resource_sync.py -test/test_resource_sync_list.py -test/test_resource_sync_spec.py -test/test_resource_sync_status.py -test/test_resource_updated_details.py -test/test_resourcesync_api.py -test/test_rollout_device_selection.py -test/test_rollout_policy.py -test/test_rollout_strategy.py -test/test_ssh_config.py -test/test_ssh_repo_spec.py -test/test_status.py -test/test_template_version.py -test/test_template_version_list.py -test/test_template_version_spec.py -test/test_template_version_status.py -test/test_update_schedule.py -test/test_version.py -test/test_version_api.py +test/test_application_volume.py +test/test_application_volume_provider_spec.py +test/test_application_volume_status.py +test/test_image_pull_policy.py +test/test_image_volume_provider_spec.py +test/test_image_volume_source.py tox.ini diff --git a/README.md b/README.md index 5ef5163..478d279 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,6 @@ Class | Method | HTTP request | Description *AuthenticationApi* | [**auth_validate**](docs/AuthenticationApi.md#auth_validate) | **GET** /api/v1/auth/validate | *CertificatesigningrequestApi* | [**create_certificate_signing_request**](docs/CertificatesigningrequestApi.md#create_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests | *CertificatesigningrequestApi* | [**delete_certificate_signing_request**](docs/CertificatesigningrequestApi.md#delete_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name} | -*CertificatesigningrequestApi* | [**delete_certificate_signing_requests**](docs/CertificatesigningrequestApi.md#delete_certificate_signing_requests) | **DELETE** /api/v1/certificatesigningrequests | *CertificatesigningrequestApi* | [**get_certificate_signing_request**](docs/CertificatesigningrequestApi.md#get_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | *CertificatesigningrequestApi* | [**list_certificate_signing_requests**](docs/CertificatesigningrequestApi.md#list_certificate_signing_requests) | **GET** /api/v1/certificatesigningrequests | *CertificatesigningrequestApi* | [**patch_certificate_signing_request**](docs/CertificatesigningrequestApi.md#patch_certificate_signing_request) | **PATCH** /api/v1/certificatesigningrequests/{name} | @@ -98,7 +97,6 @@ Class | Method | HTTP request | Description *DeviceApi* | [**create_device**](docs/DeviceApi.md#create_device) | **POST** /api/v1/devices | *DeviceApi* | [**decommission_device**](docs/DeviceApi.md#decommission_device) | **PUT** /api/v1/devices/{name}/decommission | *DeviceApi* | [**delete_device**](docs/DeviceApi.md#delete_device) | **DELETE** /api/v1/devices/{name} | -*DeviceApi* | [**delete_devices**](docs/DeviceApi.md#delete_devices) | **DELETE** /api/v1/devices | *DeviceApi* | [**get_device**](docs/DeviceApi.md#get_device) | **GET** /api/v1/devices/{name} | *DeviceApi* | [**get_device_status**](docs/DeviceApi.md#get_device_status) | **GET** /api/v1/devices/{name}/status | *DeviceApi* | [**get_rendered_device**](docs/DeviceApi.md#get_rendered_device) | **GET** /api/v1/devices/{name}/rendered | @@ -110,7 +108,6 @@ Class | Method | HTTP request | Description *EnrollmentrequestApi* | [**approve_enrollment_request**](docs/EnrollmentrequestApi.md#approve_enrollment_request) | **PUT** /api/v1/enrollmentrequests/{name}/approval | *EnrollmentrequestApi* | [**create_enrollment_request**](docs/EnrollmentrequestApi.md#create_enrollment_request) | **POST** /api/v1/enrollmentrequests | *EnrollmentrequestApi* | [**delete_enrollment_request**](docs/EnrollmentrequestApi.md#delete_enrollment_request) | **DELETE** /api/v1/enrollmentrequests/{name} | -*EnrollmentrequestApi* | [**delete_enrollment_requests**](docs/EnrollmentrequestApi.md#delete_enrollment_requests) | **DELETE** /api/v1/enrollmentrequests | *EnrollmentrequestApi* | [**get_enrollment_config**](docs/EnrollmentrequestApi.md#get_enrollment_config) | **GET** /api/v1/enrollmentconfig | *EnrollmentrequestApi* | [**get_enrollment_request**](docs/EnrollmentrequestApi.md#get_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | *EnrollmentrequestApi* | [**get_enrollment_request_status**](docs/EnrollmentrequestApi.md#get_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | @@ -122,9 +119,7 @@ Class | Method | HTTP request | Description *EventApi* | [**list_events**](docs/EventApi.md#list_events) | **GET** /api/v1/events | *FleetApi* | [**create_fleet**](docs/FleetApi.md#create_fleet) | **POST** /api/v1/fleets | *FleetApi* | [**delete_fleet**](docs/FleetApi.md#delete_fleet) | **DELETE** /api/v1/fleets/{name} | -*FleetApi* | [**delete_fleets**](docs/FleetApi.md#delete_fleets) | **DELETE** /api/v1/fleets | *FleetApi* | [**delete_template_version**](docs/FleetApi.md#delete_template_version) | **DELETE** /api/v1/fleets/{fleet}/templateversions/{name} | -*FleetApi* | [**delete_template_versions**](docs/FleetApi.md#delete_template_versions) | **DELETE** /api/v1/fleets/{fleet}/templateversions | *FleetApi* | [**get_fleet**](docs/FleetApi.md#get_fleet) | **GET** /api/v1/fleets/{name} | *FleetApi* | [**get_fleet_status**](docs/FleetApi.md#get_fleet_status) | **GET** /api/v1/fleets/{name}/status | *FleetApi* | [**get_template_version**](docs/FleetApi.md#get_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | @@ -136,7 +131,6 @@ Class | Method | HTTP request | Description *FleetApi* | [**replace_fleet_status**](docs/FleetApi.md#replace_fleet_status) | **PUT** /api/v1/fleets/{name}/status | *LabelApi* | [**list_labels**](docs/LabelApi.md#list_labels) | **GET** /api/v1/labels | *RepositoryApi* | [**create_repository**](docs/RepositoryApi.md#create_repository) | **POST** /api/v1/repositories | -*RepositoryApi* | [**delete_repositories**](docs/RepositoryApi.md#delete_repositories) | **DELETE** /api/v1/repositories | *RepositoryApi* | [**delete_repository**](docs/RepositoryApi.md#delete_repository) | **DELETE** /api/v1/repositories/{name} | *RepositoryApi* | [**get_repository**](docs/RepositoryApi.md#get_repository) | **GET** /api/v1/repositories/{name} | *RepositoryApi* | [**list_repositories**](docs/RepositoryApi.md#list_repositories) | **GET** /api/v1/repositories | @@ -144,7 +138,6 @@ Class | Method | HTTP request | Description *RepositoryApi* | [**replace_repository**](docs/RepositoryApi.md#replace_repository) | **PUT** /api/v1/repositories/{name} | *ResourcesyncApi* | [**create_resource_sync**](docs/ResourcesyncApi.md#create_resource_sync) | **POST** /api/v1/resourcesyncs | *ResourcesyncApi* | [**delete_resource_sync**](docs/ResourcesyncApi.md#delete_resource_sync) | **DELETE** /api/v1/resourcesyncs/{name} | -*ResourcesyncApi* | [**delete_resource_syncs**](docs/ResourcesyncApi.md#delete_resource_syncs) | **DELETE** /api/v1/resourcesyncs | *ResourcesyncApi* | [**get_resource_sync**](docs/ResourcesyncApi.md#get_resource_sync) | **GET** /api/v1/resourcesyncs/{name} | *ResourcesyncApi* | [**list_resource_syncs**](docs/ResourcesyncApi.md#list_resource_syncs) | **GET** /api/v1/resourcesyncs | *ResourcesyncApi* | [**patch_resource_sync**](docs/ResourcesyncApi.md#patch_resource_sync) | **PATCH** /api/v1/resourcesyncs/{name} | @@ -160,6 +153,9 @@ Class | Method | HTTP request | Description - [ApplicationEnvVars](docs/ApplicationEnvVars.md) - [ApplicationProviderSpec](docs/ApplicationProviderSpec.md) - [ApplicationStatusType](docs/ApplicationStatusType.md) + - [ApplicationVolume](docs/ApplicationVolume.md) + - [ApplicationVolumeProviderSpec](docs/ApplicationVolumeProviderSpec.md) + - [ApplicationVolumeStatus](docs/ApplicationVolumeStatus.md) - [ApplicationsSummaryStatusType](docs/ApplicationsSummaryStatusType.md) - [AuthConfig](docs/AuthConfig.md) - [Batch](docs/Batch.md) @@ -240,6 +236,9 @@ Class | Method | HTTP request | Description - [HttpConfigProviderSpecHttpRef](docs/HttpConfigProviderSpecHttpRef.md) - [HttpRepoSpec](docs/HttpRepoSpec.md) - [ImageApplicationProviderSpec](docs/ImageApplicationProviderSpec.md) + - [ImagePullPolicy](docs/ImagePullPolicy.md) + - [ImageVolumeProviderSpec](docs/ImageVolumeProviderSpec.md) + - [ImageVolumeSource](docs/ImageVolumeSource.md) - [InlineApplicationProviderSpec](docs/InlineApplicationProviderSpec.md) - [InlineConfigProviderSpec](docs/InlineConfigProviderSpec.md) - [KubernetesSecretProviderSpec](docs/KubernetesSecretProviderSpec.md) diff --git a/api/v1alpha1/openapi.yml b/api/v1alpha1/openapi.yml index 5405aa4..6e82115 100644 --- a/api/v1alpha1/openapi.yml +++ b/api/v1alpha1/openapi.yml @@ -231,36 +231,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: - tags: - - resourcesync - description: Delete ResourceSync resources. - operationId: deleteResourceSyncs - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "503": - description: ServiceUnavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/resourcesyncs/{name}: get: tags: @@ -585,36 +555,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: - tags: - - repository - description: Delete Repository resources. - operationId: deleteRepositories - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "503": - description: ServiceUnavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/repositories/{name}: get: tags: @@ -945,36 +885,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: - tags: - - device - description: Delete Device resources. - operationId: deleteDevices - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "503": - description: ServiceUnavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/devices/{name}: get: tags: @@ -1618,36 +1528,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: - tags: - - enrollmentrequest - description: Delete EnrollmentRequest resources. - operationId: deleteEnrollmentRequests - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "503": - description: ServiceUnavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/enrollmentrequests/{name}: get: tags: @@ -2182,36 +2062,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: - tags: - - certificatesigningrequest - description: Delete CertificateSigningRequest resources. - operationId: deleteCertificateSigningRequests - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "503": - description: ServiceUnavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/certificatesigningrequests/{name}: patch: tags: @@ -2605,36 +2455,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: - tags: - - fleet - description: Delete Fleet resources. - operationId: deleteFleets - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "503": - description: ServiceUnavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/fleets/{name}: get: tags: @@ -3071,43 +2891,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Status' - delete: - tags: - - fleet - description: delete a collection of template versions - operationId: deleteTemplateVersions - parameters: - - name: fleet - in: path - description: The owner of the template versions. - required: true - schema: - type: string - responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "401": - description: Unauthorized - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "403": - description: Forbidden - content: - application/json: - schema: - $ref: '#/components/schemas/Status' - "503": - description: ServiceUnavailable - content: - application/json: - schema: - $ref: '#/components/schemas/Status' /api/v1/fleets/{fleet}/templateversions/{name}: get: tags: @@ -3291,6 +3074,15 @@ paths: 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. @@ -3741,23 +3533,67 @@ components: - $ref: '#/components/schemas/ImageApplicationProviderSpec' - $ref: '#/components/schemas/InlineApplicationProviderSpec' ImageApplicationProviderSpec: + type: object + allOf: + - $ref: '#/components/schemas/ApplicationVolumeProviderSpec' + - type: object + properties: + image: + type: string + description: Reference to the container image for the application package. + required: + - image + InlineApplicationProviderSpec: + type: object + allOf: + - $ref: '#/components/schemas/ApplicationVolumeProviderSpec' + - 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. + required: + - name + - oneOf: + - $ref: "#/components/schemas/ImageVolumeProviderSpec" + ImageVolumeProviderSpec: type: object properties: image: - type: string - description: Reference to the container image for the application package. + $ref: '#/components/schemas/ImageVolumeSource' required: - image - InlineApplicationProviderSpec: + ImageVolumeSource: type: object + description: Describes the source of an OCI-compliant image or artifact. properties: - inline: - type: array - description: A list of application content. - items: - $ref: "#/components/schemas/ApplicationContent" + 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. + pullPolicy: + $ref: '#/components/schemas/ImagePullPolicy' required: - - inline + - reference ApplicationContent: allOf: - $ref: '#/components/schemas/FileContent' @@ -3996,6 +3832,18 @@ components: - 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: @@ -4131,6 +3979,24 @@ components: description: Number of restarts observed for the application. status: $ref: "#/components/schemas/ApplicationStatusType" + 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. @@ -5218,6 +5084,25 @@ components: - ResourceUpdateFailed - ResourceDeleted - ResourceDeletionFailed + - DeviceDecommissioned + - DeviceDecommissionFailed + - DeviceCPUCritical + - DeviceCPUWarning + - DeviceCPUNormal + - DeviceMemoryCritical + - DeviceMemoryWarning + - DeviceMemoryNormal + - DeviceDiskCritical + - DeviceDiskWarning + - DeviceDiskNormal + - DeviceApplicationError + - DeviceApplicationDegraded + - DeviceApplicationHealthy + - DeviceDisconnected + - DeviceConnected + - DeviceContentUpToDate + - DeviceContentOutOfDate + - DeviceContentUpdating message: type: string description: A human-readable description of the status of this operation. diff --git a/docs/ApplicationProviderSpec.md b/docs/ApplicationProviderSpec.md index 8a0fa11..7194316 100644 --- a/docs/ApplicationProviderSpec.md +++ b/docs/ApplicationProviderSpec.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. The key and value each must be between 1 and 253 characters. | [optional] **name** | **str** | The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace. | [optional] **app_type** | [**AppType**](AppType.md) | | [optional] +**volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] **image** | **str** | Reference to the container image for the application package. | **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | diff --git a/docs/ApplicationVolume.md b/docs/ApplicationVolume.md new file mode 100644 index 0000000..0bf0c2b --- /dev/null +++ b/docs/ApplicationVolume.md @@ -0,0 +1,30 @@ +# ApplicationVolume + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Unique name of the volume used within the application. | +**image** | [**ImageVolumeSource**](ImageVolumeSource.md) | | + +## Example + +```python +from flightctl.models.application_volume import ApplicationVolume + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationVolume from a JSON string +application_volume_instance = ApplicationVolume.from_json(json) +# print the JSON string representation of the object +print(ApplicationVolume.to_json()) + +# convert the object into a dict +application_volume_dict = application_volume_instance.to_dict() +# create an instance of ApplicationVolume from a dict +application_volume_from_dict = ApplicationVolume.from_dict(application_volume_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/ApplicationVolumeProviderSpec.md b/docs/ApplicationVolumeProviderSpec.md new file mode 100644 index 0000000..c2b9c67 --- /dev/null +++ b/docs/ApplicationVolumeProviderSpec.md @@ -0,0 +1,29 @@ +# ApplicationVolumeProviderSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] + +## Example + +```python +from flightctl.models.application_volume_provider_spec import ApplicationVolumeProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationVolumeProviderSpec from a JSON string +application_volume_provider_spec_instance = ApplicationVolumeProviderSpec.from_json(json) +# print the JSON string representation of the object +print(ApplicationVolumeProviderSpec.to_json()) + +# convert the object into a dict +application_volume_provider_spec_dict = application_volume_provider_spec_instance.to_dict() +# create an instance of ApplicationVolumeProviderSpec from a dict +application_volume_provider_spec_from_dict = ApplicationVolumeProviderSpec.from_dict(application_volume_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationVolumeStatus.md b/docs/ApplicationVolumeStatus.md new file mode 100644 index 0000000..c469fce --- /dev/null +++ b/docs/ApplicationVolumeStatus.md @@ -0,0 +1,31 @@ +# ApplicationVolumeStatus + +Status of a volume used by an application. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the volume. | +**reference** | **str** | Reference to the deployed OCI-compliant image or artifact backing the volume. | + +## Example + +```python +from flightctl.models.application_volume_status import ApplicationVolumeStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of ApplicationVolumeStatus from a JSON string +application_volume_status_instance = ApplicationVolumeStatus.from_json(json) +# print the JSON string representation of the object +print(ApplicationVolumeStatus.to_json()) + +# convert the object into a dict +application_volume_status_dict = application_volume_status_instance.to_dict() +# create an instance of ApplicationVolumeStatus from a dict +application_volume_status_from_dict = ApplicationVolumeStatus.from_dict(application_volume_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/CertificatesigningrequestApi.md b/docs/CertificatesigningrequestApi.md index 5a3edf5..ec49d4c 100644 --- a/docs/CertificatesigningrequestApi.md +++ b/docs/CertificatesigningrequestApi.md @@ -6,7 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_certificate_signing_request**](CertificatesigningrequestApi.md#create_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests | [**delete_certificate_signing_request**](CertificatesigningrequestApi.md#delete_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name} | -[**delete_certificate_signing_requests**](CertificatesigningrequestApi.md#delete_certificate_signing_requests) | **DELETE** /api/v1/certificatesigningrequests | [**get_certificate_signing_request**](CertificatesigningrequestApi.md#get_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | [**list_certificate_signing_requests**](CertificatesigningrequestApi.md#list_certificate_signing_requests) | **GET** /api/v1/certificatesigningrequests | [**patch_certificate_signing_request**](CertificatesigningrequestApi.md#patch_certificate_signing_request) | **PATCH** /api/v1/certificatesigningrequests/{name} | @@ -157,72 +156,6 @@ 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) -# **delete_certificate_signing_requests** -> Status delete_certificate_signing_requests() - - - -Delete CertificateSigningRequest resources. - -### Example - - -```python -import flightctl -from flightctl.models.status import Status -from flightctl.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = flightctl.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with flightctl.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flightctl.CertificatesigningrequestApi(api_client) - - try: - api_response = api_instance.delete_certificate_signing_requests() - print("The response of CertificatesigningrequestApi->delete_certificate_signing_requests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling CertificatesigningrequestApi->delete_certificate_signing_requests: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Status**](Status.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**503** | ServiceUnavailable | - | - -[[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_certificate_signing_request** > CertificateSigningRequest get_certificate_signing_request(name) diff --git a/docs/DeviceApi.md b/docs/DeviceApi.md index 7591a9b..6a3a9ae 100644 --- a/docs/DeviceApi.md +++ b/docs/DeviceApi.md @@ -7,7 +7,6 @@ Method | HTTP request | Description [**create_device**](DeviceApi.md#create_device) | **POST** /api/v1/devices | [**decommission_device**](DeviceApi.md#decommission_device) | **PUT** /api/v1/devices/{name}/decommission | [**delete_device**](DeviceApi.md#delete_device) | **DELETE** /api/v1/devices/{name} | -[**delete_devices**](DeviceApi.md#delete_devices) | **DELETE** /api/v1/devices | [**get_device**](DeviceApi.md#get_device) | **GET** /api/v1/devices/{name} | [**get_device_status**](DeviceApi.md#get_device_status) | **GET** /api/v1/devices/{name}/status | [**get_rendered_device**](DeviceApi.md#get_rendered_device) | **GET** /api/v1/devices/{name}/rendered | @@ -236,72 +235,6 @@ 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) -# **delete_devices** -> Status delete_devices() - - - -Delete Device resources. - -### Example - - -```python -import flightctl -from flightctl.models.status import Status -from flightctl.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = flightctl.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with flightctl.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flightctl.DeviceApi(api_client) - - try: - api_response = api_instance.delete_devices() - print("The response of DeviceApi->delete_devices:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DeviceApi->delete_devices: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Status**](Status.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**503** | ServiceUnavailable | - | - -[[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** > Device get_device(name) diff --git a/docs/DeviceApplicationStatus.md b/docs/DeviceApplicationStatus.md index 3be6aae..78ed625 100644 --- a/docs/DeviceApplicationStatus.md +++ b/docs/DeviceApplicationStatus.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **ready** | **str** | The number of containers which are ready in the application. | **restarts** | **int** | Number of restarts observed for the application. | **status** | [**ApplicationStatusType**](ApplicationStatusType.md) | | +**volumes** | [**List[ApplicationVolumeStatus]**](ApplicationVolumeStatus.md) | Status of volumes used by this application. | [optional] ## Example diff --git a/docs/EnrollmentrequestApi.md b/docs/EnrollmentrequestApi.md index 32b8c9f..7ecd057 100644 --- a/docs/EnrollmentrequestApi.md +++ b/docs/EnrollmentrequestApi.md @@ -7,7 +7,6 @@ Method | HTTP request | Description [**approve_enrollment_request**](EnrollmentrequestApi.md#approve_enrollment_request) | **PUT** /api/v1/enrollmentrequests/{name}/approval | [**create_enrollment_request**](EnrollmentrequestApi.md#create_enrollment_request) | **POST** /api/v1/enrollmentrequests | [**delete_enrollment_request**](EnrollmentrequestApi.md#delete_enrollment_request) | **DELETE** /api/v1/enrollmentrequests/{name} | -[**delete_enrollment_requests**](EnrollmentrequestApi.md#delete_enrollment_requests) | **DELETE** /api/v1/enrollmentrequests | [**get_enrollment_config**](EnrollmentrequestApi.md#get_enrollment_config) | **GET** /api/v1/enrollmentconfig | [**get_enrollment_request**](EnrollmentrequestApi.md#get_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | [**get_enrollment_request_status**](EnrollmentrequestApi.md#get_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | @@ -236,72 +235,6 @@ 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) -# **delete_enrollment_requests** -> Status delete_enrollment_requests() - - - -Delete EnrollmentRequest resources. - -### Example - - -```python -import flightctl -from flightctl.models.status import Status -from flightctl.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = flightctl.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with flightctl.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flightctl.EnrollmentrequestApi(api_client) - - try: - api_response = api_instance.delete_enrollment_requests() - print("The response of EnrollmentrequestApi->delete_enrollment_requests:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling EnrollmentrequestApi->delete_enrollment_requests: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Status**](Status.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**503** | ServiceUnavailable | - | - -[[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_config** > EnrollmentConfig get_enrollment_config(csr=csr) diff --git a/docs/EventApi.md b/docs/EventApi.md index 9545fb1..aad266e 100644 --- a/docs/EventApi.md +++ b/docs/EventApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description # **list_events** -> EventList list_events(field_selector=field_selector, limit=limit, var_continue=var_continue) +> EventList list_events(field_selector=field_selector, order=order, limit=limit, var_continue=var_continue) @@ -35,11 +35,12 @@ with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EventApi(api_client) field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + order = desc # str | Sort order for the results by timestamp. Defaults to 'desc' (newest first). (optional) (default to desc) limit = 56 # int | The maximum number of events to return in the response. (optional) 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) try: - api_response = api_instance.list_events(field_selector=field_selector, limit=limit, var_continue=var_continue) + api_response = api_instance.list_events(field_selector=field_selector, order=order, limit=limit, var_continue=var_continue) print("The response of EventApi->list_events:\n") pprint(api_response) except Exception as e: @@ -54,6 +55,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **order** | **str**| Sort order for the results by timestamp. Defaults to 'desc' (newest first). | [optional] [default to desc] **limit** | **int**| The maximum number of events to return in the response. | [optional] **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] diff --git a/docs/FleetApi.md b/docs/FleetApi.md index 34e693c..bbdec4e 100644 --- a/docs/FleetApi.md +++ b/docs/FleetApi.md @@ -6,9 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_fleet**](FleetApi.md#create_fleet) | **POST** /api/v1/fleets | [**delete_fleet**](FleetApi.md#delete_fleet) | **DELETE** /api/v1/fleets/{name} | -[**delete_fleets**](FleetApi.md#delete_fleets) | **DELETE** /api/v1/fleets | [**delete_template_version**](FleetApi.md#delete_template_version) | **DELETE** /api/v1/fleets/{fleet}/templateversions/{name} | -[**delete_template_versions**](FleetApi.md#delete_template_versions) | **DELETE** /api/v1/fleets/{fleet}/templateversions | [**get_fleet**](FleetApi.md#get_fleet) | **GET** /api/v1/fleets/{name} | [**get_fleet_status**](FleetApi.md#get_fleet_status) | **GET** /api/v1/fleets/{name}/status | [**get_template_version**](FleetApi.md#get_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | @@ -163,72 +161,6 @@ 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) -# **delete_fleets** -> Status delete_fleets() - - - -Delete Fleet resources. - -### Example - - -```python -import flightctl -from flightctl.models.status import Status -from flightctl.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = flightctl.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with flightctl.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flightctl.FleetApi(api_client) - - try: - api_response = api_instance.delete_fleets() - print("The response of FleetApi->delete_fleets:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FleetApi->delete_fleets: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Status**](Status.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**503** | ServiceUnavailable | - | - -[[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_template_version** > Status delete_template_version(fleet, name) @@ -302,76 +234,6 @@ 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) -# **delete_template_versions** -> Status delete_template_versions(fleet) - - - -delete a collection of template versions - -### Example - - -```python -import flightctl -from flightctl.models.status import Status -from flightctl.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = flightctl.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with flightctl.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flightctl.FleetApi(api_client) - fleet = 'fleet_example' # str | The owner of the template versions. - - try: - api_response = api_instance.delete_template_versions(fleet) - print("The response of FleetApi->delete_template_versions:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FleetApi->delete_template_versions: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fleet** | **str**| The owner of the template versions. | - -### Return type - -[**Status**](Status.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**503** | ServiceUnavailable | - | - -[[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_fleet** > Fleet get_fleet(name, add_devices_summary=add_devices_summary) diff --git a/docs/ImageApplicationProviderSpec.md b/docs/ImageApplicationProviderSpec.md index 708b811..d5539f7 100644 --- a/docs/ImageApplicationProviderSpec.md +++ b/docs/ImageApplicationProviderSpec.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] **image** | **str** | Reference to the container image for the application package. | ## Example diff --git a/docs/ImagePullPolicy.md b/docs/ImagePullPolicy.md new file mode 100644 index 0000000..f59f3fe --- /dev/null +++ b/docs/ImagePullPolicy.md @@ -0,0 +1,15 @@ +# ImagePullPolicy + +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` (value: `'Always'`) + +* `IFNOTPRESENT` (value: `'IfNotPresent'`) + +* `NEVER` (value: `'Never'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageVolumeProviderSpec.md b/docs/ImageVolumeProviderSpec.md new file mode 100644 index 0000000..7054488 --- /dev/null +++ b/docs/ImageVolumeProviderSpec.md @@ -0,0 +1,29 @@ +# ImageVolumeProviderSpec + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | [**ImageVolumeSource**](ImageVolumeSource.md) | | + +## Example + +```python +from flightctl.models.image_volume_provider_spec import ImageVolumeProviderSpec + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageVolumeProviderSpec from a JSON string +image_volume_provider_spec_instance = ImageVolumeProviderSpec.from_json(json) +# print the JSON string representation of the object +print(ImageVolumeProviderSpec.to_json()) + +# convert the object into a dict +image_volume_provider_spec_dict = image_volume_provider_spec_instance.to_dict() +# create an instance of ImageVolumeProviderSpec from a dict +image_volume_provider_spec_from_dict = ImageVolumeProviderSpec.from_dict(image_volume_provider_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImageVolumeSource.md b/docs/ImageVolumeSource.md new file mode 100644 index 0000000..af32abf --- /dev/null +++ b/docs/ImageVolumeSource.md @@ -0,0 +1,30 @@ +# ImageVolumeSource + +Describes the source of an OCI-compliant image or artifact. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reference** | **str** | 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. | + +## Example + +```python +from flightctl.models.image_volume_source import ImageVolumeSource + +# TODO update the JSON string below +json = "{}" +# create an instance of ImageVolumeSource from a JSON string +image_volume_source_instance = ImageVolumeSource.from_json(json) +# print the JSON string representation of the object +print(ImageVolumeSource.to_json()) + +# convert the object into a dict +image_volume_source_dict = image_volume_source_instance.to_dict() +# create an instance of ImageVolumeSource from a dict +image_volume_source_from_dict = ImageVolumeSource.from_dict(image_volume_source_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/InlineApplicationProviderSpec.md b/docs/InlineApplicationProviderSpec.md index 08763ad..445ce7e 100644 --- a/docs/InlineApplicationProviderSpec.md +++ b/docs/InlineApplicationProviderSpec.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**volumes** | [**List[ApplicationVolume]**](ApplicationVolume.md) | List of application volumes. | [optional] **inline** | [**List[ApplicationContent]**](ApplicationContent.md) | A list of application content. | ## Example diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index 6314225..3aade35 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -5,7 +5,6 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_repository**](RepositoryApi.md#create_repository) | **POST** /api/v1/repositories | -[**delete_repositories**](RepositoryApi.md#delete_repositories) | **DELETE** /api/v1/repositories | [**delete_repository**](RepositoryApi.md#delete_repository) | **DELETE** /api/v1/repositories/{name} | [**get_repository**](RepositoryApi.md#get_repository) | **GET** /api/v1/repositories/{name} | [**list_repositories**](RepositoryApi.md#list_repositories) | **GET** /api/v1/repositories | @@ -85,72 +84,6 @@ 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) -# **delete_repositories** -> Status delete_repositories() - - - -Delete Repository resources. - -### Example - - -```python -import flightctl -from flightctl.models.status import Status -from flightctl.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = flightctl.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with flightctl.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flightctl.RepositoryApi(api_client) - - try: - api_response = api_instance.delete_repositories() - print("The response of RepositoryApi->delete_repositories:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RepositoryApi->delete_repositories: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Status**](Status.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**503** | ServiceUnavailable | - | - -[[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_repository** > Status delete_repository(name) diff --git a/docs/ResourcesyncApi.md b/docs/ResourcesyncApi.md index 5561813..b65437d 100644 --- a/docs/ResourcesyncApi.md +++ b/docs/ResourcesyncApi.md @@ -6,7 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**create_resource_sync**](ResourcesyncApi.md#create_resource_sync) | **POST** /api/v1/resourcesyncs | [**delete_resource_sync**](ResourcesyncApi.md#delete_resource_sync) | **DELETE** /api/v1/resourcesyncs/{name} | -[**delete_resource_syncs**](ResourcesyncApi.md#delete_resource_syncs) | **DELETE** /api/v1/resourcesyncs | [**get_resource_sync**](ResourcesyncApi.md#get_resource_sync) | **GET** /api/v1/resourcesyncs/{name} | [**list_resource_syncs**](ResourcesyncApi.md#list_resource_syncs) | **GET** /api/v1/resourcesyncs | [**patch_resource_sync**](ResourcesyncApi.md#patch_resource_sync) | **PATCH** /api/v1/resourcesyncs/{name} | @@ -156,72 +155,6 @@ 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) -# **delete_resource_syncs** -> Status delete_resource_syncs() - - - -Delete ResourceSync resources. - -### Example - - -```python -import flightctl -from flightctl.models.status import Status -from flightctl.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = flightctl.Configuration( - host = "http://localhost" -) - - -# Enter a context with an instance of the API client -with flightctl.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = flightctl.ResourcesyncApi(api_client) - - try: - api_response = api_instance.delete_resource_syncs() - print("The response of ResourcesyncApi->delete_resource_syncs:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ResourcesyncApi->delete_resource_syncs: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**Status**](Status.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**401** | Unauthorized | - | -**403** | Forbidden | - | -**503** | ServiceUnavailable | - | - -[[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_resource_sync** > ResourceSync get_resource_sync(name) diff --git a/flightctl/__init__.py b/flightctl/__init__.py index 7c9b374..bc35ddc 100644 --- a/flightctl/__init__.py +++ b/flightctl/__init__.py @@ -47,6 +47,9 @@ from flightctl.models.application_env_vars import ApplicationEnvVars from flightctl.models.application_provider_spec import ApplicationProviderSpec from flightctl.models.application_status_type import ApplicationStatusType +from flightctl.models.application_volume import ApplicationVolume +from flightctl.models.application_volume_provider_spec import ApplicationVolumeProviderSpec +from flightctl.models.application_volume_status import ApplicationVolumeStatus from flightctl.models.applications_summary_status_type import ApplicationsSummaryStatusType from flightctl.models.auth_config import AuthConfig from flightctl.models.batch import Batch @@ -127,6 +130,9 @@ from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef from flightctl.models.http_repo_spec import HttpRepoSpec from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec +from flightctl.models.image_pull_policy import ImagePullPolicy +from flightctl.models.image_volume_provider_spec import ImageVolumeProviderSpec +from flightctl.models.image_volume_source import ImageVolumeSource from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec from flightctl.models.inline_config_provider_spec import InlineConfigProviderSpec from flightctl.models.kubernetes_secret_provider_spec import KubernetesSecretProviderSpec diff --git a/flightctl/api/certificatesigningrequest_api.py b/flightctl/api/certificatesigningrequest_api.py index d9c861b..b074292 100644 --- a/flightctl/api/certificatesigningrequest_api.py +++ b/flightctl/api/certificatesigningrequest_api.py @@ -603,260 +603,6 @@ def _delete_certificate_signing_request_serialize( - @validate_call - def delete_certificate_signing_requests( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Status: - """delete_certificate_signing_requests - - Delete CertificateSigningRequest resources. - - :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_certificate_signing_requests_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_certificate_signing_requests_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Status]: - """delete_certificate_signing_requests - - Delete CertificateSigningRequest resources. - - :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_certificate_signing_requests_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_certificate_signing_requests_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_certificate_signing_requests - - Delete CertificateSigningRequest resources. - - :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_certificate_signing_requests_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '503': "Status", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_certificate_signing_requests_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/certificatesigningrequests', - 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_certificate_signing_request( self, diff --git a/flightctl/api/device_api.py b/flightctl/api/device_api.py index aa198c6..be718d3 100644 --- a/flightctl/api/device_api.py +++ b/flightctl/api/device_api.py @@ -907,260 +907,6 @@ def _delete_device_serialize( - @validate_call - def delete_devices( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Status: - """delete_devices - - Delete Device resources. - - :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_devices_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_devices_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Status]: - """delete_devices - - Delete Device resources. - - :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_devices_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_devices_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_devices - - Delete Device resources. - - :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_devices_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '503': "Status", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_devices_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/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 get_device( self, diff --git a/flightctl/api/enrollmentrequest_api.py b/flightctl/api/enrollmentrequest_api.py index 2eeb0f3..a2ce1c5 100644 --- a/flightctl/api/enrollmentrequest_api.py +++ b/flightctl/api/enrollmentrequest_api.py @@ -909,260 +909,6 @@ def _delete_enrollment_request_serialize( - @validate_call - def delete_enrollment_requests( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Status: - """delete_enrollment_requests - - Delete EnrollmentRequest resources. - - :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_requests_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_requests_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Status]: - """delete_enrollment_requests - - Delete EnrollmentRequest resources. - - :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_requests_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_requests_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_enrollment_requests - - Delete EnrollmentRequest resources. - - :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_requests_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '503': "Status", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_enrollment_requests_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/enrollmentrequests', - 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_config( self, diff --git a/flightctl/api/event_api.py b/flightctl/api/event_api.py index 3a599c0..f78b481 100644 --- a/flightctl/api/event_api.py +++ b/flightctl/api/event_api.py @@ -17,7 +17,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictInt, StrictStr +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional from typing_extensions import Annotated from flightctl.models.event_list import EventList @@ -44,6 +44,7 @@ def __init__(self, api_client=None) -> None: def list_events( self, field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + order: Annotated[Optional[StrictStr], Field(description="Sort order for the results by timestamp. Defaults to 'desc' (newest first).")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of events to return in the response.")] = None, 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, _request_timeout: Union[ @@ -65,6 +66,8 @@ def list_events( :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 order: Sort order for the results by timestamp. Defaults to 'desc' (newest first). + :type order: str :param limit: The maximum number of events to return in the response. :type limit: int :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. @@ -93,6 +96,7 @@ def list_events( _param = self._list_events_serialize( field_selector=field_selector, + order=order, limit=limit, var_continue=var_continue, _request_auth=_request_auth, @@ -123,6 +127,7 @@ def list_events( def list_events_with_http_info( self, field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + order: Annotated[Optional[StrictStr], Field(description="Sort order for the results by timestamp. Defaults to 'desc' (newest first).")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of events to return in the response.")] = None, 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, _request_timeout: Union[ @@ -144,6 +149,8 @@ def list_events_with_http_info( :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 order: Sort order for the results by timestamp. Defaults to 'desc' (newest first). + :type order: str :param limit: The maximum number of events to return in the response. :type limit: int :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. @@ -172,6 +179,7 @@ def list_events_with_http_info( _param = self._list_events_serialize( field_selector=field_selector, + order=order, limit=limit, var_continue=var_continue, _request_auth=_request_auth, @@ -202,6 +210,7 @@ def list_events_with_http_info( def list_events_without_preload_content( self, field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + order: Annotated[Optional[StrictStr], Field(description="Sort order for the results by timestamp. Defaults to 'desc' (newest first).")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of events to return in the response.")] = None, 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, _request_timeout: Union[ @@ -223,6 +232,8 @@ def list_events_without_preload_content( :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 order: Sort order for the results by timestamp. Defaults to 'desc' (newest first). + :type order: str :param limit: The maximum number of events to return in the response. :type limit: int :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. @@ -251,6 +262,7 @@ def list_events_without_preload_content( _param = self._list_events_serialize( field_selector=field_selector, + order=order, limit=limit, var_continue=var_continue, _request_auth=_request_auth, @@ -276,6 +288,7 @@ def list_events_without_preload_content( def _list_events_serialize( self, field_selector, + order, limit, var_continue, _request_auth, @@ -304,6 +317,10 @@ def _list_events_serialize( _query_params.append(('fieldSelector', field_selector)) + if order is not None: + + _query_params.append(('order', order)) + if limit is not None: _query_params.append(('limit', limit)) diff --git a/flightctl/api/fleet_api.py b/flightctl/api/fleet_api.py index 2653432..d13a1a6 100644 --- a/flightctl/api/fleet_api.py +++ b/flightctl/api/fleet_api.py @@ -605,260 +605,6 @@ def _delete_fleet_serialize( - @validate_call - def delete_fleets( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Status: - """delete_fleets - - Delete Fleet resources. - - :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_fleets_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_fleets_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Status]: - """delete_fleets - - Delete Fleet resources. - - :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_fleets_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_fleets_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_fleets - - Delete Fleet resources. - - :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_fleets_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '503': "Status", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_fleets_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/fleets', - 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_template_version( self, @@ -1146,275 +892,6 @@ def _delete_template_version_serialize( - @validate_call - def delete_template_versions( - self, - fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], - _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_template_versions - - delete a collection of template versions - - :param fleet: The owner of the template versions. (required) - :type fleet: 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_template_versions_serialize( - fleet=fleet, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_template_versions_with_http_info( - self, - fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], - _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_template_versions - - delete a collection of template versions - - :param fleet: The owner of the template versions. (required) - :type fleet: 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_template_versions_serialize( - fleet=fleet, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_template_versions_without_preload_content( - self, - fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], - _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_template_versions - - delete a collection of template versions - - :param fleet: The owner of the template versions. (required) - :type fleet: 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_template_versions_serialize( - fleet=fleet, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '503': "Status", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_template_versions_serialize( - self, - fleet, - _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 fleet is not None: - _path_params['fleet'] = fleet - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/fleets/{fleet}/templateversions', - 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_fleet( self, diff --git a/flightctl/api/repository_api.py b/flightctl/api/repository_api.py index cc86a2a..da55eda 100644 --- a/flightctl/api/repository_api.py +++ b/flightctl/api/repository_api.py @@ -331,260 +331,6 @@ def _create_repository_serialize( - @validate_call - def delete_repositories( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Status: - """delete_repositories - - Delete Repository resources. - - :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_repositories_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_repositories_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Status]: - """delete_repositories - - Delete Repository resources. - - :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_repositories_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_repositories_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_repositories - - Delete Repository resources. - - :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_repositories_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '503': "Status", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_repositories_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/repositories', - 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_repository( self, diff --git a/flightctl/api/resourcesync_api.py b/flightctl/api/resourcesync_api.py index 4a0df4b..cb69404 100644 --- a/flightctl/api/resourcesync_api.py +++ b/flightctl/api/resourcesync_api.py @@ -603,260 +603,6 @@ def _delete_resource_sync_serialize( - @validate_call - def delete_resource_syncs( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Status: - """delete_resource_syncs - - Delete ResourceSync resources. - - :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_resource_syncs_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_resource_syncs_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Status]: - """delete_resource_syncs - - Delete ResourceSync resources. - - :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_resource_syncs_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '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_resource_syncs_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """delete_resource_syncs - - Delete ResourceSync resources. - - :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_resource_syncs_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Status", - '401': "Status", - '403': "Status", - '503': "Status", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_resource_syncs_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/api/v1/resourcesyncs', - 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_resource_sync( self, diff --git a/flightctl/models/__init__.py b/flightctl/models/__init__.py index cfe3e78..0db33c3 100644 --- a/flightctl/models/__init__.py +++ b/flightctl/models/__init__.py @@ -21,6 +21,9 @@ from flightctl.models.application_env_vars import ApplicationEnvVars from flightctl.models.application_provider_spec import ApplicationProviderSpec from flightctl.models.application_status_type import ApplicationStatusType +from flightctl.models.application_volume import ApplicationVolume +from flightctl.models.application_volume_provider_spec import ApplicationVolumeProviderSpec +from flightctl.models.application_volume_status import ApplicationVolumeStatus from flightctl.models.applications_summary_status_type import ApplicationsSummaryStatusType from flightctl.models.auth_config import AuthConfig from flightctl.models.batch import Batch @@ -101,6 +104,9 @@ from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef from flightctl.models.http_repo_spec import HttpRepoSpec from flightctl.models.image_application_provider_spec import ImageApplicationProviderSpec +from flightctl.models.image_pull_policy import ImagePullPolicy +from flightctl.models.image_volume_provider_spec import ImageVolumeProviderSpec +from flightctl.models.image_volume_source import ImageVolumeSource from flightctl.models.inline_application_provider_spec import InlineApplicationProviderSpec from flightctl.models.inline_config_provider_spec import InlineConfigProviderSpec from flightctl.models.kubernetes_secret_provider_spec import KubernetesSecretProviderSpec diff --git a/flightctl/models/application_provider_spec.py b/flightctl/models/application_provider_spec.py index e075844..35a85d8 100644 --- a/flightctl/models/application_provider_spec.py +++ b/flightctl/models/application_provider_spec.py @@ -22,6 +22,7 @@ from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.app_type import AppType from flightctl.models.application_content import ApplicationContent +from flightctl.models.application_volume import ApplicationVolume from typing import Optional, Set from typing_extensions import Self @@ -32,9 +33,10 @@ class ApplicationProviderSpec(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") name: Optional[StrictStr] = Field(default=None, description="The application name must be 1–253 characters long, start with a letter or number, and contain no whitespace.") app_type: Optional[AppType] = Field(default=None, alias="appType") + volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") image: StrictStr = Field(description="Reference to the container image for the application package.") inline: List[ApplicationContent] = Field(description="A list of application content.") - __properties: ClassVar[List[str]] = ["envVars", "name", "appType", "image", "inline"] + __properties: ClassVar[List[str]] = ["envVars", "name", "appType", "volumes", "image", "inline"] model_config = ConfigDict( populate_by_name=True, @@ -75,6 +77,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 volumes (list) + _items = [] + if self.volumes: + for _item_volumes in self.volumes: + 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 inline (list) _items = [] if self.inline: @@ -97,6 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "envVars": obj.get("envVars"), "name": obj.get("name"), "appType": obj.get("appType"), + "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, "image": obj.get("image"), "inline": [ApplicationContent.from_dict(_item) for _item in obj["inline"]] if obj.get("inline") is not None else None }) diff --git a/flightctl/models/application_volume.py b/flightctl/models/application_volume.py new file mode 100644 index 0000000..3d23dc3 --- /dev/null +++ b/flightctl/models/application_volume.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: 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, StrictStr +from typing import Any, ClassVar, Dict, List +from flightctl.models.image_volume_source import ImageVolumeSource +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationVolume(BaseModel): + """ + ApplicationVolume + """ # noqa: E501 + name: StrictStr = Field(description="Unique name of the volume used within the application.") + image: ImageVolumeSource + __properties: ClassVar[List[str]] = ["name", "image"] + + 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 ApplicationVolume from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of image + if self.image: + _dict['image'] = self.image.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationVolume from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "image": ImageVolumeSource.from_dict(obj["image"]) if obj.get("image") is not None else None + }) + return _obj + + diff --git a/flightctl/models/application_volume_provider_spec.py b/flightctl/models/application_volume_provider_spec.py new file mode 100644 index 0000000..e1c8f2d --- /dev/null +++ b/flightctl/models/application_volume_provider_spec.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: 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.models.application_volume import ApplicationVolume +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationVolumeProviderSpec(BaseModel): + """ + ApplicationVolumeProviderSpec + """ # noqa: E501 + volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") + __properties: ClassVar[List[str]] = ["volumes"] + + 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 ApplicationVolumeProviderSpec 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 volumes (list) + _items = [] + if self.volumes: + for _item_volumes in self.volumes: + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicationVolumeProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None + }) + return _obj + + diff --git a/flightctl/models/application_volume_status.py b/flightctl/models/application_volume_status.py new file mode 100644 index 0000000..e1d4474 --- /dev/null +++ b/flightctl/models/application_volume_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: 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, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class ApplicationVolumeStatus(BaseModel): + """ + Status of a volume used by an application. + """ # noqa: E501 + name: StrictStr = Field(description="Name of the volume.") + reference: StrictStr = Field(description="Reference to the deployed OCI-compliant image or artifact backing the volume.") + __properties: ClassVar[List[str]] = ["name", "reference"] + + 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 ApplicationVolumeStatus 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 ApplicationVolumeStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "reference": obj.get("reference") + }) + return _obj + + diff --git a/flightctl/models/device_application_status.py b/flightctl/models/device_application_status.py index be66641..71ef477 100644 --- a/flightctl/models/device_application_status.py +++ b/flightctl/models/device_application_status.py @@ -19,8 +19,9 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.application_status_type import ApplicationStatusType +from flightctl.models.application_volume_status import ApplicationVolumeStatus from typing import Optional, Set from typing_extensions import Self @@ -32,7 +33,8 @@ class DeviceApplicationStatus(BaseModel): ready: StrictStr = Field(description="The number of containers which are ready in the application.") restarts: StrictInt = Field(description="Number of restarts observed for the application.") status: ApplicationStatusType - __properties: ClassVar[List[str]] = ["name", "ready", "restarts", "status"] + volumes: Optional[List[ApplicationVolumeStatus]] = Field(default=None, description="Status of volumes used by this application.") + __properties: ClassVar[List[str]] = ["name", "ready", "restarts", "status", "volumes"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,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 volumes (list) + _items = [] + if self.volumes: + for _item_volumes in self.volumes: + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items return _dict @classmethod @@ -88,7 +97,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "ready": obj.get("ready"), "restarts": obj.get("restarts"), - "status": obj.get("status") + "status": obj.get("status"), + "volumes": [ApplicationVolumeStatus.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None }) return _obj diff --git a/flightctl/models/event.py b/flightctl/models/event.py index 21c3c64..c0dfb03 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']): - raise ValueError("must be one of enum values ('ResourceCreated', 'ResourceCreationFailed', 'ResourceUpdated', 'ResourceUpdateFailed', 'ResourceDeleted', 'ResourceDeletionFailed')") + 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', 'DeviceConnected', 'DeviceContentUpToDate', 'DeviceContentOutOfDate', 'DeviceContentUpdating']): + 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', 'DeviceConnected', 'DeviceContentUpToDate', 'DeviceContentOutOfDate', 'DeviceContentUpdating')") return value @field_validator('type') diff --git a/flightctl/models/image_application_provider_spec.py b/flightctl/models/image_application_provider_spec.py index f011064..9c94281 100644 --- a/flightctl/models/image_application_provider_spec.py +++ b/flightctl/models/image_application_provider_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.application_volume import ApplicationVolume from typing import Optional, Set from typing_extensions import Self @@ -27,8 +28,9 @@ class ImageApplicationProviderSpec(BaseModel): """ ImageApplicationProviderSpec """ # noqa: E501 + volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") image: StrictStr = Field(description="Reference to the container image for the application package.") - __properties: ClassVar[List[str]] = ["image"] + __properties: ClassVar[List[str]] = ["volumes", "image"] model_config = ConfigDict( populate_by_name=True, @@ -69,6 +71,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 volumes (list) + _items = [] + if self.volumes: + for _item_volumes in self.volumes: + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items return _dict @classmethod @@ -81,6 +90,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, "image": obj.get("image") }) return _obj diff --git a/flightctl/models/image_pull_policy.py b/flightctl/models/image_pull_policy.py new file mode 100644 index 0000000..19c1de9 --- /dev/null +++ b/flightctl/models/image_pull_policy.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: 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 ImagePullPolicy(str, Enum): + """ + 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. + """ + + """ + allowed enum values + """ + ALWAYS = 'Always' + IFNOTPRESENT = 'IfNotPresent' + NEVER = 'Never' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ImagePullPolicy from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/image_volume_provider_spec.py b/flightctl/models/image_volume_provider_spec.py new file mode 100644 index 0000000..0234de0 --- /dev/null +++ b/flightctl/models/image_volume_provider_spec.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: 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 +from typing import Any, ClassVar, Dict, List +from flightctl.models.image_volume_source import ImageVolumeSource +from typing import Optional, Set +from typing_extensions import Self + +class ImageVolumeProviderSpec(BaseModel): + """ + ImageVolumeProviderSpec + """ # noqa: E501 + image: ImageVolumeSource + __properties: ClassVar[List[str]] = ["image"] + + 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 ImageVolumeProviderSpec from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of image + if self.image: + _dict['image'] = self.image.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImageVolumeProviderSpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "image": ImageVolumeSource.from_dict(obj["image"]) if obj.get("image") is not None else None + }) + return _obj + + diff --git a/flightctl/models/image_volume_source.py b/flightctl/models/image_volume_source.py new file mode 100644 index 0000000..466e9b1 --- /dev/null +++ b/flightctl/models/image_volume_source.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: 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from flightctl.models.image_pull_policy import ImagePullPolicy +from typing import Optional, Set +from typing_extensions import Self + +class ImageVolumeSource(BaseModel): + """ + Describes the source of an OCI-compliant image or artifact. + """ # noqa: E501 + reference: StrictStr = Field(description="Reference to an OCI-compliant image or artifact in a registry. This may be a container image or another type of OCI artifact, as long as it conforms to the OCI image specification.") + __properties: ClassVar[List[str]] = ["reference", "pullPolicy"] + + 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 ImageVolumeSource 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 ImageVolumeSource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "reference": obj.get("reference"), + }) + return _obj + + diff --git a/flightctl/models/inline_application_provider_spec.py b/flightctl/models/inline_application_provider_spec.py index eb513d2..c4209d4 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.application_volume import ApplicationVolume from typing import Optional, Set from typing_extensions import Self @@ -28,8 +29,9 @@ class InlineApplicationProviderSpec(BaseModel): """ InlineApplicationProviderSpec """ # noqa: E501 + volumes: Optional[List[ApplicationVolume]] = Field(default=None, description="List of application volumes.") inline: List[ApplicationContent] = Field(description="A list of application content.") - __properties: ClassVar[List[str]] = ["inline"] + __properties: ClassVar[List[str]] = ["volumes", "inline"] model_config = ConfigDict( populate_by_name=True, @@ -70,6 +72,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 volumes (list) + _items = [] + if self.volumes: + for _item_volumes in self.volumes: + 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 inline (list) _items = [] if self.inline: @@ -89,6 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "volumes": [ApplicationVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") 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/openapitools.json b/openapitools.json index f8d07ce..973a005 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.10.0" + "version": "7.11.0" } } diff --git a/test/test_application_volume.py b/test/test_application_volume.py new file mode 100644 index 0000000..3a30075 --- /dev/null +++ b/test/test_application_volume.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: 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.models.application_volume import ApplicationVolume + +class TestApplicationVolume(unittest.TestCase): + """ApplicationVolume unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationVolume: + """Test ApplicationVolume + 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 `ApplicationVolume` + """ + model = ApplicationVolume() + if include_optional: + return ApplicationVolume( + name = '', + image = flightctl.models.image_volume_source.ImageVolumeSource( + reference = '', + pull_policy = 'IfNotPresent', ) + ) + else: + return ApplicationVolume( + name = '', + image = flightctl.models.image_volume_source.ImageVolumeSource( + reference = '', + pull_policy = 'IfNotPresent', ), + ) + """ + + def testApplicationVolume(self): + """Test ApplicationVolume""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_volume_provider_spec.py b/test/test_application_volume_provider_spec.py new file mode 100644 index 0000000..1a18fbc --- /dev/null +++ b/test/test_application_volume_provider_spec.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: 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.models.application_volume_provider_spec import ApplicationVolumeProviderSpec + +class TestApplicationVolumeProviderSpec(unittest.TestCase): + """ApplicationVolumeProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationVolumeProviderSpec: + """Test ApplicationVolumeProviderSpec + 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 `ApplicationVolumeProviderSpec` + """ + model = ApplicationVolumeProviderSpec() + if include_optional: + return ApplicationVolumeProviderSpec( + volumes = [ + null + ] + ) + else: + return ApplicationVolumeProviderSpec( + ) + """ + + def testApplicationVolumeProviderSpec(self): + """Test ApplicationVolumeProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_application_volume_status.py b/test/test_application_volume_status.py new file mode 100644 index 0000000..cfecb3c --- /dev/null +++ b/test/test_application_volume_status.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: 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.models.application_volume_status import ApplicationVolumeStatus + +class TestApplicationVolumeStatus(unittest.TestCase): + """ApplicationVolumeStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ApplicationVolumeStatus: + """Test ApplicationVolumeStatus + 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 `ApplicationVolumeStatus` + """ + model = ApplicationVolumeStatus() + if include_optional: + return ApplicationVolumeStatus( + name = '', + reference = '' + ) + else: + return ApplicationVolumeStatus( + name = '', + reference = '', + ) + """ + + def testApplicationVolumeStatus(self): + """Test ApplicationVolumeStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_pull_policy.py b/test/test_image_pull_policy.py new file mode 100644 index 0000000..2b29504 --- /dev/null +++ b/test/test_image_pull_policy.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://flightctl.io) is a service for declarative management of fleets of edge devices and their workloads. + + The version of the OpenAPI document: 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.models.image_pull_policy import ImagePullPolicy + +class TestImagePullPolicy(unittest.TestCase): + """ImagePullPolicy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testImagePullPolicy(self): + """Test ImagePullPolicy""" + # inst = ImagePullPolicy() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_volume_provider_spec.py b/test/test_image_volume_provider_spec.py new file mode 100644 index 0000000..4dc5fba --- /dev/null +++ b/test/test_image_volume_provider_spec.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: 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.models.image_volume_provider_spec import ImageVolumeProviderSpec + +class TestImageVolumeProviderSpec(unittest.TestCase): + """ImageVolumeProviderSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageVolumeProviderSpec: + """Test ImageVolumeProviderSpec + 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 `ImageVolumeProviderSpec` + """ + model = ImageVolumeProviderSpec() + if include_optional: + return ImageVolumeProviderSpec( + image = flightctl.models.image_volume_source.ImageVolumeSource( + reference = '', + pull_policy = 'IfNotPresent', ) + ) + else: + return ImageVolumeProviderSpec( + image = flightctl.models.image_volume_source.ImageVolumeSource( + reference = '', + pull_policy = 'IfNotPresent', ), + ) + """ + + def testImageVolumeProviderSpec(self): + """Test ImageVolumeProviderSpec""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_image_volume_source.py b/test/test_image_volume_source.py new file mode 100644 index 0000000..79d28e9 --- /dev/null +++ b/test/test_image_volume_source.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: 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.models.image_volume_source import ImageVolumeSource + +class TestImageVolumeSource(unittest.TestCase): + """ImageVolumeSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImageVolumeSource: + """Test ImageVolumeSource + 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 `ImageVolumeSource` + """ + model = ImageVolumeSource() + if include_optional: + return ImageVolumeSource( + reference = '', + pull_policy = 'IfNotPresent' + ) + else: + return ImageVolumeSource( + reference = '', + ) + """ + + def testImageVolumeSource(self): + """Test ImageVolumeSource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()