diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 90f6d98..36d7adb 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -8,6 +8,7 @@ docs/ApplicationSpec.md docs/ApplicationStatusType.md docs/ApplicationsSummaryStatusType.md docs/AuthConfig.md +docs/AuthenticationApi.md docs/Batch.md docs/BatchLimit.md docs/BatchSequence.md @@ -22,21 +23,23 @@ docs/ConditionStatus.md docs/ConditionType.md docs/ConfigProviderSpec.md docs/CustomResourceMonitorSpec.md -docs/DefaultApi.md docs/Device.md docs/DeviceApi.md docs/DeviceApplicationStatus.md docs/DeviceApplicationsSummaryStatus.md docs/DeviceConfigStatus.md docs/DeviceConsole.md -docs/DeviceHooksSpec.md +docs/DeviceDecommission.md +docs/DeviceDecommissionTargetType.md docs/DeviceIntegrityStatus.md docs/DeviceIntegrityStatusSummary.md docs/DeviceIntegrityStatusSummaryType.md +docs/DeviceLifecycleHookType.md +docs/DeviceLifecycleStatus.md +docs/DeviceLifecycleStatusType.md docs/DeviceList.md docs/DeviceOSSpec.md docs/DeviceOSStatus.md -docs/DeviceRebootHookSpec.md docs/DeviceResourceStatus.md docs/DeviceResourceStatusType.md docs/DeviceSpec.md @@ -45,7 +48,7 @@ docs/DeviceStatus.md docs/DeviceSummaryStatus.md docs/DeviceSummaryStatusType.md docs/DeviceSystemInfo.md -docs/DeviceUpdateHookSpec.md +docs/DeviceUpdatePolicySpec.md docs/DeviceUpdatedStatus.md docs/DeviceUpdatedStatusType.md docs/DevicesSummary.md @@ -60,7 +63,6 @@ docs/EnrollmentRequestStatus.md docs/EnrollmentService.md docs/EnrollmentServiceAuth.md docs/EnrollmentServiceService.md -docs/EnrollmentconfigApi.md docs/EnrollmentrequestApi.md docs/Error.md docs/FileOperation.md @@ -76,13 +78,9 @@ docs/GenericRepoSpec.md docs/GitConfigProviderSpec.md docs/GitConfigProviderSpecGitRef.md docs/HookAction.md -docs/HookActionExecutable.md -docs/HookActionExecutableSpec.md -docs/HookActionOneOf.md -docs/HookActionOneOf1.md -docs/HookActionSpec.md -docs/HookActionSystemdSpec.md -docs/HookActionSystemdUnit.md +docs/HookActionRun.md +docs/HookCondition.md +docs/HookConditionPathOp.md docs/HttpConfig.md docs/HttpConfigProviderSpec.md docs/HttpConfigProviderSpecHttpRef.md @@ -117,7 +115,6 @@ docs/ResourceSyncStatus.md docs/ResourcesyncApi.md docs/RolloutDeviceSelection.md docs/RolloutPolicy.md -docs/SortOrder.md docs/SshConfig.md docs/SshRepoSpec.md docs/Status.md @@ -125,18 +122,16 @@ docs/TemplateVersion.md docs/TemplateVersionList.md docs/TemplateVersionSpec.md docs/TemplateVersionStatus.md -docs/TemplateversionApi.md +docs/UpdateSchedule.md flightctl/__init__.py flightctl/api/__init__.py +flightctl/api/authentication_api.py flightctl/api/certificatesigningrequest_api.py -flightctl/api/default_api.py flightctl/api/device_api.py -flightctl/api/enrollmentconfig_api.py flightctl/api/enrollmentrequest_api.py flightctl/api/fleet_api.py flightctl/api/repository_api.py flightctl/api/resourcesync_api.py -flightctl/api/templateversion_api.py flightctl/api_client.py flightctl/api_response.py flightctl/configuration.py @@ -165,14 +160,17 @@ flightctl/models/device_application_status.py flightctl/models/device_applications_summary_status.py flightctl/models/device_config_status.py flightctl/models/device_console.py -flightctl/models/device_hooks_spec.py +flightctl/models/device_decommission.py +flightctl/models/device_decommission_target_type.py flightctl/models/device_integrity_status.py flightctl/models/device_integrity_status_summary.py flightctl/models/device_integrity_status_summary_type.py +flightctl/models/device_lifecycle_hook_type.py +flightctl/models/device_lifecycle_status.py +flightctl/models/device_lifecycle_status_type.py flightctl/models/device_list.py flightctl/models/device_os_spec.py flightctl/models/device_os_status.py -flightctl/models/device_reboot_hook_spec.py flightctl/models/device_resource_status.py flightctl/models/device_resource_status_type.py flightctl/models/device_spec.py @@ -181,7 +179,7 @@ flightctl/models/device_status.py flightctl/models/device_summary_status.py flightctl/models/device_summary_status_type.py flightctl/models/device_system_info.py -flightctl/models/device_update_hook_spec.py +flightctl/models/device_update_policy_spec.py flightctl/models/device_updated_status.py flightctl/models/device_updated_status_type.py flightctl/models/devices_summary.py @@ -209,13 +207,9 @@ flightctl/models/generic_repo_spec.py flightctl/models/git_config_provider_spec.py flightctl/models/git_config_provider_spec_git_ref.py flightctl/models/hook_action.py -flightctl/models/hook_action_executable.py -flightctl/models/hook_action_executable_spec.py -flightctl/models/hook_action_one_of.py -flightctl/models/hook_action_one_of1.py -flightctl/models/hook_action_spec.py -flightctl/models/hook_action_systemd_spec.py -flightctl/models/hook_action_systemd_unit.py +flightctl/models/hook_action_run.py +flightctl/models/hook_condition.py +flightctl/models/hook_condition_path_op.py flightctl/models/http_config.py flightctl/models/http_config_provider_spec.py flightctl/models/http_config_provider_spec_http_ref.py @@ -248,7 +242,6 @@ flightctl/models/resource_sync_spec.py flightctl/models/resource_sync_status.py flightctl/models/rollout_device_selection.py flightctl/models/rollout_policy.py -flightctl/models/sort_order.py flightctl/models/ssh_config.py flightctl/models/ssh_repo_spec.py flightctl/models/status.py @@ -256,6 +249,7 @@ flightctl/models/template_version.py flightctl/models/template_version_list.py flightctl/models/template_version_spec.py flightctl/models/template_version_status.py +flightctl/models/update_schedule.py flightctl/py.typed flightctl/rest.py git_push.sh @@ -265,127 +259,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_application_env_vars.py -test/test_application_spec.py -test/test_application_status_type.py -test/test_applications_summary_status_type.py -test/test_auth_config.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_custom_resource_monitor_spec.py -test/test_default_api.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_hooks_spec.py -test/test_device_integrity_status.py -test/test_device_integrity_status_summary.py -test/test_device_integrity_status_summary_type.py -test/test_device_list.py -test/test_device_os_spec.py -test/test_device_os_status.py -test/test_device_reboot_hook_spec.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_hook_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_allowance.py -test/test_enrollment_config.py -test/test_enrollment_request.py -test/test_enrollment_request_approval.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_enrollmentconfig_api.py -test/test_enrollmentrequest_api.py -test/test_error.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_executable.py -test/test_hook_action_executable_spec.py -test/test_hook_action_one_of.py -test/test_hook_action_one_of1.py -test/test_hook_action_spec.py -test/test_hook_action_systemd_spec.py -test/test_hook_action_systemd_unit.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.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_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_patch_request_inner.py -test/test_rendered_application_spec.py -test/test_rendered_device_spec.py -test/test_rendered_device_spec_systemd.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_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_resourcesync_api.py -test/test_rollout_device_selection.py -test/test_rollout_policy.py -test/test_sort_order.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_templateversion_api.py tox.ini diff --git a/README.md b/README.md index c2c0937..a497c1f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ # flightctl -No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +[Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. + This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: undefined +- API version: v1alpha1 - Package version: 1.0.0 - Generator version: 7.10.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen +For more information, please visit [https://flightctl.io](https://flightctl.io) ## Requirements. @@ -66,15 +68,14 @@ configuration = flightctl.Configuration( # 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) - certificate_signing_request = flightctl.CertificateSigningRequest() # CertificateSigningRequest | + api_instance = flightctl.AuthenticationApi(api_client) try: - api_response = api_instance.create_certificate_signing_request(certificate_signing_request) - print("The response of CertificatesigningrequestApi->create_certificate_signing_request:\n") + api_response = api_instance.auth_config() + print("The response of AuthenticationApi->auth_config:\n") pprint(api_response) except ApiException as e: - print("Exception when calling CertificatesigningrequestApi->create_certificate_signing_request: %s\n" % e) + print("Exception when calling AuthenticationApi->auth_config: %s\n" % e) ``` @@ -84,18 +85,19 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AuthenticationApi* | [**auth_config**](docs/AuthenticationApi.md#auth_config) | **GET** /api/v1/auth/config | +*AuthenticationApi* | [**auth_validate**](docs/AuthenticationApi.md#auth_validate) | **GET** /api/v1/auth/validate | +*CertificatesigningrequestApi* | [**approve_certificate_signing_request**](docs/CertificatesigningrequestApi.md#approve_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests/{name}/approval | *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* | [**deny_certificate_signing_request**](docs/CertificatesigningrequestApi.md#deny_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name}/approval | *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} | *CertificatesigningrequestApi* | [**read_certificate_signing_request**](docs/CertificatesigningrequestApi.md#read_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | *CertificatesigningrequestApi* | [**replace_certificate_signing_request**](docs/CertificatesigningrequestApi.md#replace_certificate_signing_request) | **PUT** /api/v1/certificatesigningrequests/{name} | -*DefaultApi* | [**approve_certificate_signing_request**](docs/DefaultApi.md#approve_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests/{name}/approval | -*DefaultApi* | [**auth_config**](docs/DefaultApi.md#auth_config) | **GET** /api/v1/auth/config | -*DefaultApi* | [**auth_validate**](docs/DefaultApi.md#auth_validate) | **GET** /api/v1/auth/validate | -*DefaultApi* | [**deny_certificate_signing_request**](docs/DefaultApi.md#deny_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name}/approval | *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_rendered_device_spec**](docs/DeviceApi.md#get_rendered_device_spec) | **GET** /api/v1/devices/{name}/rendered | @@ -106,11 +108,11 @@ Class | Method | HTTP request | Description *DeviceApi* | [**replace_device**](docs/DeviceApi.md#replace_device) | **PUT** /api/v1/devices/{name} | *DeviceApi* | [**replace_device_status**](docs/DeviceApi.md#replace_device_status) | **PUT** /api/v1/devices/{name}/status | *DeviceApi* | [**request_console**](docs/DeviceApi.md#request_console) | **GET** /api/v1/devices/{name}/console | -*EnrollmentconfigApi* | [**enrollment_config**](docs/EnrollmentconfigApi.md#enrollment_config) | **GET** /api/v1/enrollmentconfig/{name} | *EnrollmentrequestApi* | [**approve_enrollment_request**](docs/EnrollmentrequestApi.md#approve_enrollment_request) | **POST** /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* | [**enrollment_config**](docs/EnrollmentrequestApi.md#enrollment_config) | **GET** /api/v1/enrollmentconfig/{name} | *EnrollmentrequestApi* | [**list_enrollment_requests**](docs/EnrollmentrequestApi.md#list_enrollment_requests) | **GET** /api/v1/enrollmentrequests | *EnrollmentrequestApi* | [**read_enrollment_request**](docs/EnrollmentrequestApi.md#read_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | *EnrollmentrequestApi* | [**read_enrollment_request_status**](docs/EnrollmentrequestApi.md#read_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | @@ -119,10 +121,14 @@ Class | Method | HTTP request | Description *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* | [**list_fleets**](docs/FleetApi.md#list_fleets) | **GET** /api/v1/fleets | +*FleetApi* | [**list_template_versions**](docs/FleetApi.md#list_template_versions) | **GET** /api/v1/fleets/{fleet}/templateversions | *FleetApi* | [**patch_fleet**](docs/FleetApi.md#patch_fleet) | **PATCH** /api/v1/fleets/{name} | *FleetApi* | [**read_fleet**](docs/FleetApi.md#read_fleet) | **GET** /api/v1/fleets/{name} | *FleetApi* | [**read_fleet_status**](docs/FleetApi.md#read_fleet_status) | **GET** /api/v1/fleets/{name}/status | +*FleetApi* | [**read_template_version**](docs/FleetApi.md#read_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | *FleetApi* | [**replace_fleet**](docs/FleetApi.md#replace_fleet) | **PUT** /api/v1/fleets/{name} | *FleetApi* | [**replace_fleet_status**](docs/FleetApi.md#replace_fleet_status) | **PUT** /api/v1/fleets/{name}/status | *RepositoryApi* | [**create_repository**](docs/RepositoryApi.md#create_repository) | **POST** /api/v1/repositories | @@ -139,10 +145,6 @@ Class | Method | HTTP request | Description *ResourcesyncApi* | [**patch_resource_sync**](docs/ResourcesyncApi.md#patch_resource_sync) | **PATCH** /api/v1/resourcesyncs/{name} | *ResourcesyncApi* | [**read_resource_sync**](docs/ResourcesyncApi.md#read_resource_sync) | **GET** /api/v1/resourcesyncs/{name} | *ResourcesyncApi* | [**replace_resource_sync**](docs/ResourcesyncApi.md#replace_resource_sync) | **PUT** /api/v1/resourcesyncs/{name} | -*TemplateversionApi* | [**delete_template_version**](docs/TemplateversionApi.md#delete_template_version) | **DELETE** /api/v1/fleets/{fleet}/templateversions/{name} | -*TemplateversionApi* | [**delete_template_versions**](docs/TemplateversionApi.md#delete_template_versions) | **DELETE** /api/v1/fleets/{fleet}/templateversions | -*TemplateversionApi* | [**list_template_versions**](docs/TemplateversionApi.md#list_template_versions) | **GET** /api/v1/fleets/{fleet}/templateversions | -*TemplateversionApi* | [**read_template_version**](docs/TemplateversionApi.md#read_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | ## Documentation For Models @@ -170,14 +172,17 @@ Class | Method | HTTP request | Description - [DeviceApplicationsSummaryStatus](docs/DeviceApplicationsSummaryStatus.md) - [DeviceConfigStatus](docs/DeviceConfigStatus.md) - [DeviceConsole](docs/DeviceConsole.md) - - [DeviceHooksSpec](docs/DeviceHooksSpec.md) + - [DeviceDecommission](docs/DeviceDecommission.md) + - [DeviceDecommissionTargetType](docs/DeviceDecommissionTargetType.md) - [DeviceIntegrityStatus](docs/DeviceIntegrityStatus.md) - [DeviceIntegrityStatusSummary](docs/DeviceIntegrityStatusSummary.md) - [DeviceIntegrityStatusSummaryType](docs/DeviceIntegrityStatusSummaryType.md) + - [DeviceLifecycleHookType](docs/DeviceLifecycleHookType.md) + - [DeviceLifecycleStatus](docs/DeviceLifecycleStatus.md) + - [DeviceLifecycleStatusType](docs/DeviceLifecycleStatusType.md) - [DeviceList](docs/DeviceList.md) - [DeviceOSSpec](docs/DeviceOSSpec.md) - [DeviceOSStatus](docs/DeviceOSStatus.md) - - [DeviceRebootHookSpec](docs/DeviceRebootHookSpec.md) - [DeviceResourceStatus](docs/DeviceResourceStatus.md) - [DeviceResourceStatusType](docs/DeviceResourceStatusType.md) - [DeviceSpec](docs/DeviceSpec.md) @@ -186,7 +191,7 @@ Class | Method | HTTP request | Description - [DeviceSummaryStatus](docs/DeviceSummaryStatus.md) - [DeviceSummaryStatusType](docs/DeviceSummaryStatusType.md) - [DeviceSystemInfo](docs/DeviceSystemInfo.md) - - [DeviceUpdateHookSpec](docs/DeviceUpdateHookSpec.md) + - [DeviceUpdatePolicySpec](docs/DeviceUpdatePolicySpec.md) - [DeviceUpdatedStatus](docs/DeviceUpdatedStatus.md) - [DeviceUpdatedStatusType](docs/DeviceUpdatedStatusType.md) - [DevicesSummary](docs/DevicesSummary.md) @@ -214,13 +219,9 @@ Class | Method | HTTP request | Description - [GitConfigProviderSpec](docs/GitConfigProviderSpec.md) - [GitConfigProviderSpecGitRef](docs/GitConfigProviderSpecGitRef.md) - [HookAction](docs/HookAction.md) - - [HookActionExecutable](docs/HookActionExecutable.md) - - [HookActionExecutableSpec](docs/HookActionExecutableSpec.md) - - [HookActionOneOf](docs/HookActionOneOf.md) - - [HookActionOneOf1](docs/HookActionOneOf1.md) - - [HookActionSpec](docs/HookActionSpec.md) - - [HookActionSystemdSpec](docs/HookActionSystemdSpec.md) - - [HookActionSystemdUnit](docs/HookActionSystemdUnit.md) + - [HookActionRun](docs/HookActionRun.md) + - [HookCondition](docs/HookCondition.md) + - [HookConditionPathOp](docs/HookConditionPathOp.md) - [HttpConfig](docs/HttpConfig.md) - [HttpConfigProviderSpec](docs/HttpConfigProviderSpec.md) - [HttpConfigProviderSpecHttpRef](docs/HttpConfigProviderSpecHttpRef.md) @@ -253,7 +254,6 @@ Class | Method | HTTP request | Description - [ResourceSyncStatus](docs/ResourceSyncStatus.md) - [RolloutDeviceSelection](docs/RolloutDeviceSelection.md) - [RolloutPolicy](docs/RolloutPolicy.md) - - [SortOrder](docs/SortOrder.md) - [SshConfig](docs/SshConfig.md) - [SshRepoSpec](docs/SshRepoSpec.md) - [Status](docs/Status.md) @@ -261,6 +261,7 @@ Class | Method | HTTP request | Description - [TemplateVersionList](docs/TemplateVersionList.md) - [TemplateVersionSpec](docs/TemplateVersionSpec.md) - [TemplateVersionStatus](docs/TemplateVersionStatus.md) + - [UpdateSchedule](docs/UpdateSchedule.md) @@ -271,6 +272,6 @@ Endpoints do not require authorization. ## Author - +team@flightctl.io diff --git a/api/v1alpha1/openapi.yml b/api/v1alpha1/openapi.yml index eab6e31..80ed07b 100644 --- a/api/v1alpha1/openapi.yml +++ b/api/v1alpha1/openapi.yml @@ -1,16 +1,39 @@ openapi: 3.0.1 info: - title: Open Device Management API - version: undefined + title: Flight Control API + version: v1alpha1 + description: | + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. + contact: + name: The Flight Control Team + url: https://flightctl.io + email: team@flightctl.io license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html servers: - url: / +tags: + - name: authentication + description: Operations for authentication. + - name: certificatesigningrequest + description: Operations on CertificateSigningRequest resources. + - name: device + description: Operations on Device resources. + - name: enrollmentrequest + description: Operations on EnrollmentRequest resources. + - name: fleet + description: Operations on Fleet resources. + - name: repository + description: Operations on Repository resources. + - name: resourcesync + description: Operations on ResourceSync resources. paths: /api/v1/auth/config: get: - description: Get auth configuration + tags: + - authentication + description: Get authentication configuration. operationId: authConfig responses: "200": @@ -23,11 +46,14 @@ paths: description: Auth not configured /api/v1/auth/validate: get: - description: Validate auth token + tags: + - authentication + description: Validate an authentication token. operationId: authValidate parameters: - - in: header - name: Authentication + - name: Authentication + in: header + description: The authentication token to validate. schema: type: string responses: @@ -47,7 +73,7 @@ paths: get: tags: - resourcesync - description: list resourcesync + description: List ResourceSync resources. operationId: listResourceSync parameters: - name: continue @@ -63,7 +89,7 @@ paths: type: string - name: fieldSelector in: query - description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). For a full list of operators and examples, refer to the documentation. + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). schema: type: string - name: limit @@ -78,21 +104,6 @@ paths: description: The name of the repository to filter results by. schema: type: string - - name: sortBy - in: query - description: Specifies the field to sort by. - required: false - schema: - type: string - example: 'metadata.name' - - name: sortOrder - in: query - description: Specifies the sort order. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - default: 'Asc' - example: 'Asc' responses: "200": description: OK @@ -112,10 +123,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - resourcesync - description: create a resourcesync + description: Create a ResourceSync resource. operationId: createResourceSync requestBody: content: @@ -142,16 +165,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "409": description: StatusConflict content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - resourcesync - description: delete a collection of ResourceSync + description: Delete ResourceSync resources. operationId: deleteResourceSyncs responses: "200": @@ -166,16 +201,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/resourcesyncs/{name}: get: tags: - resourcesync - description: read the specified resourcesync + description: Get a ResourceSync resource. operationId: readResourceSync parameters: - name: name in: path - description: name of the resourcesync + description: The name of the ResourceSync resource to get. required: true schema: type: string @@ -192,21 +239,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - resourcesync - description: replace the specified resourcesync + description: Update a ResourceSync resource. operationId: replaceResourceSync parameters: - name: name in: path - description: name of the resourcesync + description: The name of the ResourceSync resource to update. required: true schema: type: string @@ -241,6 +300,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -253,15 +318,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' patch: tags: - resourcesync - description: Patches the specified resourcesync + description: Patch a ResourceSync resource. operationId: patchResourceSync parameters: - name: name in: path - description: name of the resourcesync + description: The name of the ResourceSync resource to patch. required: true schema: type: string @@ -289,6 +360,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -301,15 +378,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - resourcesync - description: delete a resourcesync + description: Delete a ResourceSync resource. operationId: deleteResourceSync parameters: - name: name in: path - description: name of the resourcesync + description: The name of the ResourceSync resource to delete. required: true schema: type: string @@ -326,17 +409,29 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/repositories: get: tags: - repository - description: list repositories + description: List Repository resources. operationId: listRepositories parameters: - name: continue @@ -352,7 +447,7 @@ paths: type: string - name: fieldSelector in: query - description: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). schema: type: string - name: limit @@ -362,21 +457,6 @@ paths: schema: type: integer format: int32 - - name: sortBy - in: query - description: Specifies the field to sort by. - required: false - schema: - type: string - example: 'metadata.name' - - name: sortOrder - in: query - description: Specifies the sort order. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - default: 'Asc' - example: 'Asc' responses: "200": description: OK @@ -396,10 +476,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - repository - description: create a repository + description: Create a Repository resource. operationId: createRepository requestBody: content: @@ -426,16 +518,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "409": description: StatusConflict content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - repository - description: delete a collection of Repositories + description: Delete Repository resources. operationId: deleteRepositories responses: "200": @@ -450,16 +554,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/repositories/{name}: get: tags: - repository - description: read the specified repository + description: Get a Repository resource. operationId: readRepository parameters: - name: name in: path - description: name of the repository + description: The name of the Repository resource to get. required: true schema: type: string @@ -476,21 +592,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - repository - description: replace the specified repository + description: Update a Repository resource. operationId: replaceRepository parameters: - name: name in: path - description: name of the repository + description: The name of the Repository resource to update. required: true schema: type: string @@ -525,6 +653,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -537,15 +671,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - repository - description: delete a repository + description: Delete a Repository resource. operationId: deleteRepository parameters: - name: name in: path - description: name of the repository + description: The name of the Repository resource to delete. required: true schema: type: string @@ -562,21 +702,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' patch: tags: - repository - description: Patches the specified repository + description: Patch a Repository resource. operationId: patchRepository parameters: - name: name in: path - description: name of the repository + description: The name of the Repository resource to patch. required: true schema: type: string @@ -604,6 +756,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -616,11 +774,17 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/devices: get: tags: - device - description: list Devices + description: List Device resources. operationId: listDevices parameters: - name: continue @@ -636,7 +800,7 @@ paths: type: string - name: fieldSelector in: query - description: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + 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: statusFilter @@ -665,21 +829,6 @@ paths: required: false schema: type: boolean - - name: sortBy - in: query - description: Specifies the field to sort by. - required: false - schema: - type: string - example: 'metadata.name' - - name: sortOrder - in: query - description: Specifies the sort order. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - default: 'Asc' - example: 'Asc' responses: "200": description: OK @@ -705,10 +854,16 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - device - description: create a Device + description: Create a Device resource. operationId: createDevice requestBody: content: @@ -735,16 +890,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "409": description: StatusConflict content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - device - description: delete a collection of Devices + description: Delete Device resources. operationId: deleteDevices responses: "200": @@ -759,16 +926,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/devices/{name}: get: tags: - device - description: read the specified Device + description: Get a Device resource. operationId: readDevice parameters: - name: name in: path - description: unique name of the Device + description: The name of the Device resource to get. required: true schema: type: string @@ -785,21 +964,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - device - description: replace the specified Device + description: Update a Device resource. operationId: replaceDevice parameters: - name: name in: path - description: name of the Device + description: The name of the Device resource to update. required: true schema: type: string @@ -834,6 +1025,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -846,15 +1043,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - device - description: delete a Device + description: Delete a Device resource. operationId: deleteDevice parameters: - name: name in: path - description: name of the Device + description: The name of the Device resource to delete. required: true schema: type: string @@ -871,21 +1074,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' patch: tags: - device - description: Patches the specified device + description: Patch a Device resource. operationId: patchDevice parameters: - name: name in: path - description: name of the device + description: The name of the Device resource to patch. required: true schema: type: string @@ -913,6 +1128,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -925,16 +1146,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/devices/{name}/status: get: tags: - device - description: read status of the specified Device + description: Get the status of a Device resource. operationId: readDeviceStatus parameters: - name: name in: path - description: name of the Device + description: The name of the Device resource to get. required: true schema: type: string @@ -951,21 +1178,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - device - description: replace status of the specified Device + description: Update the status of a Device resource. operationId: replaceDeviceStatus parameters: - name: name in: path - description: name of the Device + description: The name of the Device resource to update. required: true schema: type: string @@ -994,12 +1233,24 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/devices/{name}/console: get: tags: @@ -1009,7 +1260,7 @@ paths: parameters: - name: name in: path - description: unique name of the Device + description: The name of the Device resource to create a console connection to. required: true schema: type: string @@ -1026,6 +1277,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -1038,22 +1295,84 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /api/v1/devices/{name}/decommission: + put: + tags: + - device + description: schedule the device to decommission + operationId: decommissionDevice + parameters: + - name: name + in: path + description: The name of the Device resource to decommission. + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeviceDecommission' + required: true + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Device' + "400": + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "401": + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "404": + description: NotFound + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/devices/{name}/rendered: get: tags: - device - description: get the full specification for the specified device + description: Get the rendered, self-contained device specification for a Device resource. operationId: getRenderedDeviceSpec parameters: - name: name in: path - description: Name of the device + description: The name of the Device resource to get the rendered device specification for. required: true schema: type: string - name: knownRenderedVersion in: query - description: The last known renderedVersion + description: The last known renderedVersion. required: false schema: type: string @@ -1073,6 +1392,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -1085,16 +1410,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/enrollmentconfig/{name}: get: tags: - - enrollmentconfig - description: Get config for enrolling devices + - enrollmentrequest + description: Get an EnrollmentConfig. operationId: enrollmentConfig parameters: - name: name in: path - description: the name of approved CSR + description: The name of approved CertificateSigningRequest. required: true schema: type: string @@ -1111,6 +1442,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: Not Found content: @@ -1123,11 +1460,17 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/enrollmentrequests: get: tags: - enrollmentrequest - description: list Enrollment Requests + description: List EnrollmentRequest resources. operationId: listEnrollmentRequests parameters: - name: continue @@ -1143,7 +1486,7 @@ paths: type: string - name: fieldSelector in: query - description: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). schema: type: string - name: limit @@ -1153,21 +1496,6 @@ paths: schema: type: integer format: int32 - - name: sortBy - in: query - description: Specifies the field to sort by. - required: false - schema: - type: string - example: 'metadata.name' - - name: sortOrder - in: query - description: Specifies the sort order. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - default: 'Asc' - example: 'Asc' responses: "200": description: OK @@ -1187,10 +1515,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - enrollmentrequest - description: request enrollment of a Device + description: Create an EnrollmentRequest resource. operationId: createEnrollmentRequest requestBody: content: @@ -1223,16 +1563,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "409": description: StatusConflict content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - enrollmentrequest - description: delete a collection of Enrollments + description: Delete EnrollmentRequest resources. operationId: deleteEnrollmentRequests responses: "200": @@ -1247,16 +1599,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/enrollmentrequests/{name}: get: tags: - enrollmentrequest - description: read the specified Enrollment + description: Get an EnrollmentRequest resource. operationId: readEnrollmentRequest parameters: - name: name in: path - description: the fingerprint of the EnrollmentRequest + description: The name of the EnrollmentRequest resource to get. required: true schema: type: string @@ -1273,21 +1637,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - enrollmentrequest - description: replace the specified Enrollment Request + description: Update an EnrollmentRequest resource. operationId: replaceEnrollmentRequest parameters: - name: name in: path - description: name of the EnrollmentRequest + description: The name of the EnrollmentRequest resource to update. required: true schema: type: string @@ -1322,6 +1698,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -1334,15 +1716,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - enrollmentrequest - description: delete a Enrollment Request + description: Delete an EnrollmentRequest resource. operationId: deleteEnrollmentRequest parameters: - name: name in: path - description: name of the Enrollment Request + description: The name of the EnrollmentRequest resource to delete. required: true schema: type: string @@ -1359,22 +1747,34 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/enrollmentrequests/{name}/status: get: tags: - enrollmentrequest - description: read status of the specified EnrollmentRequest + description: Get the status of an EnrollmentRequest resource. operationId: readEnrollmentRequestStatus parameters: - name: name in: path - description: name of the EnrollmentRequest + description: The name of the EnrollmentRequest resource to get. required: true schema: type: string @@ -1391,21 +1791,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - enrollmentrequest - description: replace status of the specified EnrollmentRequest + description: Update the status of an EnrollmentRequest resource. operationId: replaceEnrollmentRequestStatus parameters: - name: name in: path - description: name of the EnrollmentRequest + description: The name of the EnrollmentRequest resource to update. required: true schema: type: string @@ -1428,22 +1840,34 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/enrollmentrequests/{name}/approval: post: tags: - enrollmentrequest - description: create approval of the specified EnrollmentRequest + description: Approve or deny an EnrollmentRequest. operationId: approveEnrollmentRequest parameters: - name: name in: path - description: name of the EnrollmentRequest + description: The name of the EnrollmentRequest to approve or deny. required: true schema: type: string @@ -1478,6 +1902,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -1490,11 +1920,17 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/certificatesigningrequests: get: tags: - certificatesigningrequest - description: list CertificateSigningRequests + description: List CertificateSigningRequest resources. operationId: listCertificateSigningRequests parameters: - name: continue @@ -1510,7 +1946,7 @@ paths: type: string - name: fieldSelector in: query - description: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). schema: type: string - name: limit @@ -1520,21 +1956,6 @@ paths: schema: type: integer format: int32 - - name: sortBy - in: query - description: Specifies the field to sort by. - required: false - schema: - type: string - example: 'metadata.name' - - name: sortOrder - in: query - description: Specifies the sort order. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - default: 'Asc' - example: 'Asc' responses: "200": description: OK @@ -1554,10 +1975,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - certificatesigningrequest - description: request Certificate Signing + description: Create a CertificateSigningRequest resource. operationId: createCertificateSigningRequest requestBody: content: @@ -1566,38 +1999,32 @@ paths: $ref: '#/components/schemas/CertificateSigningRequest' required: true responses: - "200": - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CertificateSigningRequest' "201": description: Created content: application/json: schema: $ref: '#/components/schemas/CertificateSigningRequest' - "202": - description: Accepted + "400": + description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/CertificateSigningRequest' - "208": - description: Already Reported + $ref: '#/components/schemas/Error' + "401": + description: Unauthorized content: application/json: schema: - $ref: '#/components/schemas/EnrollmentRequest' - "400": - description: Bad Request + $ref: '#/components/schemas/Error' + "403": + description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' - "401": - description: Unauthorized + "503": + description: ServiceUnavailable content: application/json: schema: @@ -1605,7 +2032,7 @@ paths: delete: tags: - certificatesigningrequest - description: delete a collection of CertificateSigningRequest + description: Delete CertificateSigningRequest resources. operationId: deleteCertificateSigningRequests responses: "200": @@ -1620,16 +2047,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/certificatesigningrequests/{name}: patch: - description: partially update the specified CertificateSigningRequest - operationId: patchCertificateSigningRequest tags: - certificatesigningrequest + description: Patch a CertificateSigningRequest resource. + operationId: patchCertificateSigningRequest parameters: - name: name in: path - description: name of the certificatesigningrequest + description: The name of the CertificateSigningRequest resource to patch. required: true schema: type: string @@ -1669,12 +2108,24 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "409": description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' get: tags: - certificatesigningrequest @@ -1683,7 +2134,7 @@ paths: parameters: - name: name in: path - description: the device identifier of the CertificateSigningRequest + description: The name of the CertificateSigningRequest resource to get. required: true schema: type: string @@ -1701,12 +2152,24 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - certificatesigningrequest @@ -1715,7 +2178,7 @@ paths: parameters: - name: name in: path - description: name of the CertificateSigningRequest + description: The name of the CertificateSigningRequest resource to update. required: true schema: type: string @@ -1750,6 +2213,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -1762,6 +2231,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - certificatesigningrequest @@ -1770,7 +2245,7 @@ paths: parameters: - name: name in: path - description: name of the Certificate Signing Request + description: The name of the CertificateSigningRequest resource to delete. required: true schema: type: string @@ -1787,20 +2262,34 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/certificatesigningrequests/{name}/approval: post: + tags: + - certificatesigningrequest description: approve the specified CertificateSigningRequest operationId: approveCertificateSigningRequest parameters: - name: name in: path - description: name of the CertificateSigningRequest + description: The name of the CertificateSigningRequest resource to approve or deny. required: true schema: type: string @@ -1823,6 +2312,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -1835,19 +2330,27 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - "500": - description: InternalServerError + "500": + description: InternalServerError + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable content: application/json: schema: $ref: '#/components/schemas/Error' delete: + tags: + - certificatesigningrequest description: deny the specified CertificateSigningRequest operationId: denyCertificateSigningRequest parameters: - name: name in: path - description: name of the CertificateSigningRequest + description: The name of the CertificateSigningRequest resource to delete. required: true schema: type: string @@ -1865,6 +2368,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -1877,11 +2386,17 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/fleets: get: tags: - fleet - description: list Fleets + description: List Fleet resources. operationId: listFleets parameters: - name: continue @@ -1897,7 +2412,7 @@ paths: type: string - name: fieldSelector in: query - description: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). schema: type: string - name: limit @@ -1915,25 +2430,10 @@ paths: type: string - name: addDevicesCount in: query - description: include the number of devices in each fleet + description: Include the number of devices in each fleet. required: false schema: type: boolean - - name: sortBy - in: query - description: Specifies the field to sort by. - required: false - schema: - type: string - example: 'metadata.name' - - name: sortOrder - in: query - description: Specifies the sort order. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - default: 'Asc' - example: 'Asc' responses: "200": description: OK @@ -1953,10 +2453,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' post: tags: - fleet - description: create a Fleet + description: Create a Fleet resource. operationId: createFleet requestBody: content: @@ -1983,16 +2495,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "409": description: StatusConflict content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - fleet - description: delete a collection of Fleets + description: Delete Fleet resources. operationId: deleteFleets responses: "200": @@ -2007,22 +2531,34 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/fleets/{name}: get: tags: - fleet - description: read the specified Fleet + description: Get a Fleet resource. operationId: readFleet parameters: - name: name in: path - description: unique name of the Fleet + description: The name of the Fleet resource to get. required: true schema: type: string - name: addDevicesSummary in: query - description: include a summary of the devices in the fleet + description: Include a summary of the devices in the fleet. required: false schema: type: boolean @@ -2039,21 +2575,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - fleet - description: replace the specified Fleet + description: Update a Fleet resource. operationId: replaceFleet parameters: - name: name in: path - description: name of the Fleet + description: The name of the Fleet resource to update. required: true schema: type: string @@ -2094,21 +2642,33 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "409": description: Conflict content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' patch: tags: - fleet - description: Patches the specified fleet + description: Patch a Fleet resource. operationId: patchFleet parameters: - name: name in: path - description: name of the fleet + description: The name of the Fleet resource to patch. required: true schema: type: string @@ -2136,6 +2696,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -2148,15 +2714,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - fleet - description: delete a Fleet + description: Delete a Fleet resource. operationId: deleteFleet parameters: - name: name in: path - description: name of the Fleet + description: The name of the Fleet resource to delete. required: true schema: type: string @@ -2173,6 +2745,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: @@ -2185,6 +2763,12 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/fleets/{name}/status: get: tags: @@ -2194,7 +2778,7 @@ paths: parameters: - name: name in: path - description: name of the Fleet + description: The name of the Fleet resource to get. required: true schema: type: string @@ -2211,12 +2795,24 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' put: tags: - fleet @@ -2225,7 +2821,7 @@ paths: parameters: - name: name in: path - description: name of the Fleet + description: The name of the Fleet resource to update. required: true schema: type: string @@ -2248,16 +2844,28 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/fleets/{fleet}/templateversions: get: tags: - - templateversion + - fleet description: list template versions operationId: listTemplateVersions parameters: @@ -2280,7 +2888,7 @@ paths: type: string - name: fieldSelector in: query - description: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + description: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., "key1=value1,key2!=value2"). schema: type: string - name: limit @@ -2290,21 +2898,6 @@ paths: schema: type: integer format: int32 - - name: sortBy - in: query - description: Specifies the field to sort by. - required: false - schema: - type: string - example: 'metadata.name' - - name: sortOrder - in: query - description: Specifies the sort order. - required: false - schema: - $ref: '#/components/schemas/SortOrder' - default: 'Asc' - example: 'Asc' responses: "200": description: OK @@ -2324,9 +2917,21 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - - templateversion + - fleet description: delete a collection of template versions operationId: deleteTemplateVersions parameters: @@ -2349,10 +2954,22 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' /api/v1/fleets/{fleet}/templateversions/{name}: get: tags: - - templateversion + - fleet description: read the specified template version operationId: readTemplateVersion parameters: @@ -2364,7 +2981,7 @@ paths: type: string - name: name in: path - description: Name of the template version. + description: The name of the template version. required: true schema: type: string @@ -2381,15 +2998,27 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' delete: tags: - - templateversion + - fleet description: delete a template version operationId: deleteTemplateVersion parameters: @@ -2401,7 +3030,7 @@ paths: type: string - name: name in: path - description: name of the template version. + description: The name of the template version. required: true schema: type: string @@ -2418,21 +3047,43 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + "403": + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/Error' "404": description: NotFound content: application/json: schema: $ref: '#/components/schemas/Error' + "503": + description: ServiceUnavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' components: schemas: - SortOrder: + DeviceDecommissionTargetType: type: string enum: - - 'Asc' - - 'Desc' - description: Specifies the sort order. - default: 'Asc' + - "Unenroll" + - "FactoryReset" + x-enum-varnames: + - "DeviceDecommissionTargetTypeUnenroll" + - "DeviceDecommissionTargetTypeFactoryReset" + description: Specifies the desired decommissioning method of the device. + DeviceDecommission: + type: object + properties: + target: + $ref: '#/components/schemas/DeviceDecommissionTargetType' + required: + - target + description: Metadata about a device decommissioning request. PatchRequest: type: array items: @@ -2459,10 +3110,10 @@ components: properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ObjectMeta' spec: @@ -2473,35 +3124,36 @@ components: - apiVersion - kind - metadata - description: Repository represents a Git repository or an HTTP endpoint + description: Repository represents a Git repository or an HTTP endpoint. HttpConfig: type: object + description: Configuration for HTTP transport. additionalProperties: false properties: username: type: string - description: 'The username for auth with HTTP transport' + description: The username for auth with HTTP transport. password: type: string - description: 'The password for auth with HTTP transport' + description: The password for auth with HTTP transport. format: password tls.crt: type: string - description: 'Base64 encoded TLS cert data' + description: Base64 encoded TLS cert data. format: password tls.key: type: string - description: 'Base64 encoded TLS cert key' + description: Base64 encoded TLS cert key. format: password ca.crt: type: string - description: 'Base64 encoded root CA' + description: Base64 encoded root CA. skipServerVerification: type: boolean - description: 'Skip remote server verification' + description: Skip remote server verification. token: type: string - description: 'The token for auth with HTTP transport' + description: The token for auth with HTTP transport. format: password HttpRepoSpec: type: object @@ -2509,7 +3161,7 @@ components: properties: url: type: string - description: 'The HTTP URL to call or clone from' + description: 'The HTTP URL to call or clone from.' type: $ref: "#/components/schemas/RepoSpecType" httpConfig: @@ -2523,26 +3175,27 @@ components: - httpConfig SshConfig: type: object + description: Configuration for SSH transport. additionalProperties: false properties: sshPrivateKey: type: string - description: 'Base64 encoded private SSH key' + description: 'Base64 encoded private SSH key.' format: password privateKeyPassphrase: type: string - description: 'The passphrase for sshPrivateKey' + description: 'The passphrase for sshPrivateKey.' format: password skipServerVerification: type: boolean - description: 'Skip remote server verification' + description: 'Skip remote server verification.' SshRepoSpec: type: object additionalProperties: false properties: url: type: string - description: 'The SSH Git repository URL to clone from' + description: 'The SSH Git repository URL to clone from.' type: $ref: "#/components/schemas/RepoSpecType" sshConfig: @@ -2557,7 +3210,7 @@ components: properties: url: type: string - description: 'The (possibly remote) repository URL' + description: 'The (possibly remote) repository URL.' type: $ref: "#/components/schemas/RepoSpecType" required: @@ -2565,12 +3218,14 @@ components: - type RepositorySpec: type: object + description: RepositorySpec describes a configuration repository. oneOf: - $ref: "#/components/schemas/GenericRepoSpec" - $ref: "#/components/schemas/HttpRepoSpec" - $ref: "#/components/schemas/SshRepoSpec" RepositoryStatus: type: object + description: RepositoryStatus represents information about the status of a repository. properties: conditions: type: array @@ -2579,16 +3234,15 @@ components: $ref: '#/components/schemas/Condition' required: - conditions - description: RepositoryStatus represents information about the status of a repository. Status may trail the actual state of a repository. RepositoryList: type: object properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ListMeta' items: @@ -2604,7 +3258,7 @@ components: - items RepoSpecType: type: string - description: 'RepoSpecType is the type of the repository' + description: 'RepoSpecType is the type of the repository.' enum: - git - http @@ -2613,10 +3267,10 @@ components: properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ObjectMeta' spec: @@ -2630,6 +3284,7 @@ components: description: Device represents a physical device. DeviceConsole: type: object + description: DeviceConsole represents the console connection information. properties: # TODO: when migrating to ws, this should be a ws url instead of gRPCEndpoint #wsURL: @@ -2637,8 +3292,10 @@ components: # description: 'The URL to connect to the console through a websocket' gRPCEndpoint: type: string + description: The gRPC endpoint for the console connection. sessionID: type: string + description: The session ID for the console connection. required: - gRPCEndpoint - sessionID @@ -2653,21 +3310,23 @@ components: properties: name: type: string - description: "The name of the config provider" + description: The name of the config provider. gitRef: type: object + description: The reference to a Git configuration server. properties: repository: type: string - description: | - The name of the repository resource to use as the sync source + description: The name of the Repository resource. targetRevision: type: string + description: The revision to use from the Repository. path: type: string + description: The path to the config in the Repository. mountPath: - description: Path to config in device type: string + description: Path in the device's file system at which the repository's path should be mounted. default: "/" required: - repository @@ -2681,16 +3340,20 @@ components: properties: name: type: string - description: "The name of the config provider" + description: The name of the config provider. secretRef: type: object + description: The reference to a Kubernetes secret. properties: name: type: string + description: The name of the secret. namespace: type: string + description: The namespace of the secret. mountPath: type: string + description: Path in the device's file system at which the secret should be mounted. required: - name - namespace @@ -2703,9 +3366,10 @@ components: properties: name: type: string - description: "The name of the config provider" + description: The name of the config provider. inline: type: array + description: A list of files to create on the device. items: $ref: '#/components/schemas/FileSpec' required: @@ -2728,10 +3392,7 @@ components: - base64 mode: type: integer - description: | - The file’s permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as - a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, - the permission mode for files defaults to 0644. + description: The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. user: type: string description: The file's owner, specified either as a name or numeric ID. Defaults to "root". @@ -2746,23 +3407,20 @@ components: properties: name: type: string - description: "The name of the config provider" + description: The name of the config provider. httpRef: type: object + description: The reference to an HTTP configuration server. properties: repository: type: string - description: | - The name of the repository resource to use as the sync source + description: The name of the repository resource to use as the sync source. suffix: type: string - description: | - Part of the URL that comes after the base URL. It can include query parameters such as: - /path/to/endpoint?query=param + description: 'Part of the URL that comes after the base URL. It can include query parameters such as: "/path/to/endpoint?query=param".' filePath: type: string - description: | - The path of the file where the response is stored in the filesystem of the device. + description: Path in the device's file system to which the content returned by the HTTP sever should be written. required: - repository - filePath @@ -2777,7 +3435,7 @@ components: properties: name: type: string - description: "The name of the application" + description: The name of the application. - oneOf: - $ref: '#/components/schemas/ImageApplicationProvider' # extend application providers @@ -2786,7 +3444,7 @@ components: properties: image: type: string - description: "Reference to the container image for the application package" + description: Reference to the container image for the application package. required: - image ApplicationEnvVars: @@ -2794,17 +3452,19 @@ components: properties: envVars: type: object - description: "Environment variable key-value pairs, injected during runtime" + description: Environment variable key-value pairs, injected during runtime. additionalProperties: type: string RenderedApplicationSpec: type: object + description: RenderedApplicationSpec describes the rendered and self-contained specification of an application. allOf: - $ref: '#/components/schemas/ApplicationEnvVars' - type: object properties: name: type: string + description: An application name. - oneOf: - $ref: '#/components/schemas/ImageApplicationProvider' ResourceMonitor: @@ -2820,14 +3480,16 @@ components: Disk: '#/components/schemas/DiskResourceMonitorSpec' ResourceMonitorSpec: type: object + description: Specification for monitoring a resource. properties: monitorType: type: string + description: The type of resource to monitor. alertRules: type: array items: $ref: '#/components/schemas/ResourceAlertRule' - description: "Array of alert rules. Only one alert per severity is allowed." + description: Array of alert rules. Only one alert per severity is allowed. samplingInterval: type: string pattern: '^[1-9]\d*[smh]$' @@ -2840,23 +3502,23 @@ components: allOf: - $ref: '#/components/schemas/ResourceMonitorSpec' type: object - description: "Specification for monitoring CPU resource load." + description: Specification for monitoring CPU resource load. MemoryResourceMonitorSpec: allOf: - $ref: '#/components/schemas/ResourceMonitorSpec' type: object - description: "Specification for monitoring Memory resource usage." + description: Specification for monitoring Memory resource usage. DiskResourceMonitorSpec: allOf: - $ref: '#/components/schemas/ResourceMonitorSpec' - type: object - description: "Specification for monitoring disk usage." + description: Specification for monitoring disk usage. required: - path properties: path: type: string - description: "The directory path to monitor for disk usage." + description: The directory path to monitor for disk usage. CustomResourceMonitorSpec: allOf: - $ref: '#/components/schemas/ResourceMonitorSpec' @@ -2867,17 +3529,16 @@ components: properties: severity: $ref: '#/components/schemas/ResourceAlertSeverityType' - description: "Severity of the alert." duration: type: string pattern: '^\d+[smh]$' description: "Duration is the time over which the average usage is observed before alerting. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours." percentage: type: number - description: 'The percentage of usage that triggers the alert.' + description: The percentage of usage that triggers the alert. description: type: string - description: 'A human-readable description of the alert.' + description: A human-readable description of the alert. required: - severity - duration @@ -2885,6 +3546,7 @@ components: - description ResourceAlertSeverityType: type: string + description: Severity of the alert. enum: - "Warning" - "Critical" @@ -2893,152 +3555,137 @@ components: - "ResourceAlertSeverityTypeWarning" - "ResourceAlertSeverityTypeCritical" - "ResourceAlertSeverityTypeInfo" - DeviceUpdateHookSpec: + DeviceLifecycleHookType: + type: string + enum: + - 'BeforeUpdating' + - 'AfterUpdating' + - 'BeforeRebooting' + - 'AfterRebooting' + x-enum-varnames: + - "DeviceLifecycleHookBeforeUpdating" + - "DeviceLifecycleHookAfterUpdating" + - "DeviceLifecycleHookBeforeRebooting" + - "DeviceLifecycleHookAfterRebooting" + HookAction: + allOf: + - type: object + properties: + if: + type: array + description: Conditions that must be met for the action to be executed. + items: + $ref: '#/components/schemas/HookCondition' + timeout: + type: string + pattern: '^(?:[1-9]\d*)?\d[smh]$' + description: The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are 's' for seconds, 'm' for minutes, and 'h' for hours. + - oneOf: + - $ref: '#/components/schemas/HookActionRun' + # extend hook actions + HookCondition: type: object - properties: - name: - type: string - description: - type: string - actions: - type: array - items: - $ref: '#/components/schemas/HookAction' - description: 'The actions to take when the specified file operations are observed. Each action is executed in the order they are defined.' - onFile: - type: array - items: - $ref: '#/components/schemas/FileOperation' - path: - type: string - description: 'The path to monitor for changes in configuration files. This path can point to either a specific file or an entire directory.' - required: - - actions - DeviceRebootHookSpec: + oneOf: + - $ref: '#/components/schemas/HookConditionPathOp' + - $ref: '#/components/schemas/HookConditionExpression' + # extend hook conditions + HookConditionPathOp: type: object properties: - name: - type: string - description: + path: type: string - actions: + description: The absolute path to a file or directory that must have changed as condition for the action to be performed. + op: type: array + description: The operation(s) on files at or below the path that satisfy the path condition. items: - $ref: '#/components/schemas/HookAction' - description: 'The actions taken before and after system reboots are observed. Each action is executed in the order they are defined.' + $ref: '#/components/schemas/FileOperation' required: - - actions + - path + - op FileOperation: type: string - description: 'The type of operation that was observed on the file.' enum: - - "Create" - - "Remove" - - "Update" - - "Reboot" + - "created" + - "removed" + - "updated" x-enum-varnames: - - "FileOperationCreate" - - "FileOperationRemove" # by convention remove is fired before the file is removed. - - "FileOperationUpdate" - - "FileOperationReboot" - HookAction: - type: object - oneOf: - - properties: - executable: - $ref: '#/components/schemas/HookActionExecutableSpec' - required: - - "executable" - - properties: - systemd: - $ref: '#/components/schemas/HookActionSystemdSpec' - required: - - "systemd" - HookActionSpec: - type: object - properties: - timeout: - type: string - pattern: '^[1-9]\d*[smhd]$' - description: | - The maximum duration allowed for the action to complete. - The duration should be specified as a positive integer - followed by a time unit. Supported time units are: - - 's' for seconds - - 'm' for minutes - - 'h' for hours - - 'd' for days - HookActionSystemdSpec: - allOf: - - $ref: '#/components/schemas/HookActionSpec' - - type: object - properties: - unit: - $ref: '#/components/schemas/HookActionSystemdUnit' - required: - - unit - HookActionSystemdUnit: + - "FileOperationCreated" + - "FileOperationRemoved" + - "FileOperationUpdated" + HookConditionExpression: + type: string + description: An expression that must evaluate to true as condition for the action to be performed. + HookActionRun: type: object properties: - name: + run: type: string - description: 'The name of the systemd unit on which the specified operations will be performed. This should be the exact name of the unit file, such as example.service. If the name is not populated the name will be auto discovered from the file path.' - operations: - type: array - items: + description: The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context. + envVars: + type: object + description: Environment variable key-value pairs, injected during runtime. + additionalProperties: type: string - enum: - - "Enable" - - "Disable" - - "Start" - - "Stop" - - "Restart" - - "Reload" - - "DaemonReload" - x-enum-varnames: - - "SystemdEnable" - - "SystemdDisable" - - "SystemdStart" - - "SystemdStop" - - "SystemdRestart" - - "SystemdReload" - - "SystemdDaemonReload" - description: 'The specific systemd operations to perform on the specified unit.' workDir: - type: string - description: 'The directory in which the executable will be run from if it is left empty it will run from the users home directory.' + type: string + description: The working directory to be used when running the command. required: - - name - - operations - HookActionExecutableSpec: - allOf: - - $ref: '#/components/schemas/HookActionSpec' - - $ref: '#/components/schemas/HookActionExecutable' - HookActionExecutable: - type: object - properties: - run: - type: string - description: 'The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context.' - envVars: - type: array - items: - type: string - description: 'An optional list of KEY=VALUE pairs to set as environment variables for the executable.' - workDir: - type: string - description: 'The directory in which the executable will be run from if it is left empty it will run from the users home directory.' - required: - - run + - run + DeviceUpdatePolicySpec: + type: object + description: Specifies the policy for managing device updates, including when updates should be downloaded and applied. + properties: + downloadSchedule: + $ref: '#/components/schemas/UpdateSchedule' + description: Defines the schedule for downloading updates. + updateSchedule: + $ref: '#/components/schemas/UpdateSchedule' + description: Defines the schedule for applying updates. + UpdateSchedule: + type: object + description: Defines the schedule for automatic updates, including timing and optional timeout. + properties: + timeZone: + $ref: '#/components/schemas/TimeZone' + at: + $ref: '#/components/schemas/CronExpression' + startGraceDuration: + $ref: '#/components/schemas/Duration' + required: + - at + TimeZone: + type: string + description: Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported ("GMT", "UTC"). + default: "Local" + CronExpression: + type: string + description: 'Cron expression format for scheduling times. + + The format is `* * * * *`: + - Minutes: `*` matches 0-59. + - Hours: `*` matches 0-23. + - Day of Month: `*` matches 1-31. + - Month: `*` matches 1-12. + - Day of Week: `*` matches 0-6. + + Supported operators: + - `*`: Matches any value (e.g., `*` in hours matches every hour). + - `-`: Range (e.g., `0-8` for 12 AM to 8 AM). + - `,`: List (e.g., `1,12` for 1st and 12th minute). + - `/`: Step (e.g., `*/12` for every 12th minute). + - Single value (e.g., `8` matches the 8th minute). + + Example: `* 0-8,16-23 * * *`.' DeviceList: type: object properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ListMeta' items: @@ -3056,14 +3703,16 @@ components: - items DeviceOSSpec: type: object + description: DeviceOSSpec describes the target OS for the device. properties: image: type: string - description: 'ostree image name or URL.' + description: The target OS image name or URL. required: - image DeviceStatus: type: object + description: DeviceStatus represents information about the status of a device. Status may trail the actual state of a device. required: - conditions - systemInfo @@ -3076,44 +3725,40 @@ components: - updated - summary - lastSeen + - lifecycle properties: conditions: type: array - description: "Conditions represent the observations of a the current state of a device." + description: Conditions represent the observations of a the current state of a device. items: $ref: '#/components/schemas/Condition' systemInfo: $ref: "#/components/schemas/DeviceSystemInfo" applications: type: array - description: "List of device application status." + description: List of device application status. items: $ref: "#/components/schemas/DeviceApplicationStatus" applicationsSummary: $ref: "#/components/schemas/DeviceApplicationsSummaryStatus" - description: "Summary status of the device applications." resources: $ref: "#/components/schemas/DeviceResourceStatus" - description: "Current status of the resources of the device." integrity: $ref: "#/components/schemas/DeviceIntegrityStatus" - description: "Current status of the integrity of the device." config: $ref: "#/components/schemas/DeviceConfigStatus" - description: "Current status of the device config." os: $ref: "#/components/schemas/DeviceOSStatus" - description: "Current status of the device OS." updated: $ref: "#/components/schemas/DeviceUpdatedStatus" - description: "Current status of the device update." summary: $ref: "#/components/schemas/DeviceSummaryStatus" - description: "Summary status of the device." lastSeen: type: string + description: The last time the device was seen by the service. format: date-time - description: "DeviceStatus represents information about the status of a device. Status may trail the actual state of a device." + lifecycle: + $ref: '#/components/schemas/DeviceLifecycleStatus' DeviceSystemInfo: required: - architecture @@ -3141,29 +3786,29 @@ components: properties: name: type: string - description: "Human readable name of the application." + description: Human readable name of the application. ready: type: string - description: "The number of containers which are ready in the application." + description: The number of containers which are ready in the application. restarts: type: integer - description: "Number of restarts observed for the application." + description: Number of restarts observed for the application. status: $ref: "#/components/schemas/ApplicationStatusType" - description: "Status of the application." DeviceApplicationsSummaryStatus: type: object + description: A summary of the health of applications on the device. required: - status properties: status: $ref: "#/components/schemas/ApplicationsSummaryStatusType" - description: "Summary status of the system applications." info: type: string - description: "Human readable information detailing the last system application transition." + description: Human readable information detailing the last application transition. ApplicationsSummaryStatusType: type: string + description: Status of all applications on the device. enum: - "Healthy" - "Degraded" @@ -3176,6 +3821,7 @@ components: - "ApplicationsSummaryStatusUnknown" ApplicationStatusType: type: string + description: Status of a single application on the device. enum: - "Preparing" - "Starting" @@ -3192,37 +3838,40 @@ components: - "ApplicationStatusCompleted" DeviceOSStatus: type: object + description: Current status of the device OS. required: - image - imageDigest properties: image: type: string - description: "Version of the OS image." + description: Version of the OS image. imageDigest: type: string - description: "The digest of the OS image (e.g. sha256:a0...)" + description: The digest of the OS image (e.g. sha256:a0...). DeviceConfigStatus: type: object + description: Current status of the device config. required: - renderedVersion properties: renderedVersion: type: string - description: "Version of the device rendered config." + description: Version of the device rendered config. DeviceSummaryStatus: type: object + description: A summary of the health of the device hardware and operating system resources. required: - status properties: status: $ref: "#/components/schemas/DeviceSummaryStatusType" - description: "Summary status of the device." info: type: string - description: "Human readable information detailing the last device status transition." + description: Human readable information detailing the last device status transition. DeviceSummaryStatusType: type: string + description: Status of the device. enum: - "Online" - "Degraded" @@ -3239,17 +3888,18 @@ components: - "DeviceSummaryStatusUnknown" DeviceUpdatedStatus: type: object + description: Current status of the device update. required: - status properties: status: $ref: "#/components/schemas/DeviceUpdatedStatusType" - description: "Status type of the device update." info: type: string - description: "Human readable information about the last device update transition." + description: Human readable information about the last device update transition. DeviceUpdatedStatusType: type: string + description: Status type of the device update. enum: - "UpToDate" - "OutOfDate" @@ -3260,27 +3910,52 @@ components: - "DeviceUpdatedStatusOutOfDate" - "DeviceUpdatedStatusUpdating" - "DeviceUpdatedStatusUnknown" + DeviceLifecycleStatus: + type: object + required: + - status + properties: + status: + $ref: "#/components/schemas/DeviceLifecycleStatusType" + info: + type: string + description: Human readable information about the device lifecycle status. + description: Current status of the device lifecycle. + DeviceLifecycleStatusType: + type: string + enum: + - "Unknown" + - "Enrolled" + - "Decommissioning" + - "Decommissioned" + x-enum-varnames: + - "DeviceLifecycleStatusUnknown" + - "DeviceLifecycleStatusEnrolled" + - "DeviceLifecycleStatusDecommissioning" + - "DeviceLifecycleStatusDecommissioned" + description: Status type of the device lifecycle. DeviceIntegrityStatus: type: object + description: Status of device integrity. required: - summary properties: summary: $ref: "#/components/schemas/DeviceIntegrityStatusSummary" - description: "Summary status of the integrity of the device." DeviceIntegrityStatusSummary: type: object + description: Summary status of the integrity of the device. required: - status properties: status: $ref: "#/components/schemas/DeviceIntegrityStatusSummaryType" - description: "Summary status of the integrity of the device." info: type: string - description: "Human readable information about the last integrity transition." + description: Human readable information about the last integrity transition. DeviceIntegrityStatusSummaryType: type: string + description: Status of the integrity of the device. enum: - "Passed" - "Failed" @@ -3293,6 +3968,7 @@ components: - "DeviceIntegrityStatusUnsupported" DeviceResourceStatus: type: object + description: Current status of the resources of the device. required: - cpu - memory @@ -3300,15 +3976,16 @@ components: properties: cpu: $ref: "#/components/schemas/DeviceResourceStatusType" - description: "Status of the device CPU resources." + description: Status of the device CPU resources. memory: $ref: "#/components/schemas/DeviceResourceStatusType" - description: "Status of the device memory resources." + description: Status of the device memory resources. disk: $ref: "#/components/schemas/DeviceResourceStatusType" - description: "Status of the device disk resources." + description: Status of the device disk resources. DeviceResourceStatusType: type: string + description: The types of resource statuses. enum: - "Healthy" - "Warning" @@ -3324,46 +4001,54 @@ components: EnrollmentRequestApproval: type: object + description: EnrollmentRequestApproval contains information about the approval of a device enrollment request. properties: labels: type: object additionalProperties: type: string - description: 'labels is a set of labels to apply to the device.' + description: A set of labels to apply to the device. approved: type: boolean - description: 'approved indicates whether the request has been approved.' + description: Indicates whether the request has been approved. approvedBy: type: string - description: 'approvedBy is the name of the approver.' + description: The name of the approver. approvedAt: type: string format: date-time - description: 'approvedAt is the time at which the request was approved.' + description: The time at which the request was approved. required: - approved EnrollmentServiceAuth: type: object + description: EnrollmentServiceAuth contains the client authentication information for a Flight Control enrollment service. properties: client-certificate-data: type: string + description: ClientCertificateData contains PEM-encoded data from a client cert file for TLS. client-key-data: type: string + description: ClientKeyData contains PEM-encoded data from a client key file for TLS. required: - client-certificate-data - client-key-data EnrollmentServiceService: type: object + description: EnrollmentServiceService contains information about connecting to a Flight Control enrollment service. properties: certificate-authority-data: type: string + description: CertificateAuthorityData contains PEM-encoded certificate authority certificates. server: type: string + description: Server is the address of the Flight Control enrollment service (https://hostname:port). required: - certificate-authority-data - server EnrollmentService: type: object + description: EnrollmentService contains information about how to communicate with a Flight Control enrollment service. properties: authentication: $ref: '#/components/schemas/EnrollmentServiceAuth' @@ -3371,6 +4056,7 @@ components: $ref: '#/components/schemas/EnrollmentServiceService' enrollment-ui-endpoint: type: string + description: The URL of the UI that the agent uses to print the QR code and link for enrolling the device. required: - authentication - service @@ -3380,20 +4066,17 @@ components: properties: enrollment-service: $ref: '#/components/schemas/EnrollmentService' - grpc-management-endpoint: - type: string required: - enrollment-service - - grpc-management-endpoint EnrollmentRequest: type: object properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ObjectMeta' spec: @@ -3411,10 +4094,10 @@ components: properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ListMeta' items: @@ -3435,21 +4118,21 @@ components: properties: csr: type: string - description: 'csr is a PEM-encoded PKCS#10 certificate signing request.' + description: 'The PEM-encoded PKCS#10 certificate signing request.' deviceStatus: $ref: '#/components/schemas/DeviceStatus' labels: type: object additionalProperties: type: string - description: 'A set of labels that the service will apply to this device when its enrollment is approved' + description: 'A set of labels that the service will apply to this device when its enrollment is approved.' description: EnrollmentRequestSpec is a description of a EnrollmentRequest's target state. EnrollmentRequestStatus: type: object properties: certificate: type: string - description: 'certificate is a PEM-encoded signed certificate.' + description: 'The PEM-encoded signed certificate.' conditions: type: array description: 'Current state of the EnrollmentRequest.' @@ -3463,13 +4146,14 @@ components: ResourceSync: type: object + description: ResourceSync represents a reference to one or more files in a repository to sync to resource definitions. properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ObjectMeta' spec: @@ -3481,24 +4165,19 @@ components: - kind - metadata - spec - description: ResourceSync represents a reference to one or more files in a repository to sync to resource definitions ResourceSyncSpec: type: object + description: ResourceSyncSpec describes the file(s) to sync from a repository. properties: repository: type: string - description: | - The name of the repository resource to use as the sync source + description: The name of the repository resource to use as the sync source. targetRevision: type: string - description: The desired revision in the repository + description: The desired revision in the repository. path: type: string - description: | - The path of a file or directory in the repository. If a directory, - the directory should contain only resource definitions with no - subdirectories. Each file should contain the definition of one or - more resources. + description: The path of a file or directory in the repository. If a directory, the directory should contain only resource definitions with no subdirectories. Each file should contain the definition of one or more resources. required: - repository - targetRevision @@ -3508,30 +4187,28 @@ components: properties: observedCommit: type: string - description: | - The last commit hash that was synced + description: The last commit hash that was synced. observedGeneration: type: integer format: int64 - description: | - The last generation that was synced + description: The last generation that was synced. conditions: type: array - description: 'Current state of a resourcesync.' + description: Current state of a resourcesync. items: $ref: '#/components/schemas/Condition' required: - conditions - description: ResourceSyncStatus represents information about the status of a resourcesync + description: ResourceSyncStatus represents information about the status of a ResourceSync. ResourceSyncList: type: object properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ListMeta' items: @@ -3549,10 +4226,10 @@ components: properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ObjectMeta' spec: @@ -3570,10 +4247,10 @@ components: properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ListMeta' items: @@ -3617,6 +4294,7 @@ components: successThreshold: $ref: '#/components/schemas/Percentage' limit: + description: The maximum number or percentage of devices to update in the batch. oneOf: - $ref: '#/components/schemas/Percentage' - type: integer @@ -3624,33 +4302,30 @@ components: description: Batch is an element in batch sequence. Duration: type: string - pattern: '^[1-9]\d*[smhd]$' - description: | - The maximum duration allowed for the action to complete. - The duration should be specified as a positive integer - followed by a time unit. Supported time units are: - - 's' for seconds - - 'm' for minutes - - 'h' for hours - - 'd' for days + pattern: '^(?:[1-9]\d*)?\d[smh]$' + description: 'The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.' + default: "0s" BatchSequence: type: object + description: BatchSequence defines the list of batches to be executed in sequence. properties: sequence: type: array + description: A list of batch definitions. minItems: 1 items: $ref: '#/components/schemas/Batch' - description: BatchSequence defines the list of batches to be executed in sequence. RolloutDeviceSelection: type: object + description: Describes how to select devices for rollout. required: - strategy properties: strategy: type: string + description: The rollout strategy to use. oneOf: - $ref: '#/components/schemas/BatchSequence' discriminator: @@ -3671,6 +4346,7 @@ components: FleetSpec: type: object + description: FleetSpec is a description of a fleet's target state. properties: selector: $ref: '#/components/schemas/LabelSelector' @@ -3678,6 +4354,7 @@ components: $ref: '#/components/schemas/RolloutPolicy' template: type: object + description: The template for the devices in the fleet. properties: metadata: $ref: '#/components/schemas/ObjectMeta' @@ -3687,29 +4364,35 @@ components: - spec required: - template - description: FleetSpec is a description of a fleet's target state. RenderedDeviceSpec: type: object + description: RenderedDeviceSpec describes the rendered and self-contained specification of a Device. properties: renderedVersion: type: string + description: Version of the rendered device spec. + updatePolicy: + $ref: '#/components/schemas/DeviceUpdatePolicySpec' os: $ref: '#/components/schemas/DeviceOSSpec' config: type: string + description: The configuration to apply, in Ignition format. applications: type: array + description: The list of applications to deploy. items: $ref: '#/components/schemas/RenderedApplicationSpec' - hooks: - $ref: '#/components/schemas/DeviceHooksSpec' systemd: type: object + description: The systemd services to monitor. properties: matchPatterns: type: array + description: A list of match patterns. items: type: string + description: A single systemd unit name, with or without suffix, or a shell-style glob pattern to match against currently loaded units. resources: type: array description: 'Array of resource monitor configurations.' @@ -3717,43 +4400,16 @@ components: $ref: '#/components/schemas/ResourceMonitor' console: $ref: '#/components/schemas/DeviceConsole' - + decommission: + $ref: '#/components/schemas/DeviceDecommission' required: - renderedVersion - DeviceHooksSpec: - type: object - properties: - beforeUpdating: - type: array - items: - $ref: '#/components/schemas/DeviceUpdateHookSpec' - description: | - Hooks executed before updating allow for custom actions and integration with other systems - or services. These actions occur before configuration changes are applied to the device. - afterUpdating: - type: array - items: - $ref: '#/components/schemas/DeviceUpdateHookSpec' - description: | - Hooks executed after updating enable custom actions and integration with other systems - or services. These actions occur after configuration changes have been applied to the device. - beforeRebooting: - type: array - items: - $ref: '#/components/schemas/DeviceRebootHookSpec' - description: | - Hooks executed before rebooting allow for custom actions and integration with other systems - or services. These actions occur before the device is rebooted. - afterRebooting: - type: array - items: - $ref: '#/components/schemas/DeviceRebootHookSpec' - description: | - Hooks executed after rebooting enable custom actions and integration with other systems - or services. These actions occur after the device has rebooted, allowing for post-reboot tasks. DeviceSpec: type: object + description: DeviceSpec describes a device. properties: + updatePolicy: + $ref: '#/components/schemas/DeviceUpdatePolicySpec' os: $ref: '#/components/schemas/DeviceOSSpec' config: @@ -3761,8 +4417,6 @@ components: description: List of config providers. items: $ref: '#/components/schemas/ConfigProviderSpec' - hooks: - $ref: '#/components/schemas/DeviceHooksSpec' applications: type: array description: List of applications. @@ -3770,11 +4424,14 @@ components: $ref: '#/components/schemas/ApplicationSpec' systemd: type: object + description: The systemd services to monitor. properties: matchPatterns: type: array + description: A list of match patterns. items: type: string + description: A single systemd unit name, with or without suffix, or a shell-style glob pattern to match against currently loaded units. pattern: '^[a-zA-Z0-9:\-_.\\*]*$' # * plus https://github.com/systemd/systemd/blob/9cebda59e818cdb89dc1e53ab5bb51b91b3dc3ff/src/basic/unit-name.c#L42 maxLength: 256 resources: @@ -3784,24 +4441,26 @@ components: $ref: '#/components/schemas/ResourceMonitor' FleetRolloutStatus: type: object + description: FleetRolloutStatus represents information about the status of a fleet rollout. properties: currentBatch: type: integer + description: The batch number currently being rolled out. FleetStatus: type: object + description: FleetStatus represents information about the status of a fleet. Status may trail the actual state of a fleet, especially if devices of a fleet have not contacted the management service in a while. properties: rollout: $ref: '#/components/schemas/FleetRolloutStatus' conditions: type: array - description: 'Current state of the fleet.' + description: Current state of the fleet. items: $ref: '#/components/schemas/Condition' devicesSummary: $ref: '#/components/schemas/DevicesSummary' required: - conditions - description: FleetStatus represents information about the status of a fleet. Status may trail the actual state of a fleet, especially if devices of a fleet have not contacted the management service in a while. DevicesSummary: type: object description: A summary of the devices in the fleet returned when fetching a single Fleet. @@ -3838,10 +4497,10 @@ components: properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ObjectMeta' spec: @@ -3856,6 +4515,7 @@ components: description: TemplateVersion represents a version of a template. TemplateVersionSpec: type: object + description: TemplateVersionSpec describes a version of a device template. properties: fleet: type: string @@ -3863,28 +4523,31 @@ components: required: - fleet TemplateVersionStatus: + description: TemplateVersionStatus represents information about the status of a template version. allOf: - $ref: '#/components/schemas/DeviceSpec' - type: object properties: updatedAt: type: string + description: The time at which the template was last updated. format: date-time conditions: type: array - description: 'Current state of the device.' + description: Current state of the device. items: $ref: '#/components/schemas/Condition' - description: TemplateVersionStatus represents information about the status of a template version. + required: + - conditions TemplateVersionList: type: object properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ListMeta' items: @@ -3903,10 +4566,10 @@ components: properties: authType: type: string - description: 'Auth type' + description: Auth type. authURL: type: string - description: 'Auth URL' + description: Auth URL. required: - authType - authURL @@ -3916,10 +4579,10 @@ components: properties: continue: type: string - description: continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. + description: May be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. remainingItemCount: type: integer - description: remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. + description: The number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. format: int64 description: ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. ObjectMeta: @@ -3927,22 +4590,24 @@ components: properties: creationTimestamp: type: string + description: The time the object was created. format: date-time deletionTimestamp: type: string + description: The time the object will be deleted. format: date-time name: type: string - description: name of the object + description: The name of the object. labels: type: object + description: Map of string keys and values that can be used to organize and categorize (scope and select) objects. additionalProperties: type: string - description: 'Map of string keys and values that can be used to organize and categorize (scope and select) objects.' generation: type: integer - format: int64 description: A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. + format: int64 owner: type: string description: A resource that owns this resource, in "kind/name" format. @@ -3950,7 +4615,7 @@ components: type: object additionalProperties: type: string - description: 'Properties set by the service.' + description: Properties set by the service. resourceVersion: type: string description: An opaque string that identifies the server's internal version of an object. @@ -3960,11 +4625,14 @@ components: properties: key: type: string + description: The label key that the selector applies to. operator: type: string + description: The operation to apply when matching. enum: [In, NotIn, Exists, DoesNotExist] values: type: array + description: The list of values to match. items: type: string required: @@ -3973,21 +4641,22 @@ components: MatchExpressions: type: array + description: A list of match expressions. minItems: 1 items: $ref: '#/components/schemas/MatchExpression' LabelSelector: type: object + description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. Empty/null label selectors match nothing. properties: matchLabels: type: object + description: A map of {key,value} pairs. additionalProperties: type: string matchExpressions: $ref: '#/components/schemas/MatchExpressions' - - description: A map of key,value pairs that are ANDed. Empty/null label selectors match nothing. Status: type: object properties: @@ -3999,7 +4668,7 @@ components: description: A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. status: type: string - description: 'Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status' + description: 'Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.' description: Status is a return value for calls that don't return other objects. Error: required: @@ -4007,7 +4676,7 @@ components: properties: message: type: string - description: Error message + description: Error message. Condition: required: - type @@ -4019,10 +4688,8 @@ components: properties: type: $ref: '#/components/schemas/ConditionType' - description: Type of condition in CamelCase status: $ref: '#/components/schemas/ConditionStatus' - description: Status of the condition, one of True, False, Unknown. observedGeneration: type: integer format: int64 @@ -4036,22 +4703,24 @@ components: description: Human readable message indicating details about last transition. reason: type: string - description: (brief) reason for the condition's last transition. + description: A (brief) reason for the condition's last transition. description: Condition contains details for one aspect of the current state of this API Resource. ConditionType: type: string + description: Type of condition in CamelCase. enum: - - 'Approved' # EnrollmentRequest and CertificateSigningRequest - - 'Denied' # CertificateSigningRequest - - 'Failed' # CertificateSigningRequest - - 'Accessible' # Repository and ResourceSync - - 'ResourceParsed' # ResourceSync - - 'Synced' # ResourceSync - - 'OverlappingSelectors' # Fleet - - 'Valid' # Fleet - - 'Updating' # Device - - 'SpecValid' # Device (service condition) - - 'MultipleOwners' # Device (service condition) + - 'Approved' # EnrollmentRequest and CertificateSigningRequest + - 'Denied' # CertificateSigningRequest + - 'Failed' # CertificateSigningRequest + - 'Accessible' # Repository and ResourceSync + - 'ResourceParsed' # ResourceSync + - 'Synced' # ResourceSync + - 'OverlappingSelectors' # Fleet + - 'Valid' # Fleet + - 'Updating' # Device + - 'SpecValid' # Device (service condition) + - 'MultipleOwners' # Device (service condition) + - 'DeviceDecommissioning' # Device x-enum-varnames: - EnrollmentRequestApproved - CertificateSigningRequestApproved @@ -4066,8 +4735,10 @@ components: - DeviceUpdating - DeviceSpecValid - DeviceMultipleOwners + - DeviceDecommissioning ConditionStatus: type: string + description: Status of the condition, one of True, False, Unknown. enum: - 'True' - 'False' @@ -4081,10 +4752,10 @@ components: properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ObjectMeta' spec: @@ -4095,17 +4766,16 @@ components: - apiVersion - kind - metadata - - spec - description: 'CertificateSigningRequest represents a request for a signed certificate from the CA' + description: 'CertificateSigningRequest represents a request for a signed certificate from the CA.' CertificateSigningRequestList: type: object properties: apiVersion: type: string - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.' kind: type: string - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.' metadata: $ref: '#/components/schemas/ListMeta' items: @@ -4118,12 +4788,12 @@ components: - kind - metadata - items - description: 'CertificateSigningRequestList is a list of CertificateSigningRequest' + description: CertificateSigningRequestList is a list of CertificateSigningRequest. CertificateSigningRequestSpec: - description: 'Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec' + description: Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec. properties: expirationSeconds: - description: 'Requested duration of validity for the certificate' + description: Requested duration of validity for the certificate. format: int32 type: integer extra: @@ -4131,41 +4801,42 @@ components: items: type: string type: array - description: 'Extra attributes of the user that created the CSR, populated by the API server on creation and immutable' + description: Extra attributes of the user that created the CSR, populated by the API server on creation and immutable. type: object request: - description: 'The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource' + description: The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource. format: byte type: string signerName: - description: 'Indicates the requested signer, and is a qualified name' + description: Indicates the requested signer, and is a qualified name. type: string uid: - description: 'UID of the user that created the CSR, populated by the API server on creation and immutable' + description: UID of the user that created the CSR, populated by the API server on creation and immutable. type: string usages: - description: 'Usages specifies a set of key usages requested in the issued certificate.' + description: Usages specifies a set of key usages requested in the issued certificate. items: type: string type: array username: - description: 'Name of the user that created the CSR, populated by the API server on creation and immutable' + description: Name of the user that created the CSR, populated by the API server on creation and immutable. type: string required: - signerName type: object CertificateSigningRequestStatus: - description: 'Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists' + description: Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists. properties: certificate: - description: 'The issued signed certificate, immutable once populated' + description: The issued signed certificate, immutable once populated. format: byte type: string conditions: - description: 'Conditions applied to the request. Known conditions are Approved, Denied, and Failed' + description: Conditions applied to the request. Known conditions are Approved, Denied, and Failed. items: allOf: - $ref: '#/components/schemas/Condition' + default: {} type: array required: - conditions diff --git a/docs/ApplicationEnvVars.md b/docs/ApplicationEnvVars.md index 9cc21e1..691ff3e 100644 --- a/docs/ApplicationEnvVars.md +++ b/docs/ApplicationEnvVars.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime | [optional] +**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. | [optional] ## Example diff --git a/docs/ApplicationSpec.md b/docs/ApplicationSpec.md index a0498d8..c28289c 100644 --- a/docs/ApplicationSpec.md +++ b/docs/ApplicationSpec.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime | [optional] -**name** | **str** | The name of the application | [optional] -**image** | **str** | Reference to the container image for the application package | +**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. | [optional] +**name** | **str** | The name of the application. | [optional] +**image** | **str** | Reference to the container image for the application package. | ## Example diff --git a/docs/ApplicationStatusType.md b/docs/ApplicationStatusType.md index 3b4c340..6bf66d2 100644 --- a/docs/ApplicationStatusType.md +++ b/docs/ApplicationStatusType.md @@ -1,5 +1,6 @@ # ApplicationStatusType +Status of a single application on the device. ## Enum diff --git a/docs/ApplicationsSummaryStatusType.md b/docs/ApplicationsSummaryStatusType.md index 2687644..a419150 100644 --- a/docs/ApplicationsSummaryStatusType.md +++ b/docs/ApplicationsSummaryStatusType.md @@ -1,5 +1,6 @@ # ApplicationsSummaryStatusType +Status of all applications on the device. ## Enum diff --git a/docs/AuthConfig.md b/docs/AuthConfig.md index 496f4fe..60fd9a5 100644 --- a/docs/AuthConfig.md +++ b/docs/AuthConfig.md @@ -6,8 +6,8 @@ Auth config. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**auth_type** | **str** | Auth type | -**auth_url** | **str** | Auth URL | +**auth_type** | **str** | Auth type. | +**auth_url** | **str** | Auth URL. | ## Example diff --git a/docs/AuthenticationApi.md b/docs/AuthenticationApi.md new file mode 100644 index 0000000..f543b15 --- /dev/null +++ b/docs/AuthenticationApi.md @@ -0,0 +1,141 @@ +# flightctl.AuthenticationApi + +All URIs are relative to *http://localhost* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**auth_config**](AuthenticationApi.md#auth_config) | **GET** /api/v1/auth/config | +[**auth_validate**](AuthenticationApi.md#auth_validate) | **GET** /api/v1/auth/validate | + + +# **auth_config** +> AuthConfig auth_config() + + + +Get authentication configuration. + +### Example + + +```python +import flightctl +from flightctl.models.auth_config import AuthConfig +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthenticationApi(api_client) + + try: + api_response = api_instance.auth_config() + print("The response of AuthenticationApi->auth_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AuthenticationApi->auth_config: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**AuthConfig**](AuthConfig.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 | - | +**418** | Auth not configured | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **auth_validate** +> auth_validate(authentication=authentication) + + + +Validate an authentication token. + +### Example + + +```python +import flightctl +from flightctl.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost +# See configuration.py for a list of all supported configuration parameters. +configuration = flightctl.Configuration( + host = "http://localhost" +) + + +# Enter a context with an instance of the API client +with flightctl.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = flightctl.AuthenticationApi(api_client) + authentication = 'authentication_example' # str | The authentication token to validate. (optional) + + try: + api_instance.auth_validate(authentication=authentication) + except Exception as e: + print("Exception when calling AuthenticationApi->auth_validate: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **authentication** | **str**| The authentication token to validate. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Token valid | - | +**401** | Token invalid | - | +**418** | Auth not configured | - | +**500** | InternalServerError | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BatchLimit.md b/docs/BatchLimit.md index 8d31d68..d77fb02 100644 --- a/docs/BatchLimit.md +++ b/docs/BatchLimit.md @@ -1,5 +1,6 @@ # BatchLimit +The maximum number or percentage of devices to update in the batch. ## Properties diff --git a/docs/BatchSequence.md b/docs/BatchSequence.md index 8f7b45d..38cc681 100644 --- a/docs/BatchSequence.md +++ b/docs/BatchSequence.md @@ -6,7 +6,7 @@ BatchSequence defines the list of batches to be executed in sequence. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sequence** | [**List[Batch]**](Batch.md) | | [optional] +**sequence** | [**List[Batch]**](Batch.md) | A list of batch definitions. | [optional] ## Example diff --git a/docs/CPUResourceMonitorSpec.md b/docs/CPUResourceMonitorSpec.md index 424db4d..4b3c23f 100644 --- a/docs/CPUResourceMonitorSpec.md +++ b/docs/CPUResourceMonitorSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**monitor_type** | **str** | | +**monitor_type** | **str** | The type of resource to monitor. | **alert_rules** | [**List[ResourceAlertRule]**](ResourceAlertRule.md) | Array of alert rules. Only one alert per severity is allowed. | **sampling_interval** | **str** | Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours. | diff --git a/docs/CertificateSigningRequest.md b/docs/CertificateSigningRequest.md index ab8630e..6ceee58 100644 --- a/docs/CertificateSigningRequest.md +++ b/docs/CertificateSigningRequest.md @@ -1,15 +1,15 @@ # CertificateSigningRequest -CertificateSigningRequest represents a request for a signed certificate from the CA +CertificateSigningRequest represents a request for a signed certificate from the CA. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ObjectMeta**](ObjectMeta.md) | | -**spec** | [**CertificateSigningRequestSpec**](CertificateSigningRequestSpec.md) | | +**spec** | [**CertificateSigningRequestSpec**](CertificateSigningRequestSpec.md) | | [optional] **status** | [**CertificateSigningRequestStatus**](CertificateSigningRequestStatus.md) | | [optional] ## Example diff --git a/docs/CertificateSigningRequestList.md b/docs/CertificateSigningRequestList.md index 6498ab5..b1379a9 100644 --- a/docs/CertificateSigningRequestList.md +++ b/docs/CertificateSigningRequestList.md @@ -1,13 +1,13 @@ # CertificateSigningRequestList -CertificateSigningRequestList is a list of CertificateSigningRequest +CertificateSigningRequestList is a list of CertificateSigningRequest. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ListMeta**](ListMeta.md) | | **items** | [**List[CertificateSigningRequest]**](CertificateSigningRequest.md) | List of CertificateSigningRequest. | diff --git a/docs/CertificateSigningRequestSpec.md b/docs/CertificateSigningRequestSpec.md index 0e0c128..e656208 100644 --- a/docs/CertificateSigningRequestSpec.md +++ b/docs/CertificateSigningRequestSpec.md @@ -1,18 +1,18 @@ # CertificateSigningRequestSpec -Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec +Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**expiration_seconds** | **int** | Requested duration of validity for the certificate | [optional] -**extra** | **Dict[str, List[str]]** | Extra attributes of the user that created the CSR, populated by the API server on creation and immutable | [optional] -**request** | **bytearray** | The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource | [optional] -**signer_name** | **str** | Indicates the requested signer, and is a qualified name | -**uid** | **str** | UID of the user that created the CSR, populated by the API server on creation and immutable | [optional] +**expiration_seconds** | **int** | Requested duration of validity for the certificate. | [optional] +**extra** | **Dict[str, List[str]]** | Extra attributes of the user that created the CSR, populated by the API server on creation and immutable. | [optional] +**request** | **bytearray** | The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource. | [optional] +**signer_name** | **str** | Indicates the requested signer, and is a qualified name. | +**uid** | **str** | UID of the user that created the CSR, populated by the API server on creation and immutable. | [optional] **usages** | **List[str]** | Usages specifies a set of key usages requested in the issued certificate. | [optional] -**username** | **str** | Name of the user that created the CSR, populated by the API server on creation and immutable | [optional] +**username** | **str** | Name of the user that created the CSR, populated by the API server on creation and immutable. | [optional] ## Example diff --git a/docs/CertificateSigningRequestStatus.md b/docs/CertificateSigningRequestStatus.md index de61ac9..145b102 100644 --- a/docs/CertificateSigningRequestStatus.md +++ b/docs/CertificateSigningRequestStatus.md @@ -1,13 +1,13 @@ # CertificateSigningRequestStatus -Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists +Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**certificate** | **bytearray** | The issued signed certificate, immutable once populated | [optional] -**conditions** | [**List[Condition]**](Condition.md) | Conditions applied to the request. Known conditions are Approved, Denied, and Failed | +**certificate** | **bytearray** | The issued signed certificate, immutable once populated. | [optional] +**conditions** | [**List[Condition]**](Condition.md) | Conditions applied to the request. Known conditions are Approved, Denied, and Failed. | ## Example diff --git a/docs/CertificatesigningrequestApi.md b/docs/CertificatesigningrequestApi.md index cc91890..c0ac7dd 100644 --- a/docs/CertificatesigningrequestApi.md +++ b/docs/CertificatesigningrequestApi.md @@ -4,21 +4,97 @@ All URIs are relative to *http://localhost* Method | HTTP request | Description ------------- | ------------- | ------------- +[**approve_certificate_signing_request**](CertificatesigningrequestApi.md#approve_certificate_signing_request) | **POST** /api/v1/certificatesigningrequests/{name}/approval | [**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 | +[**deny_certificate_signing_request**](CertificatesigningrequestApi.md#deny_certificate_signing_request) | **DELETE** /api/v1/certificatesigningrequests/{name}/approval | [**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} | [**read_certificate_signing_request**](CertificatesigningrequestApi.md#read_certificate_signing_request) | **GET** /api/v1/certificatesigningrequests/{name} | [**replace_certificate_signing_request**](CertificatesigningrequestApi.md#replace_certificate_signing_request) | **PUT** /api/v1/certificatesigningrequests/{name} | +# **approve_certificate_signing_request** +> CertificateSigningRequest approve_certificate_signing_request(name) + + + +approve the specified CertificateSigningRequest + +### Example + + +```python +import flightctl +from flightctl.models.certificate_signing_request import CertificateSigningRequest +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) + name = 'name_example' # str | The name of the CertificateSigningRequest resource to approve or deny. + + try: + api_response = api_instance.approve_certificate_signing_request(name) + print("The response of CertificatesigningrequestApi->approve_certificate_signing_request:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CertificatesigningrequestApi->approve_certificate_signing_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the CertificateSigningRequest resource to approve or deny. | + +### Return type + +[**CertificateSigningRequest**](CertificateSigningRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | NotFound | - | +**409** | StatusConflict | - | +**500** | InternalServerError | - | +**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) + # **create_certificate_signing_request** > CertificateSigningRequest create_certificate_signing_request(certificate_signing_request) -request Certificate Signing +Create a CertificateSigningRequest resource. ### Example @@ -76,12 +152,11 @@ No authorization required | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK | - | **201** | Created | - | -**202** | Accepted | - | -**208** | Already Reported | - | **400** | Bad Request | - | **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) @@ -112,7 +187,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.CertificatesigningrequestApi(api_client) - name = 'name_example' # str | name of the Certificate Signing Request + name = 'name_example' # str | The name of the CertificateSigningRequest resource to delete. try: api_response = api_instance.delete_certificate_signing_request(name) @@ -129,7 +204,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Certificate Signing Request | + **name** | **str**| The name of the CertificateSigningRequest resource to delete. | ### Return type @@ -150,7 +225,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -159,7 +236,7 @@ No authorization required -delete a collection of CertificateSigningRequest +Delete CertificateSigningRequest resources. ### Example @@ -215,15 +292,89 @@ No authorization required |-------------|-------------|------------------| **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) + +# **deny_certificate_signing_request** +> CertificateSigningRequest deny_certificate_signing_request(name) + + + +deny the specified CertificateSigningRequest + +### Example + + +```python +import flightctl +from flightctl.models.certificate_signing_request import CertificateSigningRequest +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) + name = 'name_example' # str | The name of the CertificateSigningRequest resource to delete. + + try: + api_response = api_instance.deny_certificate_signing_request(name) + print("The response of CertificatesigningrequestApi->deny_certificate_signing_request:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling CertificatesigningrequestApi->deny_certificate_signing_request: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the CertificateSigningRequest resource to delete. | + +### Return type + +[**CertificateSigningRequest**](CertificateSigningRequest.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | NotFound | - | +**409** | Conflict | - | +**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) # **list_certificate_signing_requests** -> CertificateSigningRequestList list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, sort_by=sort_by, sort_order=sort_order) +> CertificateSigningRequestList list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -list CertificateSigningRequests +List CertificateSigningRequest resources. ### Example @@ -231,7 +382,6 @@ list CertificateSigningRequests ```python import flightctl from flightctl.models.certificate_signing_request_list import CertificateSigningRequestList -from flightctl.models.sort_order import SortOrder from flightctl.rest import ApiException from pprint import pprint @@ -248,13 +398,11 @@ with flightctl.ApiClient(configuration) as api_client: api_instance = flightctl.CertificatesigningrequestApi(api_client) var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) - sort_by = 'metadata.name' # str | Specifies the field to sort by. (optional) - sort_order = Asc # SortOrder | Specifies the sort order. (optional) (default to Asc) try: - api_response = api_instance.list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, sort_by=sort_by, sort_order=sort_order) + api_response = api_instance.list_certificate_signing_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) print("The response of CertificatesigningrequestApi->list_certificate_signing_requests:\n") pprint(api_response) except Exception as e: @@ -270,10 +418,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] - **sort_by** | **str**| Specifies the field to sort by. | [optional] - **sort_order** | [**SortOrder**](.md)| Specifies the sort order. | [optional] [default to Asc] ### Return type @@ -295,6 +441,8 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **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) @@ -303,7 +451,7 @@ No authorization required -partially update the specified CertificateSigningRequest +Patch a CertificateSigningRequest resource. ### Example @@ -326,7 +474,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.CertificatesigningrequestApi(api_client) - name = 'name_example' # str | name of the certificatesigningrequest + name = 'name_example' # str | The name of the CertificateSigningRequest resource to patch. patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | (optional) try: @@ -344,7 +492,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the certificatesigningrequest | + **name** | **str**| The name of the CertificateSigningRequest resource to patch. | **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | [optional] ### Return type @@ -369,7 +517,9 @@ No authorization required **400** | Bad Request | - | **401** | Unauthorized | - | **404** | NotFound | - | +**403** | Forbidden | - | **409** | Conflict | - | +**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) @@ -400,7 +550,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.CertificatesigningrequestApi(api_client) - name = 'name_example' # str | the device identifier of the CertificateSigningRequest + name = 'name_example' # str | The name of the CertificateSigningRequest resource to get. try: api_response = api_instance.read_certificate_signing_request(name) @@ -417,7 +567,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| the device identifier of the CertificateSigningRequest | + **name** | **str**| The name of the CertificateSigningRequest resource to get. | ### Return type @@ -438,7 +588,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -469,7 +621,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.CertificatesigningrequestApi(api_client) - name = 'name_example' # str | name of the CertificateSigningRequest + name = 'name_example' # str | The name of the CertificateSigningRequest resource to update. certificate_signing_request = flightctl.CertificateSigningRequest() # CertificateSigningRequest | try: @@ -487,7 +639,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the CertificateSigningRequest | + **name** | **str**| The name of the CertificateSigningRequest resource to update. | **certificate_signing_request** | [**CertificateSigningRequest**](CertificateSigningRequest.md)| | ### Return type @@ -511,8 +663,10 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | Conflict | - | +**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) diff --git a/docs/Condition.md b/docs/Condition.md index ff2337f..dacef2b 100644 --- a/docs/Condition.md +++ b/docs/Condition.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **observed_generation** | **int** | The .metadata.generation that the condition was set based upon. | [optional] **last_transition_time** | **datetime** | The last time the condition transitioned from one status to another. | **message** | **str** | Human readable message indicating details about last transition. | -**reason** | **str** | (brief) reason for the condition's last transition. | +**reason** | **str** | A (brief) reason for the condition's last transition. | ## Example diff --git a/docs/ConditionStatus.md b/docs/ConditionStatus.md index 1ee207a..118c906 100644 --- a/docs/ConditionStatus.md +++ b/docs/ConditionStatus.md @@ -1,5 +1,6 @@ # ConditionStatus +Status of the condition, one of True, False, Unknown. ## Enum diff --git a/docs/ConditionType.md b/docs/ConditionType.md index 1de6030..6db7fe3 100644 --- a/docs/ConditionType.md +++ b/docs/ConditionType.md @@ -1,5 +1,6 @@ # ConditionType +Type of condition in CamelCase. ## Enum @@ -25,6 +26,8 @@ * `MULTIPLEOWNERS` (value: `'MultipleOwners'`) +* `DEVICEDECOMMISSIONING` (value: `'DeviceDecommissioning'`) + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ConfigProviderSpec.md b/docs/ConfigProviderSpec.md index 5710289..c121b60 100644 --- a/docs/ConfigProviderSpec.md +++ b/docs/ConfigProviderSpec.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | The name of the config provider | +**name** | **str** | The name of the config provider. | **git_ref** | [**GitConfigProviderSpecGitRef**](GitConfigProviderSpecGitRef.md) | | **secret_ref** | [**KubernetesSecretProviderSpecSecretRef**](KubernetesSecretProviderSpecSecretRef.md) | | -**inline** | [**List[FileSpec]**](FileSpec.md) | | +**inline** | [**List[FileSpec]**](FileSpec.md) | A list of files to create on the device. | **http_ref** | [**HttpConfigProviderSpecHttpRef**](HttpConfigProviderSpecHttpRef.md) | | ## Example diff --git a/docs/CustomResourceMonitorSpec.md b/docs/CustomResourceMonitorSpec.md index c640dde..07a512e 100644 --- a/docs/CustomResourceMonitorSpec.md +++ b/docs/CustomResourceMonitorSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**monitor_type** | **str** | | +**monitor_type** | **str** | The type of resource to monitor. | **alert_rules** | [**List[ResourceAlertRule]**](ResourceAlertRule.md) | Array of alert rules. Only one alert per severity is allowed. | **sampling_interval** | **str** | Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours. | diff --git a/docs/Device.md b/docs/Device.md index a91fdfe..c693bf6 100644 --- a/docs/Device.md +++ b/docs/Device.md @@ -6,8 +6,8 @@ Device represents a physical device. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ObjectMeta**](ObjectMeta.md) | | **spec** | [**DeviceSpec**](DeviceSpec.md) | | [optional] **status** | [**DeviceStatus**](DeviceStatus.md) | | [optional] diff --git a/docs/DeviceApi.md b/docs/DeviceApi.md index 2c9f34d..9859f17 100644 --- a/docs/DeviceApi.md +++ b/docs/DeviceApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost* 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_rendered_device_spec**](DeviceApi.md#get_rendered_device_spec) | **GET** /api/v1/devices/{name}/rendered | @@ -22,7 +23,7 @@ Method | HTTP request | Description -create a Device +Create a Device resource. ### Example @@ -83,7 +84,84 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **409** | StatusConflict | - | +**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) + +# **decommission_device** +> Device decommission_device(name, device_decommission) + + + +schedule the device to decommission + +### Example + + +```python +import flightctl +from flightctl.models.device import Device +from flightctl.models.device_decommission import DeviceDecommission +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) + name = 'name_example' # str | The name of the Device resource to decommission. + device_decommission = flightctl.DeviceDecommission() # DeviceDecommission | + + try: + api_response = api_instance.decommission_device(name, device_decommission) + print("The response of DeviceApi->decommission_device:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DeviceApi->decommission_device: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of the Device resource to decommission. | + **device_decommission** | [**DeviceDecommission**](DeviceDecommission.md)| | + +### Return type + +[**Device**](Device.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | NotFound | - | +**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) @@ -92,7 +170,7 @@ No authorization required -delete a Device +Delete a Device resource. ### Example @@ -114,7 +192,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | name of the Device + name = 'name_example' # str | The name of the Device resource to delete. try: api_response = api_instance.delete_device(name) @@ -131,7 +209,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Device | + **name** | **str**| The name of the Device resource to delete. | ### Return type @@ -152,7 +230,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -161,7 +241,7 @@ No authorization required -delete a collection of Devices +Delete Device resources. ### Example @@ -217,6 +297,8 @@ No authorization required |-------------|-------------|------------------| **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) @@ -225,7 +307,7 @@ No authorization required -get the full specification for the specified device +Get the rendered, self-contained device specification for a Device resource. ### Example @@ -247,8 +329,8 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | Name of the device - known_rendered_version = 'known_rendered_version_example' # str | The last known renderedVersion (optional) + name = 'name_example' # str | The name of the Device resource to get the rendered device specification for. + known_rendered_version = 'known_rendered_version_example' # str | The last known renderedVersion. (optional) try: api_response = api_instance.get_rendered_device_spec(name, known_rendered_version=known_rendered_version) @@ -265,8 +347,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| Name of the device | - **known_rendered_version** | **str**| The last known renderedVersion | [optional] + **name** | **str**| The name of the Device resource to get the rendered device specification for. | + **known_rendered_version** | **str**| The last known renderedVersion. | [optional] ### Return type @@ -288,17 +370,19 @@ No authorization required **200** | OK | - | **204** | No content | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | StatusConflict | - | +**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) # **list_devices** -> DeviceList list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, status_filter=status_filter, limit=limit, owner=owner, summary_only=summary_only, sort_by=sort_by, sort_order=sort_order) +> DeviceList list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, status_filter=status_filter, limit=limit, owner=owner, summary_only=summary_only) -list Devices +List Device resources. ### Example @@ -306,7 +390,6 @@ list Devices ```python import flightctl from flightctl.models.device_list import DeviceList -from flightctl.models.sort_order import SortOrder from flightctl.rest import ApiException from pprint import pprint @@ -323,16 +406,14 @@ with flightctl.ApiClient(configuration) as api_client: api_instance = flightctl.DeviceApi(api_client) var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) status_filter = ['status_filter_example'] # List[str] | A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything. (optional) limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) owner = 'owner_example' # str | A selector to restrict the list of returned objects by their owner. Defaults to everything. (optional) summary_only = True # bool | A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. (optional) - sort_by = 'metadata.name' # str | Specifies the field to sort by. (optional) - sort_order = Asc # SortOrder | Specifies the sort order. (optional) (default to Asc) try: - api_response = api_instance.list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, status_filter=status_filter, limit=limit, owner=owner, summary_only=summary_only, sort_by=sort_by, sort_order=sort_order) + api_response = api_instance.list_devices(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, status_filter=status_filter, limit=limit, owner=owner, summary_only=summary_only) print("The response of DeviceApi->list_devices:\n") pprint(api_response) except Exception as e: @@ -348,13 +429,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] **status_filter** | [**List[str]**](str.md)| A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything. | [optional] **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] **owner** | **str**| A selector to restrict the list of returned objects by their owner. Defaults to everything. | [optional] **summary_only** | **bool**| A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. | [optional] - **sort_by** | **str**| Specifies the field to sort by. | [optional] - **sort_order** | [**SortOrder**](.md)| Specifies the sort order. | [optional] [default to Asc] ### Return type @@ -377,6 +456,7 @@ No authorization required **400** | Bad Request | - | **401** | Unauthorized | - | **403** | Not allowed | - | +**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) @@ -385,7 +465,7 @@ No authorization required -Patches the specified device +Patch a Device resource. ### Example @@ -408,7 +488,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | name of the device + name = 'name_example' # str | The name of the Device resource to patch. patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | (optional) try: @@ -426,7 +506,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the device | + **name** | **str**| The name of the Device resource to patch. | **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | [optional] ### Return type @@ -449,8 +529,10 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | StatusConflict | - | +**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) @@ -459,7 +541,7 @@ No authorization required -read the specified Device +Get a Device resource. ### Example @@ -481,7 +563,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | unique name of the Device + name = 'name_example' # str | The name of the Device resource to get. try: api_response = api_instance.read_device(name) @@ -498,7 +580,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| unique name of the Device | + **name** | **str**| The name of the Device resource to get. | ### Return type @@ -519,7 +601,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -528,7 +612,7 @@ No authorization required -read status of the specified Device +Get the status of a Device resource. ### Example @@ -550,7 +634,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | name of the Device + name = 'name_example' # str | The name of the Device resource to get. try: api_response = api_instance.read_device_status(name) @@ -567,7 +651,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Device | + **name** | **str**| The name of the Device resource to get. | ### Return type @@ -588,7 +672,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -597,7 +683,7 @@ No authorization required -replace the specified Device +Update a Device resource. ### Example @@ -619,7 +705,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | name of the Device + name = 'name_example' # str | The name of the Device resource to update. device = flightctl.Device() # Device | try: @@ -637,7 +723,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Device | + **name** | **str**| The name of the Device resource to update. | **device** | [**Device**](Device.md)| | ### Return type @@ -661,8 +747,10 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | StatusConflict | - | +**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) @@ -671,7 +759,7 @@ No authorization required -replace status of the specified Device +Update the status of a Device resource. ### Example @@ -693,7 +781,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | name of the Device + name = 'name_example' # str | The name of the Device resource to update. device = flightctl.Device() # Device | try: @@ -711,7 +799,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Device | + **name** | **str**| The name of the Device resource to update. | **device** | [**Device**](Device.md)| | ### Return type @@ -734,7 +822,9 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -765,7 +855,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.DeviceApi(api_client) - name = 'name_example' # str | unique name of the Device + name = 'name_example' # str | The name of the Device resource to create a console connection to. try: api_response = api_instance.request_console(name) @@ -782,7 +872,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| unique name of the Device | + **name** | **str**| The name of the Device resource to create a console connection to. | ### Return type @@ -803,8 +893,10 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | StatusConflict | - | +**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) diff --git a/docs/DeviceApplicationsSummaryStatus.md b/docs/DeviceApplicationsSummaryStatus.md index af0a5e5..3e35eea 100644 --- a/docs/DeviceApplicationsSummaryStatus.md +++ b/docs/DeviceApplicationsSummaryStatus.md @@ -1,12 +1,13 @@ # DeviceApplicationsSummaryStatus +A summary of the health of applications on the device. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | [**ApplicationsSummaryStatusType**](ApplicationsSummaryStatusType.md) | | -**info** | **str** | Human readable information detailing the last system application transition. | [optional] +**info** | **str** | Human readable information detailing the last application transition. | [optional] ## Example diff --git a/docs/DeviceConfigStatus.md b/docs/DeviceConfigStatus.md index 86a7ccc..b06955c 100644 --- a/docs/DeviceConfigStatus.md +++ b/docs/DeviceConfigStatus.md @@ -1,5 +1,6 @@ # DeviceConfigStatus +Current status of the device config. ## Properties diff --git a/docs/DeviceConsole.md b/docs/DeviceConsole.md index 1bdfb9a..1defa66 100644 --- a/docs/DeviceConsole.md +++ b/docs/DeviceConsole.md @@ -1,12 +1,13 @@ # DeviceConsole +DeviceConsole represents the console connection information. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**g_rpc_endpoint** | **str** | | -**session_id** | **str** | | +**g_rpc_endpoint** | **str** | The gRPC endpoint for the console connection. | +**session_id** | **str** | The session ID for the console connection. | ## Example diff --git a/docs/DeviceDecommission.md b/docs/DeviceDecommission.md new file mode 100644 index 0000000..2e799ed --- /dev/null +++ b/docs/DeviceDecommission.md @@ -0,0 +1,30 @@ +# DeviceDecommission + +Metadata about a device decommissioning request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**target** | [**DeviceDecommissionTargetType**](DeviceDecommissionTargetType.md) | | + +## Example + +```python +from flightctl.models.device_decommission import DeviceDecommission + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceDecommission from a JSON string +device_decommission_instance = DeviceDecommission.from_json(json) +# print the JSON string representation of the object +print(DeviceDecommission.to_json()) + +# convert the object into a dict +device_decommission_dict = device_decommission_instance.to_dict() +# create an instance of DeviceDecommission from a dict +device_decommission_from_dict = DeviceDecommission.from_dict(device_decommission_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/DeviceDecommissionTargetType.md b/docs/DeviceDecommissionTargetType.md new file mode 100644 index 0000000..dba308d --- /dev/null +++ b/docs/DeviceDecommissionTargetType.md @@ -0,0 +1,13 @@ +# DeviceDecommissionTargetType + +Specifies the desired decommissioning method of the device. + +## Enum + +* `UNENROLL` (value: `'Unenroll'`) + +* `FACTORYRESET` (value: `'FactoryReset'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeviceIntegrityStatus.md b/docs/DeviceIntegrityStatus.md index a737825..9ce8745 100644 --- a/docs/DeviceIntegrityStatus.md +++ b/docs/DeviceIntegrityStatus.md @@ -1,5 +1,6 @@ # DeviceIntegrityStatus +Status of device integrity. ## Properties diff --git a/docs/DeviceIntegrityStatusSummary.md b/docs/DeviceIntegrityStatusSummary.md index 8121a2e..71264b7 100644 --- a/docs/DeviceIntegrityStatusSummary.md +++ b/docs/DeviceIntegrityStatusSummary.md @@ -1,5 +1,6 @@ # DeviceIntegrityStatusSummary +Summary status of the integrity of the device. ## Properties diff --git a/docs/DeviceIntegrityStatusSummaryType.md b/docs/DeviceIntegrityStatusSummaryType.md index 4d3159d..fdd8334 100644 --- a/docs/DeviceIntegrityStatusSummaryType.md +++ b/docs/DeviceIntegrityStatusSummaryType.md @@ -1,5 +1,6 @@ # DeviceIntegrityStatusSummaryType +Status of the integrity of the device. ## Enum diff --git a/docs/DeviceLifecycleHookType.md b/docs/DeviceLifecycleHookType.md new file mode 100644 index 0000000..f3e0c01 --- /dev/null +++ b/docs/DeviceLifecycleHookType.md @@ -0,0 +1,16 @@ +# DeviceLifecycleHookType + + +## Enum + +* `BEFOREUPDATING` (value: `'BeforeUpdating'`) + +* `AFTERUPDATING` (value: `'AfterUpdating'`) + +* `BEFOREREBOOTING` (value: `'BeforeRebooting'`) + +* `AFTERREBOOTING` (value: `'AfterRebooting'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeviceLifecycleStatus.md b/docs/DeviceLifecycleStatus.md new file mode 100644 index 0000000..33dc2ce --- /dev/null +++ b/docs/DeviceLifecycleStatus.md @@ -0,0 +1,31 @@ +# DeviceLifecycleStatus + +Current status of the device lifecycle. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**DeviceLifecycleStatusType**](DeviceLifecycleStatusType.md) | | +**info** | **str** | Human readable information about the device lifecycle status. | [optional] + +## Example + +```python +from flightctl.models.device_lifecycle_status import DeviceLifecycleStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceLifecycleStatus from a JSON string +device_lifecycle_status_instance = DeviceLifecycleStatus.from_json(json) +# print the JSON string representation of the object +print(DeviceLifecycleStatus.to_json()) + +# convert the object into a dict +device_lifecycle_status_dict = device_lifecycle_status_instance.to_dict() +# create an instance of DeviceLifecycleStatus from a dict +device_lifecycle_status_from_dict = DeviceLifecycleStatus.from_dict(device_lifecycle_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/DeviceLifecycleStatusType.md b/docs/DeviceLifecycleStatusType.md new file mode 100644 index 0000000..707cef0 --- /dev/null +++ b/docs/DeviceLifecycleStatusType.md @@ -0,0 +1,17 @@ +# DeviceLifecycleStatusType + +Status type of the device lifecycle. + +## Enum + +* `UNKNOWN` (value: `'Unknown'`) + +* `ENROLLED` (value: `'Enrolled'`) + +* `DECOMMISSIONING` (value: `'Decommissioning'`) + +* `DECOMMISSIONED` (value: `'Decommissioned'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeviceList.md b/docs/DeviceList.md index d52f6e6..2890764 100644 --- a/docs/DeviceList.md +++ b/docs/DeviceList.md @@ -6,8 +6,8 @@ DeviceList is a list of Devices. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ListMeta**](ListMeta.md) | | **items** | [**List[Device]**](Device.md) | List of Devices. | **summary** | [**DevicesSummary**](DevicesSummary.md) | | [optional] diff --git a/docs/DeviceOSSpec.md b/docs/DeviceOSSpec.md index 517933b..a749969 100644 --- a/docs/DeviceOSSpec.md +++ b/docs/DeviceOSSpec.md @@ -1,11 +1,12 @@ # DeviceOSSpec +DeviceOSSpec describes the target OS for the device. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**image** | **str** | ostree image name or URL. | +**image** | **str** | The target OS image name or URL. | ## Example diff --git a/docs/DeviceOSStatus.md b/docs/DeviceOSStatus.md index 60f5707..d076a36 100644 --- a/docs/DeviceOSStatus.md +++ b/docs/DeviceOSStatus.md @@ -1,12 +1,13 @@ # DeviceOSStatus +Current status of the device OS. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **image** | **str** | Version of the OS image. | -**image_digest** | **str** | The digest of the OS image (e.g. sha256:a0...) | +**image_digest** | **str** | The digest of the OS image (e.g. sha256:a0...). | ## Example diff --git a/docs/DeviceResourceStatus.md b/docs/DeviceResourceStatus.md index c08b323..15d9d3e 100644 --- a/docs/DeviceResourceStatus.md +++ b/docs/DeviceResourceStatus.md @@ -1,5 +1,6 @@ # DeviceResourceStatus +Current status of the resources of the device. ## Properties diff --git a/docs/DeviceResourceStatusType.md b/docs/DeviceResourceStatusType.md index a169316..213859d 100644 --- a/docs/DeviceResourceStatusType.md +++ b/docs/DeviceResourceStatusType.md @@ -1,5 +1,6 @@ # DeviceResourceStatusType +The types of resource statuses. ## Enum diff --git a/docs/DeviceSpec.md b/docs/DeviceSpec.md index 7fcd563..5cf68dd 100644 --- a/docs/DeviceSpec.md +++ b/docs/DeviceSpec.md @@ -1,13 +1,14 @@ # DeviceSpec +DeviceSpec describes a device. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**update_policy** | [**DeviceUpdatePolicySpec**](DeviceUpdatePolicySpec.md) | | [optional] **os** | [**DeviceOSSpec**](DeviceOSSpec.md) | | [optional] **config** | [**List[ConfigProviderSpec]**](ConfigProviderSpec.md) | List of config providers. | [optional] -**hooks** | [**DeviceHooksSpec**](DeviceHooksSpec.md) | | [optional] **applications** | [**List[ApplicationSpec]**](ApplicationSpec.md) | List of applications. | [optional] **systemd** | [**DeviceSpecSystemd**](DeviceSpecSystemd.md) | | [optional] **resources** | [**List[ResourceMonitor]**](ResourceMonitor.md) | Array of resource monitor configurations. | [optional] diff --git a/docs/DeviceSpecSystemd.md b/docs/DeviceSpecSystemd.md index 71df32c..f379481 100644 --- a/docs/DeviceSpecSystemd.md +++ b/docs/DeviceSpecSystemd.md @@ -1,11 +1,12 @@ # DeviceSpecSystemd +The systemd services to monitor. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**match_patterns** | **List[str]** | | [optional] +**match_patterns** | **List[str]** | A list of match patterns. | [optional] ## Example diff --git a/docs/DeviceStatus.md b/docs/DeviceStatus.md index 0a5b7df..fd07788 100644 --- a/docs/DeviceStatus.md +++ b/docs/DeviceStatus.md @@ -16,7 +16,8 @@ Name | Type | Description | Notes **os** | [**DeviceOSStatus**](DeviceOSStatus.md) | | **updated** | [**DeviceUpdatedStatus**](DeviceUpdatedStatus.md) | | **summary** | [**DeviceSummaryStatus**](DeviceSummaryStatus.md) | | -**last_seen** | **datetime** | | +**last_seen** | **datetime** | The last time the device was seen by the service. | +**lifecycle** | [**DeviceLifecycleStatus**](DeviceLifecycleStatus.md) | | ## Example diff --git a/docs/DeviceSummaryStatus.md b/docs/DeviceSummaryStatus.md index 2e904f6..c0e362e 100644 --- a/docs/DeviceSummaryStatus.md +++ b/docs/DeviceSummaryStatus.md @@ -1,5 +1,6 @@ # DeviceSummaryStatus +A summary of the health of the device hardware and operating system resources. ## Properties diff --git a/docs/DeviceSummaryStatusType.md b/docs/DeviceSummaryStatusType.md index 7f27f27..895f126 100644 --- a/docs/DeviceSummaryStatusType.md +++ b/docs/DeviceSummaryStatusType.md @@ -1,5 +1,6 @@ # DeviceSummaryStatusType +Status of the device. ## Enum diff --git a/docs/DeviceUpdatePolicySpec.md b/docs/DeviceUpdatePolicySpec.md new file mode 100644 index 0000000..e89bd24 --- /dev/null +++ b/docs/DeviceUpdatePolicySpec.md @@ -0,0 +1,31 @@ +# DeviceUpdatePolicySpec + +Specifies the policy for managing device updates, including when updates should be downloaded and applied. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**download_schedule** | [**UpdateSchedule**](UpdateSchedule.md) | | [optional] +**update_schedule** | [**UpdateSchedule**](UpdateSchedule.md) | | [optional] + +## Example + +```python +from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec + +# TODO update the JSON string below +json = "{}" +# create an instance of DeviceUpdatePolicySpec from a JSON string +device_update_policy_spec_instance = DeviceUpdatePolicySpec.from_json(json) +# print the JSON string representation of the object +print(DeviceUpdatePolicySpec.to_json()) + +# convert the object into a dict +device_update_policy_spec_dict = device_update_policy_spec_instance.to_dict() +# create an instance of DeviceUpdatePolicySpec from a dict +device_update_policy_spec_from_dict = DeviceUpdatePolicySpec.from_dict(device_update_policy_spec_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeviceUpdatedStatus.md b/docs/DeviceUpdatedStatus.md index de1ca9f..10b6412 100644 --- a/docs/DeviceUpdatedStatus.md +++ b/docs/DeviceUpdatedStatus.md @@ -1,5 +1,6 @@ # DeviceUpdatedStatus +Current status of the device update. ## Properties diff --git a/docs/DeviceUpdatedStatusType.md b/docs/DeviceUpdatedStatusType.md index 9a598f0..ea50570 100644 --- a/docs/DeviceUpdatedStatusType.md +++ b/docs/DeviceUpdatedStatusType.md @@ -1,5 +1,6 @@ # DeviceUpdatedStatusType +Status type of the device update. ## Enum diff --git a/docs/DiskResourceMonitorSpec.md b/docs/DiskResourceMonitorSpec.md index 0e64f20..58da5fa 100644 --- a/docs/DiskResourceMonitorSpec.md +++ b/docs/DiskResourceMonitorSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**monitor_type** | **str** | | +**monitor_type** | **str** | The type of resource to monitor. | **alert_rules** | [**List[ResourceAlertRule]**](ResourceAlertRule.md) | Array of alert rules. Only one alert per severity is allowed. | **sampling_interval** | **str** | Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours. | **path** | **str** | The directory path to monitor for disk usage. | diff --git a/docs/EnrollmentConfig.md b/docs/EnrollmentConfig.md index 7ae5d69..54dfaf0 100644 --- a/docs/EnrollmentConfig.md +++ b/docs/EnrollmentConfig.md @@ -6,7 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **enrollment_service** | [**EnrollmentService**](EnrollmentService.md) | | -**grpc_management_endpoint** | **str** | | ## Example diff --git a/docs/EnrollmentRequest.md b/docs/EnrollmentRequest.md index 84541d9..f01faa5 100644 --- a/docs/EnrollmentRequest.md +++ b/docs/EnrollmentRequest.md @@ -6,8 +6,8 @@ EnrollmentRequest represents a request for approval to enroll a device. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ObjectMeta**](ObjectMeta.md) | | **spec** | [**EnrollmentRequestSpec**](EnrollmentRequestSpec.md) | | **status** | [**EnrollmentRequestStatus**](EnrollmentRequestStatus.md) | | [optional] diff --git a/docs/EnrollmentRequestApproval.md b/docs/EnrollmentRequestApproval.md index 07ccfe2..f2a110a 100644 --- a/docs/EnrollmentRequestApproval.md +++ b/docs/EnrollmentRequestApproval.md @@ -1,14 +1,15 @@ # EnrollmentRequestApproval +EnrollmentRequestApproval contains information about the approval of a device enrollment request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**labels** | **Dict[str, str]** | labels is a set of labels to apply to the device. | [optional] -**approved** | **bool** | approved indicates whether the request has been approved. | -**approved_by** | **str** | approvedBy is the name of the approver. | [optional] -**approved_at** | **datetime** | approvedAt is the time at which the request was approved. | [optional] +**labels** | **Dict[str, str]** | A set of labels to apply to the device. | [optional] +**approved** | **bool** | Indicates whether the request has been approved. | +**approved_by** | **str** | The name of the approver. | [optional] +**approved_at** | **datetime** | The time at which the request was approved. | [optional] ## Example diff --git a/docs/EnrollmentRequestList.md b/docs/EnrollmentRequestList.md index c942079..4a9b172 100644 --- a/docs/EnrollmentRequestList.md +++ b/docs/EnrollmentRequestList.md @@ -6,8 +6,8 @@ EnrollmentRequestList is a list of EnrollmentRequest. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ListMeta**](ListMeta.md) | | **items** | [**List[EnrollmentRequest]**](EnrollmentRequest.md) | List of EnrollmentRequest. | diff --git a/docs/EnrollmentRequestSpec.md b/docs/EnrollmentRequestSpec.md index bc09c91..eb3611d 100644 --- a/docs/EnrollmentRequestSpec.md +++ b/docs/EnrollmentRequestSpec.md @@ -6,9 +6,9 @@ EnrollmentRequestSpec is a description of a EnrollmentRequest's target state. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**csr** | **str** | csr is a PEM-encoded PKCS#10 certificate signing request. | +**csr** | **str** | The PEM-encoded PKCS#10 certificate signing request. | **device_status** | [**DeviceStatus**](DeviceStatus.md) | | [optional] -**labels** | **Dict[str, str]** | A set of labels that the service will apply to this device when its enrollment is approved | [optional] +**labels** | **Dict[str, str]** | A set of labels that the service will apply to this device when its enrollment is approved. | [optional] ## Example diff --git a/docs/EnrollmentRequestStatus.md b/docs/EnrollmentRequestStatus.md index 6b907e4..6ec860d 100644 --- a/docs/EnrollmentRequestStatus.md +++ b/docs/EnrollmentRequestStatus.md @@ -6,7 +6,7 @@ EnrollmentRequestStatus represents information about the status of a EnrollmentR Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**certificate** | **str** | certificate is a PEM-encoded signed certificate. | [optional] +**certificate** | **str** | The PEM-encoded signed certificate. | [optional] **conditions** | [**List[Condition]**](Condition.md) | Current state of the EnrollmentRequest. | **approval** | [**EnrollmentRequestApproval**](EnrollmentRequestApproval.md) | | [optional] diff --git a/docs/EnrollmentService.md b/docs/EnrollmentService.md index f544d8f..eeba9e7 100644 --- a/docs/EnrollmentService.md +++ b/docs/EnrollmentService.md @@ -1,5 +1,6 @@ # EnrollmentService +EnrollmentService contains information about how to communicate with a Flight Control enrollment service. ## Properties @@ -7,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **authentication** | [**EnrollmentServiceAuth**](EnrollmentServiceAuth.md) | | **service** | [**EnrollmentServiceService**](EnrollmentServiceService.md) | | -**enrollment_ui_endpoint** | **str** | | +**enrollment_ui_endpoint** | **str** | The URL of the UI that the agent uses to print the QR code and link for enrolling the device. | ## Example diff --git a/docs/EnrollmentServiceAuth.md b/docs/EnrollmentServiceAuth.md index 3654127..ed579aa 100644 --- a/docs/EnrollmentServiceAuth.md +++ b/docs/EnrollmentServiceAuth.md @@ -1,12 +1,13 @@ # EnrollmentServiceAuth +EnrollmentServiceAuth contains the client authentication information for a Flight Control enrollment service. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**client_certificate_data** | **str** | | -**client_key_data** | **str** | | +**client_certificate_data** | **str** | ClientCertificateData contains PEM-encoded data from a client cert file for TLS. | +**client_key_data** | **str** | ClientKeyData contains PEM-encoded data from a client key file for TLS. | ## Example diff --git a/docs/EnrollmentServiceService.md b/docs/EnrollmentServiceService.md index 113b707..30f6da7 100644 --- a/docs/EnrollmentServiceService.md +++ b/docs/EnrollmentServiceService.md @@ -1,12 +1,13 @@ # EnrollmentServiceService +EnrollmentServiceService contains information about connecting to a Flight Control enrollment service. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**certificate_authority_data** | **str** | | -**server** | **str** | | +**certificate_authority_data** | **str** | CertificateAuthorityData contains PEM-encoded certificate authority certificates. | +**server** | **str** | Server is the address of the Flight Control enrollment service (https://hostname:port). | ## Example diff --git a/docs/EnrollmentrequestApi.md b/docs/EnrollmentrequestApi.md index f248a2a..fdf297b 100644 --- a/docs/EnrollmentrequestApi.md +++ b/docs/EnrollmentrequestApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**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 | +[**enrollment_config**](EnrollmentrequestApi.md#enrollment_config) | **GET** /api/v1/enrollmentconfig/{name} | [**list_enrollment_requests**](EnrollmentrequestApi.md#list_enrollment_requests) | **GET** /api/v1/enrollmentrequests | [**read_enrollment_request**](EnrollmentrequestApi.md#read_enrollment_request) | **GET** /api/v1/enrollmentrequests/{name} | [**read_enrollment_request_status**](EnrollmentrequestApi.md#read_enrollment_request_status) | **GET** /api/v1/enrollmentrequests/{name}/status | @@ -20,7 +21,7 @@ Method | HTTP request | Description -create approval of the specified EnrollmentRequest +Approve or deny an EnrollmentRequest. ### Example @@ -42,7 +43,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | name of the EnrollmentRequest + name = 'name_example' # str | The name of the EnrollmentRequest to approve or deny. enrollment_request_approval = flightctl.EnrollmentRequestApproval() # EnrollmentRequestApproval | try: @@ -60,7 +61,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the EnrollmentRequest | + **name** | **str**| The name of the EnrollmentRequest to approve or deny. | **enrollment_request_approval** | [**EnrollmentRequestApproval**](EnrollmentRequestApproval.md)| | ### Return type @@ -84,8 +85,10 @@ No authorization required **422** | UnprocessableEntity | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **500** | InternalServerError | - | +**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) @@ -94,7 +97,7 @@ No authorization required -request enrollment of a Device +Create an EnrollmentRequest resource. ### Example @@ -156,7 +159,9 @@ No authorization required **208** | Already Reported | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **409** | StatusConflict | - | +**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) @@ -165,7 +170,7 @@ No authorization required -delete a Enrollment Request +Delete an EnrollmentRequest resource. ### Example @@ -187,7 +192,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | name of the Enrollment Request + name = 'name_example' # str | The name of the EnrollmentRequest resource to delete. try: api_response = api_instance.delete_enrollment_request(name) @@ -204,7 +209,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Enrollment Request | + **name** | **str**| The name of the EnrollmentRequest resource to delete. | ### Return type @@ -225,7 +230,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -234,7 +241,7 @@ No authorization required -delete a collection of Enrollments +Delete EnrollmentRequest resources. ### Example @@ -290,15 +297,89 @@ No authorization required |-------------|-------------|------------------| **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) + +# **enrollment_config** +> EnrollmentConfig enrollment_config(name) + + + +Get an EnrollmentConfig. + +### Example + + +```python +import flightctl +from flightctl.models.enrollment_config import EnrollmentConfig +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) + name = 'name_example' # str | The name of approved CertificateSigningRequest. + + try: + api_response = api_instance.enrollment_config(name) + print("The response of EnrollmentrequestApi->enrollment_config:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling EnrollmentrequestApi->enrollment_config: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The name of approved CertificateSigningRequest. | + +### Return type + +[**EnrollmentConfig**](EnrollmentConfig.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**401** | Unauthorized | - | +**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) # **list_enrollment_requests** -> EnrollmentRequestList list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, sort_by=sort_by, sort_order=sort_order) +> EnrollmentRequestList list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -list Enrollment Requests +List EnrollmentRequest resources. ### Example @@ -306,7 +387,6 @@ list Enrollment Requests ```python import flightctl from flightctl.models.enrollment_request_list import EnrollmentRequestList -from flightctl.models.sort_order import SortOrder from flightctl.rest import ApiException from pprint import pprint @@ -323,13 +403,11 @@ with flightctl.ApiClient(configuration) as api_client: api_instance = flightctl.EnrollmentrequestApi(api_client) var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) - sort_by = 'metadata.name' # str | Specifies the field to sort by. (optional) - sort_order = Asc # SortOrder | Specifies the sort order. (optional) (default to Asc) try: - api_response = api_instance.list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, sort_by=sort_by, sort_order=sort_order) + api_response = api_instance.list_enrollment_requests(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) print("The response of EnrollmentrequestApi->list_enrollment_requests:\n") pprint(api_response) except Exception as e: @@ -345,10 +423,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] - **sort_by** | **str**| Specifies the field to sort by. | [optional] - **sort_order** | [**SortOrder**](.md)| Specifies the sort order. | [optional] [default to Asc] ### Return type @@ -370,6 +446,8 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **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) @@ -378,7 +456,7 @@ No authorization required -read the specified Enrollment +Get an EnrollmentRequest resource. ### Example @@ -400,7 +478,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | the fingerprint of the EnrollmentRequest + name = 'name_example' # str | The name of the EnrollmentRequest resource to get. try: api_response = api_instance.read_enrollment_request(name) @@ -417,7 +495,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| the fingerprint of the EnrollmentRequest | + **name** | **str**| The name of the EnrollmentRequest resource to get. | ### Return type @@ -438,7 +516,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -447,7 +527,7 @@ No authorization required -read status of the specified EnrollmentRequest +Get the status of an EnrollmentRequest resource. ### Example @@ -469,7 +549,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | name of the EnrollmentRequest + name = 'name_example' # str | The name of the EnrollmentRequest resource to get. try: api_response = api_instance.read_enrollment_request_status(name) @@ -486,7 +566,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the EnrollmentRequest | + **name** | **str**| The name of the EnrollmentRequest resource to get. | ### Return type @@ -507,7 +587,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -516,7 +598,7 @@ No authorization required -replace the specified Enrollment Request +Update an EnrollmentRequest resource. ### Example @@ -538,7 +620,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | name of the EnrollmentRequest + name = 'name_example' # str | The name of the EnrollmentRequest resource to update. enrollment_request = flightctl.EnrollmentRequest() # EnrollmentRequest | try: @@ -556,7 +638,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the EnrollmentRequest | + **name** | **str**| The name of the EnrollmentRequest resource to update. | **enrollment_request** | [**EnrollmentRequest**](EnrollmentRequest.md)| | ### Return type @@ -580,8 +662,10 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | StatusConflict | - | +**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) @@ -590,7 +674,7 @@ No authorization required -replace status of the specified EnrollmentRequest +Update the status of an EnrollmentRequest resource. ### Example @@ -612,7 +696,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.EnrollmentrequestApi(api_client) - name = 'name_example' # str | name of the EnrollmentRequest + name = 'name_example' # str | The name of the EnrollmentRequest resource to update. enrollment_request = flightctl.EnrollmentRequest() # EnrollmentRequest | try: @@ -630,7 +714,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the EnrollmentRequest | + **name** | **str**| The name of the EnrollmentRequest resource to update. | **enrollment_request** | [**EnrollmentRequest**](EnrollmentRequest.md)| | ### Return type @@ -652,7 +736,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) diff --git a/docs/Error.md b/docs/Error.md index 5c31465..41cb635 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | Error message | +**message** | **str** | Error message. | ## Example diff --git a/docs/FileOperation.md b/docs/FileOperation.md index a7c6923..22b04ce 100644 --- a/docs/FileOperation.md +++ b/docs/FileOperation.md @@ -1,16 +1,13 @@ # FileOperation -The type of operation that was observed on the file. ## Enum -* `CREATE` (value: `'Create'`) +* `CREATED` (value: `'created'`) -* `REMOVE` (value: `'Remove'`) +* `REMOVED` (value: `'removed'`) -* `UPDATE` (value: `'Update'`) - -* `REBOOT` (value: `'Reboot'`) +* `UPDATED` (value: `'updated'`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FileSpec.md b/docs/FileSpec.md index 2ddc6b8..288b782 100644 --- a/docs/FileSpec.md +++ b/docs/FileSpec.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **path** | **str** | The absolute path to the file on the device. Note that any existing file will be overwritten. | **content** | **str** | The plain text (UTF-8) or base64-encoded content of the file. | **content_encoding** | **str** | How the contents are encoded. Must be either \"plain\" or \"base64\". Defaults to \"plain\". | [optional] -**mode** | **int** | The file’s permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. | [optional] +**mode** | **int** | The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. | [optional] **user** | **str** | The file's owner, specified either as a name or numeric ID. Defaults to \"root\". | [optional] **group** | **str** | The file's group, specified either as a name or numeric ID. Defaults to \"root\". | [optional] diff --git a/docs/Fleet.md b/docs/Fleet.md index b9d792c..278c577 100644 --- a/docs/Fleet.md +++ b/docs/Fleet.md @@ -6,8 +6,8 @@ Fleet represents a set of devices. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ObjectMeta**](ObjectMeta.md) | | **spec** | [**FleetSpec**](FleetSpec.md) | | **status** | [**FleetStatus**](FleetStatus.md) | | [optional] diff --git a/docs/FleetApi.md b/docs/FleetApi.md index 33a0e5e..dd39aec 100644 --- a/docs/FleetApi.md +++ b/docs/FleetApi.md @@ -7,10 +7,14 @@ 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 | [**list_fleets**](FleetApi.md#list_fleets) | **GET** /api/v1/fleets | +[**list_template_versions**](FleetApi.md#list_template_versions) | **GET** /api/v1/fleets/{fleet}/templateversions | [**patch_fleet**](FleetApi.md#patch_fleet) | **PATCH** /api/v1/fleets/{name} | [**read_fleet**](FleetApi.md#read_fleet) | **GET** /api/v1/fleets/{name} | [**read_fleet_status**](FleetApi.md#read_fleet_status) | **GET** /api/v1/fleets/{name}/status | +[**read_template_version**](FleetApi.md#read_template_version) | **GET** /api/v1/fleets/{fleet}/templateversions/{name} | [**replace_fleet**](FleetApi.md#replace_fleet) | **PUT** /api/v1/fleets/{name} | [**replace_fleet_status**](FleetApi.md#replace_fleet_status) | **PUT** /api/v1/fleets/{name}/status | @@ -20,7 +24,7 @@ Method | HTTP request | Description -create a Fleet +Create a Fleet resource. ### Example @@ -81,7 +85,9 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **409** | StatusConflict | - | +**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) @@ -90,7 +96,7 @@ No authorization required -delete a Fleet +Delete a Fleet resource. ### Example @@ -112,7 +118,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | name of the Fleet + name = 'name_example' # str | The name of the Fleet resource to delete. try: api_response = api_instance.delete_fleet(name) @@ -129,7 +135,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Fleet | + **name** | **str**| The name of the Fleet resource to delete. | ### Return type @@ -150,8 +156,10 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | Conflict | - | +**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) @@ -160,7 +168,7 @@ No authorization required -delete a collection of Fleets +Delete Fleet resources. ### Example @@ -216,15 +224,160 @@ No authorization required |-------------|-------------|------------------| **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** +> TemplateVersion delete_template_version(fleet, name) + + + +delete a template version + +### Example + + +```python +import flightctl +from flightctl.models.template_version import TemplateVersion +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 version. + name = 'name_example' # str | The name of the template version. + + try: + api_response = api_instance.delete_template_version(fleet, name) + print("The response of FleetApi->delete_template_version:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FleetApi->delete_template_version: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fleet** | **str**| The owner of the template version. | + **name** | **str**| The name of the template version. | + +### Return type + +[**TemplateVersion**](TemplateVersion.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | NotFound | - | +**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_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) # **list_fleets** -> FleetList list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, owner=owner, add_devices_count=add_devices_count, sort_by=sort_by, sort_order=sort_order) +> FleetList list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, owner=owner, add_devices_count=add_devices_count) -list Fleets +List Fleet resources. ### Example @@ -232,7 +385,6 @@ list Fleets ```python import flightctl from flightctl.models.fleet_list import FleetList -from flightctl.models.sort_order import SortOrder from flightctl.rest import ApiException from pprint import pprint @@ -249,15 +401,13 @@ with flightctl.ApiClient(configuration) as api_client: api_instance = flightctl.FleetApi(api_client) var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) owner = 'owner_example' # str | A selector to restrict the list of returned objects by their owner. Defaults to everything. (optional) - add_devices_count = True # bool | include the number of devices in each fleet (optional) - sort_by = 'metadata.name' # str | Specifies the field to sort by. (optional) - sort_order = Asc # SortOrder | Specifies the sort order. (optional) (default to Asc) + add_devices_count = True # bool | Include the number of devices in each fleet. (optional) try: - api_response = api_instance.list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, owner=owner, add_devices_count=add_devices_count, sort_by=sort_by, sort_order=sort_order) + api_response = api_instance.list_fleets(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, owner=owner, add_devices_count=add_devices_count) print("The response of FleetApi->list_fleets:\n") pprint(api_response) except Exception as e: @@ -273,12 +423,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] **owner** | **str**| A selector to restrict the list of returned objects by their owner. Defaults to everything. | [optional] - **add_devices_count** | **bool**| include the number of devices in each fleet | [optional] - **sort_by** | **str**| Specifies the field to sort by. | [optional] - **sort_order** | [**SortOrder**](.md)| Specifies the sort order. | [optional] [default to Asc] + **add_devices_count** | **bool**| Include the number of devices in each fleet. | [optional] ### Return type @@ -300,6 +448,87 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **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) + +# **list_template_versions** +> TemplateVersionList list_template_versions(fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + + + +list template versions + +### Example + + +```python +import flightctl +from flightctl.models.template_version_list import TemplateVersionList +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. + var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) + label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) + limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) + + try: + api_response = api_instance.list_template_versions(fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) + print("The response of FleetApi->list_template_versions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FleetApi->list_template_versions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fleet** | **str**| The owner of the template versions. | + **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] + **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] + **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] + +### Return type + +[**TemplateVersionList**](TemplateVersionList.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | +**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) @@ -308,7 +537,7 @@ No authorization required -Patches the specified fleet +Patch a Fleet resource. ### Example @@ -331,7 +560,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | name of the fleet + name = 'name_example' # str | The name of the Fleet resource to patch. patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | (optional) try: @@ -349,7 +578,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the fleet | + **name** | **str**| The name of the Fleet resource to patch. | **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | [optional] ### Return type @@ -372,8 +601,10 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | StatusConflict | - | +**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) @@ -382,7 +613,7 @@ No authorization required -read the specified Fleet +Get a Fleet resource. ### Example @@ -404,8 +635,8 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | unique name of the Fleet - add_devices_summary = True # bool | include a summary of the devices in the fleet (optional) + name = 'name_example' # str | The name of the Fleet resource to get. + add_devices_summary = True # bool | Include a summary of the devices in the fleet. (optional) try: api_response = api_instance.read_fleet(name, add_devices_summary=add_devices_summary) @@ -422,8 +653,8 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| unique name of the Fleet | - **add_devices_summary** | **bool**| include a summary of the devices in the fleet | [optional] + **name** | **str**| The name of the Fleet resource to get. | + **add_devices_summary** | **bool**| Include a summary of the devices in the fleet. | [optional] ### Return type @@ -444,7 +675,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -475,7 +708,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | name of the Fleet + name = 'name_example' # str | The name of the Fleet resource to get. try: api_response = api_instance.read_fleet_status(name) @@ -492,7 +725,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Fleet | + **name** | **str**| The name of the Fleet resource to get. | ### Return type @@ -513,7 +746,82 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | +**404** | NotFound | - | +**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) + +# **read_template_version** +> TemplateVersion read_template_version(fleet, name) + + + +read the specified template version + +### Example + + +```python +import flightctl +from flightctl.models.template_version import TemplateVersion +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 version. + name = 'name_example' # str | The name of the template version. + + try: + api_response = api_instance.read_template_version(fleet, name) + print("The response of FleetApi->read_template_version:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FleetApi->read_template_version: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fleet** | **str**| The owner of the template version. | + **name** | **str**| The name of the template version. | + +### Return type + +[**TemplateVersion**](TemplateVersion.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -522,7 +830,7 @@ No authorization required -replace the specified Fleet +Update a Fleet resource. ### Example @@ -544,7 +852,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | name of the Fleet + name = 'name_example' # str | The name of the Fleet resource to update. fleet = flightctl.Fleet() # Fleet | try: @@ -562,7 +870,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Fleet | + **name** | **str**| The name of the Fleet resource to update. | **fleet** | [**Fleet**](Fleet.md)| | ### Return type @@ -587,7 +895,9 @@ No authorization required **400** | Bad Request | - | **401** | Unauthorized | - | **404** | NotFound | - | +**403** | Forbidden | - | **409** | Conflict | - | +**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) @@ -618,7 +928,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.FleetApi(api_client) - name = 'name_example' # str | name of the Fleet + name = 'name_example' # str | The name of the Fleet resource to update. fleet = flightctl.Fleet() # Fleet | try: @@ -636,7 +946,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the Fleet | + **name** | **str**| The name of the Fleet resource to update. | **fleet** | [**Fleet**](Fleet.md)| | ### Return type @@ -658,7 +968,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) diff --git a/docs/FleetList.md b/docs/FleetList.md index 2af961d..9411377 100644 --- a/docs/FleetList.md +++ b/docs/FleetList.md @@ -6,8 +6,8 @@ FleetList is a list of Fleets. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ListMeta**](ListMeta.md) | | **items** | [**List[Fleet]**](Fleet.md) | List of Fleets. | diff --git a/docs/FleetRolloutStatus.md b/docs/FleetRolloutStatus.md index ea6df2f..ae655b6 100644 --- a/docs/FleetRolloutStatus.md +++ b/docs/FleetRolloutStatus.md @@ -1,11 +1,12 @@ # FleetRolloutStatus +FleetRolloutStatus represents information about the status of a fleet rollout. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**current_batch** | **int** | | [optional] +**current_batch** | **int** | The batch number currently being rolled out. | [optional] ## Example diff --git a/docs/FleetSpecTemplate.md b/docs/FleetSpecTemplate.md index 5193ae2..05ede4a 100644 --- a/docs/FleetSpecTemplate.md +++ b/docs/FleetSpecTemplate.md @@ -1,5 +1,6 @@ # FleetSpecTemplate +The template for the devices in the fleet. ## Properties diff --git a/docs/GenericRepoSpec.md b/docs/GenericRepoSpec.md index 655eef5..95120ce 100644 --- a/docs/GenericRepoSpec.md +++ b/docs/GenericRepoSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | The (possibly remote) repository URL | +**url** | **str** | The (possibly remote) repository URL. | **type** | [**RepoSpecType**](RepoSpecType.md) | | ## Example diff --git a/docs/GitConfigProviderSpec.md b/docs/GitConfigProviderSpec.md index d41d1bc..587a27a 100644 --- a/docs/GitConfigProviderSpec.md +++ b/docs/GitConfigProviderSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | The name of the config provider | +**name** | **str** | The name of the config provider. | **git_ref** | [**GitConfigProviderSpecGitRef**](GitConfigProviderSpecGitRef.md) | | ## Example diff --git a/docs/GitConfigProviderSpecGitRef.md b/docs/GitConfigProviderSpecGitRef.md index 4e5d0f8..8227abf 100644 --- a/docs/GitConfigProviderSpecGitRef.md +++ b/docs/GitConfigProviderSpecGitRef.md @@ -1,14 +1,15 @@ # GitConfigProviderSpecGitRef +The reference to a Git configuration server. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**repository** | **str** | The name of the repository resource to use as the sync source | -**target_revision** | **str** | | -**path** | **str** | | -**mount_path** | **str** | Path to config in device | [optional] [default to '/'] +**repository** | **str** | The name of the Repository resource. | +**target_revision** | **str** | The revision to use from the Repository. | +**path** | **str** | The path to the config in the Repository. | +**mount_path** | **str** | Path in the device's file system at which the repository's path should be mounted. | [optional] [default to '/'] ## Example diff --git a/docs/HookAction.md b/docs/HookAction.md index 8de1555..da4ed88 100644 --- a/docs/HookAction.md +++ b/docs/HookAction.md @@ -5,8 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**executable** | [**HookActionExecutableSpec**](HookActionExecutableSpec.md) | | -**systemd** | [**HookActionSystemdSpec**](HookActionSystemdSpec.md) | | +**var_if** | [**List[HookCondition]**](HookCondition.md) | Conditions that must be met for the action to be executed. | [optional] +**timeout** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are 's' for seconds, 'm' for minutes, and 'h' for hours. | [optional] +**run** | **str** | The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context. | +**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. | [optional] +**work_dir** | **str** | The working directory to be used when running the command. | [optional] ## Example diff --git a/docs/HookActionRun.md b/docs/HookActionRun.md new file mode 100644 index 0000000..a5ddda3 --- /dev/null +++ b/docs/HookActionRun.md @@ -0,0 +1,31 @@ +# HookActionRun + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**run** | **str** | The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context. | +**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. | [optional] +**work_dir** | **str** | The working directory to be used when running the command. | [optional] + +## Example + +```python +from flightctl.models.hook_action_run import HookActionRun + +# TODO update the JSON string below +json = "{}" +# create an instance of HookActionRun from a JSON string +hook_action_run_instance = HookActionRun.from_json(json) +# print the JSON string representation of the object +print(HookActionRun.to_json()) + +# convert the object into a dict +hook_action_run_dict = hook_action_run_instance.to_dict() +# create an instance of HookActionRun from a dict +hook_action_run_from_dict = HookActionRun.from_dict(hook_action_run_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/HookCondition.md b/docs/HookCondition.md new file mode 100644 index 0000000..7569e32 --- /dev/null +++ b/docs/HookCondition.md @@ -0,0 +1,30 @@ +# HookCondition + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | The absolute path to a file or directory that must have changed as condition for the action to be performed. | +**op** | [**List[FileOperation]**](FileOperation.md) | The operation(s) on files at or below the path that satisfy the path condition. | + +## Example + +```python +from flightctl.models.hook_condition import HookCondition + +# TODO update the JSON string below +json = "{}" +# create an instance of HookCondition from a JSON string +hook_condition_instance = HookCondition.from_json(json) +# print the JSON string representation of the object +print(HookCondition.to_json()) + +# convert the object into a dict +hook_condition_dict = hook_condition_instance.to_dict() +# create an instance of HookCondition from a dict +hook_condition_from_dict = HookCondition.from_dict(hook_condition_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/HookConditionPathOp.md b/docs/HookConditionPathOp.md new file mode 100644 index 0000000..d3431ce --- /dev/null +++ b/docs/HookConditionPathOp.md @@ -0,0 +1,30 @@ +# HookConditionPathOp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**path** | **str** | The absolute path to a file or directory that must have changed as condition for the action to be performed. | +**op** | [**List[FileOperation]**](FileOperation.md) | The operation(s) on files at or below the path that satisfy the path condition. | + +## Example + +```python +from flightctl.models.hook_condition_path_op import HookConditionPathOp + +# TODO update the JSON string below +json = "{}" +# create an instance of HookConditionPathOp from a JSON string +hook_condition_path_op_instance = HookConditionPathOp.from_json(json) +# print the JSON string representation of the object +print(HookConditionPathOp.to_json()) + +# convert the object into a dict +hook_condition_path_op_dict = hook_condition_path_op_instance.to_dict() +# create an instance of HookConditionPathOp from a dict +hook_condition_path_op_from_dict = HookConditionPathOp.from_dict(hook_condition_path_op_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/HttpConfig.md b/docs/HttpConfig.md index 9132797..f3bc055 100644 --- a/docs/HttpConfig.md +++ b/docs/HttpConfig.md @@ -1,17 +1,18 @@ # HttpConfig +Configuration for HTTP transport. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**username** | **str** | The username for auth with HTTP transport | [optional] -**password** | **str** | The password for auth with HTTP transport | [optional] -**tls_crt** | **str** | Base64 encoded TLS cert data | [optional] -**tls_key** | **str** | Base64 encoded TLS cert key | [optional] -**ca_crt** | **str** | Base64 encoded root CA | [optional] -**skip_server_verification** | **bool** | Skip remote server verification | [optional] -**token** | **str** | The token for auth with HTTP transport | [optional] +**username** | **str** | The username for auth with HTTP transport. | [optional] +**password** | **str** | The password for auth with HTTP transport. | [optional] +**tls_crt** | **str** | Base64 encoded TLS cert data. | [optional] +**tls_key** | **str** | Base64 encoded TLS cert key. | [optional] +**ca_crt** | **str** | Base64 encoded root CA. | [optional] +**skip_server_verification** | **bool** | Skip remote server verification. | [optional] +**token** | **str** | The token for auth with HTTP transport. | [optional] ## Example diff --git a/docs/HttpConfigProviderSpec.md b/docs/HttpConfigProviderSpec.md index ab04ea3..b9af5a4 100644 --- a/docs/HttpConfigProviderSpec.md +++ b/docs/HttpConfigProviderSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | The name of the config provider | +**name** | **str** | The name of the config provider. | **http_ref** | [**HttpConfigProviderSpecHttpRef**](HttpConfigProviderSpecHttpRef.md) | | ## Example diff --git a/docs/HttpConfigProviderSpecHttpRef.md b/docs/HttpConfigProviderSpecHttpRef.md index 1862922..085710b 100644 --- a/docs/HttpConfigProviderSpecHttpRef.md +++ b/docs/HttpConfigProviderSpecHttpRef.md @@ -1,13 +1,14 @@ # HttpConfigProviderSpecHttpRef +The reference to an HTTP configuration server. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**repository** | **str** | The name of the repository resource to use as the sync source | -**suffix** | **str** | Part of the URL that comes after the base URL. It can include query parameters such as: /path/to/endpoint?query=param | [optional] -**file_path** | **str** | The path of the file where the response is stored in the filesystem of the device. | +**repository** | **str** | The name of the repository resource to use as the sync source. | +**suffix** | **str** | Part of the URL that comes after the base URL. It can include query parameters such as: \"/path/to/endpoint?query=param\". | [optional] +**file_path** | **str** | Path in the device's file system to which the content returned by the HTTP sever should be written. | ## Example diff --git a/docs/HttpRepoSpec.md b/docs/HttpRepoSpec.md index ccf1c5b..cc52014 100644 --- a/docs/HttpRepoSpec.md +++ b/docs/HttpRepoSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | The HTTP URL to call or clone from | +**url** | **str** | The HTTP URL to call or clone from. | **type** | [**RepoSpecType**](RepoSpecType.md) | | **http_config** | [**HttpConfig**](HttpConfig.md) | | **validation_suffix** | **str** | URL suffix used only for validating access to the repository. Users might use the URL field as a root URL to be used by config sources adding suffixes. This will help with the validation of the http endpoint. | [optional] diff --git a/docs/ImageApplicationProvider.md b/docs/ImageApplicationProvider.md index be12667..756e886 100644 --- a/docs/ImageApplicationProvider.md +++ b/docs/ImageApplicationProvider.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**image** | **str** | Reference to the container image for the application package | +**image** | **str** | Reference to the container image for the application package. | ## Example diff --git a/docs/InlineConfigProviderSpec.md b/docs/InlineConfigProviderSpec.md index e64aea5..c96687a 100644 --- a/docs/InlineConfigProviderSpec.md +++ b/docs/InlineConfigProviderSpec.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | The name of the config provider | -**inline** | [**List[FileSpec]**](FileSpec.md) | | +**name** | **str** | The name of the config provider. | +**inline** | [**List[FileSpec]**](FileSpec.md) | A list of files to create on the device. | ## Example diff --git a/docs/KubernetesSecretProviderSpec.md b/docs/KubernetesSecretProviderSpec.md index 3ed9025..77be2ee 100644 --- a/docs/KubernetesSecretProviderSpec.md +++ b/docs/KubernetesSecretProviderSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | The name of the config provider | +**name** | **str** | The name of the config provider. | **secret_ref** | [**KubernetesSecretProviderSpecSecretRef**](KubernetesSecretProviderSpecSecretRef.md) | | ## Example diff --git a/docs/KubernetesSecretProviderSpecSecretRef.md b/docs/KubernetesSecretProviderSpecSecretRef.md index b67bd7d..f77d007 100644 --- a/docs/KubernetesSecretProviderSpecSecretRef.md +++ b/docs/KubernetesSecretProviderSpecSecretRef.md @@ -1,13 +1,14 @@ # KubernetesSecretProviderSpecSecretRef +The reference to a Kubernetes secret. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | -**namespace** | **str** | | -**mount_path** | **str** | | +**name** | **str** | The name of the secret. | +**namespace** | **str** | The namespace of the secret. | +**mount_path** | **str** | Path in the device's file system at which the secret should be mounted. | ## Example diff --git a/docs/LabelSelector.md b/docs/LabelSelector.md index 723d150..bc53f11 100644 --- a/docs/LabelSelector.md +++ b/docs/LabelSelector.md @@ -1,13 +1,13 @@ # LabelSelector -A map of key,value pairs that are ANDed. Empty/null label selectors match nothing. +A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. Empty/null label selectors match nothing. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**match_labels** | **Dict[str, str]** | | [optional] -**match_expressions** | [**List[MatchExpression]**](MatchExpression.md) | | [optional] +**match_labels** | **Dict[str, str]** | A map of {key,value} pairs. | [optional] +**match_expressions** | [**List[MatchExpression]**](MatchExpression.md) | A list of match expressions. | [optional] ## Example diff --git a/docs/ListMeta.md b/docs/ListMeta.md index 398f973..a7b9a2a 100644 --- a/docs/ListMeta.md +++ b/docs/ListMeta.md @@ -6,8 +6,8 @@ ListMeta describes metadata that synthetic resources must have, including lists Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**var_continue** | **str** | continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. | [optional] -**remaining_item_count** | **int** | remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. | [optional] +**var_continue** | **str** | May be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message. | [optional] +**remaining_item_count** | **int** | The number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact. | [optional] ## Example diff --git a/docs/MatchExpression.md b/docs/MatchExpression.md index a344a6c..dad8c6b 100644 --- a/docs/MatchExpression.md +++ b/docs/MatchExpression.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **str** | | -**operator** | **str** | | -**values** | **List[str]** | | [optional] +**key** | **str** | The label key that the selector applies to. | +**operator** | **str** | The operation to apply when matching. | +**values** | **List[str]** | The list of values to match. | [optional] ## Example diff --git a/docs/MemoryResourceMonitorSpec.md b/docs/MemoryResourceMonitorSpec.md index 4651b3e..9f0f619 100644 --- a/docs/MemoryResourceMonitorSpec.md +++ b/docs/MemoryResourceMonitorSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**monitor_type** | **str** | | +**monitor_type** | **str** | The type of resource to monitor. | **alert_rules** | [**List[ResourceAlertRule]**](ResourceAlertRule.md) | Array of alert rules. Only one alert per severity is allowed. | **sampling_interval** | **str** | Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours. | diff --git a/docs/ObjectMeta.md b/docs/ObjectMeta.md index 988d4aa..d7ef2a4 100644 --- a/docs/ObjectMeta.md +++ b/docs/ObjectMeta.md @@ -6,9 +6,9 @@ ObjectMeta is metadata that all persisted resources must have, which includes al Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**creation_timestamp** | **datetime** | | [optional] -**deletion_timestamp** | **datetime** | | [optional] -**name** | **str** | name of the object | [optional] +**creation_timestamp** | **datetime** | The time the object was created. | [optional] +**deletion_timestamp** | **datetime** | The time the object will be deleted. | [optional] +**name** | **str** | The name of the object. | [optional] **labels** | **Dict[str, str]** | Map of string keys and values that can be used to organize and categorize (scope and select) objects. | [optional] **generation** | **int** | A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. | [optional] **owner** | **str** | A resource that owns this resource, in \"kind/name\" format. | [optional] diff --git a/docs/RenderedApplicationSpec.md b/docs/RenderedApplicationSpec.md index 7e8ae75..2e79829 100644 --- a/docs/RenderedApplicationSpec.md +++ b/docs/RenderedApplicationSpec.md @@ -1,13 +1,14 @@ # RenderedApplicationSpec +RenderedApplicationSpec describes the rendered and self-contained specification of an application. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime | [optional] -**name** | **str** | | [optional] -**image** | **str** | Reference to the container image for the application package | +**env_vars** | **Dict[str, str]** | Environment variable key-value pairs, injected during runtime. | [optional] +**name** | **str** | An application name. | [optional] +**image** | **str** | Reference to the container image for the application package. | ## Example diff --git a/docs/RenderedDeviceSpec.md b/docs/RenderedDeviceSpec.md index 33c7095..e20a4b8 100644 --- a/docs/RenderedDeviceSpec.md +++ b/docs/RenderedDeviceSpec.md @@ -1,18 +1,20 @@ # RenderedDeviceSpec +RenderedDeviceSpec describes the rendered and self-contained specification of a Device. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**rendered_version** | **str** | | +**rendered_version** | **str** | Version of the rendered device spec. | +**update_policy** | [**DeviceUpdatePolicySpec**](DeviceUpdatePolicySpec.md) | | [optional] **os** | [**DeviceOSSpec**](DeviceOSSpec.md) | | [optional] -**config** | **str** | | [optional] -**applications** | [**List[RenderedApplicationSpec]**](RenderedApplicationSpec.md) | | [optional] -**hooks** | [**DeviceHooksSpec**](DeviceHooksSpec.md) | | [optional] +**config** | **str** | The configuration to apply, in Ignition format. | [optional] +**applications** | [**List[RenderedApplicationSpec]**](RenderedApplicationSpec.md) | The list of applications to deploy. | [optional] **systemd** | [**RenderedDeviceSpecSystemd**](RenderedDeviceSpecSystemd.md) | | [optional] **resources** | [**List[ResourceMonitor]**](ResourceMonitor.md) | Array of resource monitor configurations. | [optional] **console** | [**DeviceConsole**](DeviceConsole.md) | | [optional] +**decommission** | [**DeviceDecommission**](DeviceDecommission.md) | | [optional] ## Example diff --git a/docs/RenderedDeviceSpecSystemd.md b/docs/RenderedDeviceSpecSystemd.md index 9f32969..b68c9d0 100644 --- a/docs/RenderedDeviceSpecSystemd.md +++ b/docs/RenderedDeviceSpecSystemd.md @@ -1,11 +1,12 @@ # RenderedDeviceSpecSystemd +The systemd services to monitor. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**match_patterns** | **List[str]** | | [optional] +**match_patterns** | **List[str]** | A list of match patterns. | [optional] ## Example diff --git a/docs/RepoSpecType.md b/docs/RepoSpecType.md index 4a89267..a5a5770 100644 --- a/docs/RepoSpecType.md +++ b/docs/RepoSpecType.md @@ -1,6 +1,6 @@ # RepoSpecType -RepoSpecType is the type of the repository +RepoSpecType is the type of the repository. ## Enum diff --git a/docs/Repository.md b/docs/Repository.md index 657b89b..b054312 100644 --- a/docs/Repository.md +++ b/docs/Repository.md @@ -1,13 +1,13 @@ # Repository -Repository represents a Git repository or an HTTP endpoint +Repository represents a Git repository or an HTTP endpoint. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ObjectMeta**](ObjectMeta.md) | | **spec** | [**RepositorySpec**](RepositorySpec.md) | | [optional] **status** | [**RepositoryStatus**](RepositoryStatus.md) | | [optional] diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index 0f5c76f..87de69d 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description -create a repository +Create a Repository resource. ### Example @@ -79,7 +79,9 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **409** | StatusConflict | - | +**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) @@ -88,7 +90,7 @@ No authorization required -delete a collection of Repositories +Delete Repository resources. ### Example @@ -144,6 +146,8 @@ No authorization required |-------------|-------------|------------------| **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) @@ -152,7 +156,7 @@ No authorization required -delete a repository +Delete a Repository resource. ### Example @@ -174,7 +178,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.RepositoryApi(api_client) - name = 'name_example' # str | name of the repository + name = 'name_example' # str | The name of the Repository resource to delete. try: api_response = api_instance.delete_repository(name) @@ -191,7 +195,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the repository | + **name** | **str**| The name of the Repository resource to delete. | ### Return type @@ -212,16 +216,18 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) # **list_repositories** -> RepositoryList list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, sort_by=sort_by, sort_order=sort_order) +> RepositoryList list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) -list repositories +List Repository resources. ### Example @@ -229,7 +235,6 @@ list repositories ```python import flightctl from flightctl.models.repository_list import RepositoryList -from flightctl.models.sort_order import SortOrder from flightctl.rest import ApiException from pprint import pprint @@ -246,13 +251,11 @@ with flightctl.ApiClient(configuration) as api_client: api_instance = flightctl.RepositoryApi(api_client) var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) - sort_by = 'metadata.name' # str | Specifies the field to sort by. (optional) - sort_order = Asc # SortOrder | Specifies the sort order. (optional) (default to Asc) try: - api_response = api_instance.list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, sort_by=sort_by, sort_order=sort_order) + api_response = api_instance.list_repositories(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit) print("The response of RepositoryApi->list_repositories:\n") pprint(api_response) except Exception as e: @@ -268,10 +271,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] - **sort_by** | **str**| Specifies the field to sort by. | [optional] - **sort_order** | [**SortOrder**](.md)| Specifies the sort order. | [optional] [default to Asc] ### Return type @@ -293,6 +294,8 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **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) @@ -301,7 +304,7 @@ No authorization required -Patches the specified repository +Patch a Repository resource. ### Example @@ -324,7 +327,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.RepositoryApi(api_client) - name = 'name_example' # str | name of the repository + name = 'name_example' # str | The name of the Repository resource to patch. patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | (optional) try: @@ -342,7 +345,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the repository | + **name** | **str**| The name of the Repository resource to patch. | **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | [optional] ### Return type @@ -365,8 +368,10 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | Conflict | - | +**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) @@ -375,7 +380,7 @@ No authorization required -read the specified repository +Get a Repository resource. ### Example @@ -397,7 +402,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.RepositoryApi(api_client) - name = 'name_example' # str | name of the repository + name = 'name_example' # str | The name of the Repository resource to get. try: api_response = api_instance.read_repository(name) @@ -414,7 +419,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the repository | + **name** | **str**| The name of the Repository resource to get. | ### Return type @@ -435,7 +440,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -444,7 +451,7 @@ No authorization required -replace the specified repository +Update a Repository resource. ### Example @@ -466,7 +473,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.RepositoryApi(api_client) - name = 'name_example' # str | name of the repository + name = 'name_example' # str | The name of the Repository resource to update. repository = flightctl.Repository() # Repository | try: @@ -484,7 +491,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the repository | + **name** | **str**| The name of the Repository resource to update. | **repository** | [**Repository**](Repository.md)| | ### Return type @@ -508,8 +515,10 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | Conflict | - | +**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) diff --git a/docs/RepositoryList.md b/docs/RepositoryList.md index fea8067..36abd80 100644 --- a/docs/RepositoryList.md +++ b/docs/RepositoryList.md @@ -6,8 +6,8 @@ RepositoryList is a list of Repositories. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ListMeta**](ListMeta.md) | | **items** | [**List[Repository]**](Repository.md) | List of repositories. | diff --git a/docs/RepositorySpec.md b/docs/RepositorySpec.md index 8b28e96..71295d4 100644 --- a/docs/RepositorySpec.md +++ b/docs/RepositorySpec.md @@ -1,11 +1,12 @@ # RepositorySpec +RepositorySpec describes a configuration repository. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | The SSH Git repository URL to clone from | +**url** | **str** | The SSH Git repository URL to clone from. | **type** | [**RepoSpecType**](RepoSpecType.md) | | **http_config** | [**HttpConfig**](HttpConfig.md) | | **validation_suffix** | **str** | URL suffix used only for validating access to the repository. Users might use the URL field as a root URL to be used by config sources adding suffixes. This will help with the validation of the http endpoint. | [optional] diff --git a/docs/RepositoryStatus.md b/docs/RepositoryStatus.md index 1fcae76..ab38388 100644 --- a/docs/RepositoryStatus.md +++ b/docs/RepositoryStatus.md @@ -1,6 +1,6 @@ # RepositoryStatus -RepositoryStatus represents information about the status of a repository. Status may trail the actual state of a repository. +RepositoryStatus represents information about the status of a repository. ## Properties diff --git a/docs/ResourceAlertSeverityType.md b/docs/ResourceAlertSeverityType.md index b8fde9a..5a1e229 100644 --- a/docs/ResourceAlertSeverityType.md +++ b/docs/ResourceAlertSeverityType.md @@ -1,5 +1,6 @@ # ResourceAlertSeverityType +Severity of the alert. ## Enum diff --git a/docs/ResourceMonitor.md b/docs/ResourceMonitor.md index d5ffed2..8c1336c 100644 --- a/docs/ResourceMonitor.md +++ b/docs/ResourceMonitor.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**monitor_type** | **str** | | +**monitor_type** | **str** | The type of resource to monitor. | **alert_rules** | [**List[ResourceAlertRule]**](ResourceAlertRule.md) | Array of alert rules. Only one alert per severity is allowed. | **sampling_interval** | **str** | Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours. | **path** | **str** | The directory path to monitor for disk usage. | diff --git a/docs/ResourceMonitorSpec.md b/docs/ResourceMonitorSpec.md index 79756d0..7e028fd 100644 --- a/docs/ResourceMonitorSpec.md +++ b/docs/ResourceMonitorSpec.md @@ -1,11 +1,12 @@ # ResourceMonitorSpec +Specification for monitoring a resource. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**monitor_type** | **str** | | +**monitor_type** | **str** | The type of resource to monitor. | **alert_rules** | [**List[ResourceAlertRule]**](ResourceAlertRule.md) | Array of alert rules. Only one alert per severity is allowed. | **sampling_interval** | **str** | Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours. | diff --git a/docs/ResourceSync.md b/docs/ResourceSync.md index 02fcae6..df3e21e 100644 --- a/docs/ResourceSync.md +++ b/docs/ResourceSync.md @@ -1,13 +1,13 @@ # ResourceSync -ResourceSync represents a reference to one or more files in a repository to sync to resource definitions +ResourceSync represents a reference to one or more files in a repository to sync to resource definitions. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ObjectMeta**](ObjectMeta.md) | | **spec** | [**ResourceSyncSpec**](ResourceSyncSpec.md) | | **status** | [**ResourceSyncStatus**](ResourceSyncStatus.md) | | [optional] diff --git a/docs/ResourceSyncList.md b/docs/ResourceSyncList.md index 75f1ba4..d16cd23 100644 --- a/docs/ResourceSyncList.md +++ b/docs/ResourceSyncList.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ListMeta**](ListMeta.md) | | **items** | [**List[ResourceSync]**](ResourceSync.md) | List of resourcesync. | diff --git a/docs/ResourceSyncSpec.md b/docs/ResourceSyncSpec.md index 47a21f0..b33ec2a 100644 --- a/docs/ResourceSyncSpec.md +++ b/docs/ResourceSyncSpec.md @@ -1,13 +1,14 @@ # ResourceSyncSpec +ResourceSyncSpec describes the file(s) to sync from a repository. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**repository** | **str** | The name of the repository resource to use as the sync source | -**target_revision** | **str** | The desired revision in the repository | -**path** | **str** | The path of a file or directory in the repository. If a directory, the directory should contain only resource definitions with no subdirectories. Each file should contain the definition of one or more resources. | +**repository** | **str** | The name of the repository resource to use as the sync source. | +**target_revision** | **str** | The desired revision in the repository. | +**path** | **str** | The path of a file or directory in the repository. If a directory, the directory should contain only resource definitions with no subdirectories. Each file should contain the definition of one or more resources. | ## Example diff --git a/docs/ResourceSyncStatus.md b/docs/ResourceSyncStatus.md index c968320..f9d0504 100644 --- a/docs/ResourceSyncStatus.md +++ b/docs/ResourceSyncStatus.md @@ -1,13 +1,13 @@ # ResourceSyncStatus -ResourceSyncStatus represents information about the status of a resourcesync +ResourceSyncStatus represents information about the status of a ResourceSync. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**observed_commit** | **str** | The last commit hash that was synced | [optional] -**observed_generation** | **int** | The last generation that was synced | [optional] +**observed_commit** | **str** | The last commit hash that was synced. | [optional] +**observed_generation** | **int** | The last generation that was synced. | [optional] **conditions** | [**List[Condition]**](Condition.md) | Current state of a resourcesync. | ## Example diff --git a/docs/ResourcesyncApi.md b/docs/ResourcesyncApi.md index 5cfa071..e58a28d 100644 --- a/docs/ResourcesyncApi.md +++ b/docs/ResourcesyncApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description -create a resourcesync +Create a ResourceSync resource. ### Example @@ -79,7 +79,9 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **409** | StatusConflict | - | +**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) @@ -88,7 +90,7 @@ No authorization required -delete a resourcesync +Delete a ResourceSync resource. ### Example @@ -110,7 +112,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.ResourcesyncApi(api_client) - name = 'name_example' # str | name of the resourcesync + name = 'name_example' # str | The name of the ResourceSync resource to delete. try: api_response = api_instance.delete_resource_sync(name) @@ -127,7 +129,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the resourcesync | + **name** | **str**| The name of the ResourceSync resource to delete. | ### Return type @@ -148,7 +150,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -157,7 +161,7 @@ No authorization required -delete a collection of ResourceSync +Delete ResourceSync resources. ### Example @@ -213,15 +217,17 @@ No authorization required |-------------|-------------|------------------| **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) # **list_resource_sync** -> ResourceSyncList list_resource_sync(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, repository=repository, sort_by=sort_by, sort_order=sort_order) +> ResourceSyncList list_resource_sync(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, repository=repository) -list resourcesync +List ResourceSync resources. ### Example @@ -229,7 +235,6 @@ list resourcesync ```python import flightctl from flightctl.models.resource_sync_list import ResourceSyncList -from flightctl.models.sort_order import SortOrder from flightctl.rest import ApiException from pprint import pprint @@ -246,14 +251,12 @@ with flightctl.ApiClient(configuration) as api_client: api_instance = flightctl.ResourcesyncApi(api_client) var_continue = 'var_continue_example' # str | An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. (optional) label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional) - field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation. (optional) + field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). (optional) limit = 56 # int | The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. (optional) repository = 'repository_example' # str | The name of the repository to filter results by. (optional) - sort_by = 'metadata.name' # str | Specifies the field to sort by. (optional) - sort_order = Asc # SortOrder | Specifies the sort order. (optional) (default to Asc) try: - api_response = api_instance.list_resource_sync(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, repository=repository, sort_by=sort_by, sort_order=sort_order) + api_response = api_instance.list_resource_sync(var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, repository=repository) print("The response of ResourcesyncApi->list_resource_sync:\n") pprint(api_response) except Exception as e: @@ -269,11 +272,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **var_continue** | **str**| An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. | [optional] **label_selector** | **str**| A selector to restrict the list of returned objects by their labels. Defaults to everything. | [optional] - **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation. | [optional] + **field_selector** | **str**| A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). | [optional] **limit** | **int**| The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. | [optional] **repository** | **str**| The name of the repository to filter results by. | [optional] - **sort_by** | **str**| Specifies the field to sort by. | [optional] - **sort_order** | [**SortOrder**](.md)| Specifies the sort order. | [optional] [default to Asc] ### Return type @@ -295,6 +296,8 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **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) @@ -303,7 +306,7 @@ No authorization required -Patches the specified resourcesync +Patch a ResourceSync resource. ### Example @@ -326,7 +329,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.ResourcesyncApi(api_client) - name = 'name_example' # str | name of the resourcesync + name = 'name_example' # str | The name of the ResourceSync resource to patch. patch_request_inner = [flightctl.PatchRequestInner()] # List[PatchRequestInner] | (optional) try: @@ -344,7 +347,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the resourcesync | + **name** | **str**| The name of the ResourceSync resource to patch. | **patch_request_inner** | [**List[PatchRequestInner]**](PatchRequestInner.md)| | [optional] ### Return type @@ -367,8 +370,10 @@ No authorization required **200** | OK | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | Conflict | - | +**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) @@ -377,7 +382,7 @@ No authorization required -read the specified resourcesync +Get a ResourceSync resource. ### Example @@ -399,7 +404,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.ResourcesyncApi(api_client) - name = 'name_example' # str | name of the resourcesync + name = 'name_example' # str | The name of the ResourceSync resource to get. try: api_response = api_instance.read_resource_sync(name) @@ -416,7 +421,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the resourcesync | + **name** | **str**| The name of the ResourceSync resource to get. | ### Return type @@ -437,7 +442,9 @@ No authorization required |-------------|-------------|------------------| **200** | OK | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | +**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) @@ -446,7 +453,7 @@ No authorization required -replace the specified resourcesync +Update a ResourceSync resource. ### Example @@ -468,7 +475,7 @@ configuration = flightctl.Configuration( with flightctl.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = flightctl.ResourcesyncApi(api_client) - name = 'name_example' # str | name of the resourcesync + name = 'name_example' # str | The name of the ResourceSync resource to update. resource_sync = flightctl.ResourceSync() # ResourceSync | try: @@ -486,7 +493,7 @@ with flightctl.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **str**| name of the resourcesync | + **name** | **str**| The name of the ResourceSync resource to update. | **resource_sync** | [**ResourceSync**](ResourceSync.md)| | ### Return type @@ -510,8 +517,10 @@ No authorization required **201** | Created | - | **400** | Bad Request | - | **401** | Unauthorized | - | +**403** | Forbidden | - | **404** | NotFound | - | **409** | Conflict | - | +**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) diff --git a/docs/RolloutDeviceSelection.md b/docs/RolloutDeviceSelection.md index 02bb96d..d77da03 100644 --- a/docs/RolloutDeviceSelection.md +++ b/docs/RolloutDeviceSelection.md @@ -1,12 +1,13 @@ # RolloutDeviceSelection +Describes how to select devices for rollout. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**strategy** | **str** | | -**sequence** | [**List[Batch]**](Batch.md) | | [optional] +**strategy** | **str** | The rollout strategy to use. | +**sequence** | [**List[Batch]**](Batch.md) | A list of batch definitions. | [optional] ## Example diff --git a/docs/RolloutPolicy.md b/docs/RolloutPolicy.md index 1786973..05362f9 100644 --- a/docs/RolloutPolicy.md +++ b/docs/RolloutPolicy.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **disruption_allowance** | [**DisruptionAllowance**](DisruptionAllowance.md) | | [optional] **device_selection** | [**RolloutDeviceSelection**](RolloutDeviceSelection.md) | | [optional] **success_threshold** | **str** | Percentage is the string format representing percentage string. | [optional] -**default_update_timeout** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: - 's' for seconds - 'm' for minutes - 'h' for hours - 'd' for days | [optional] +**default_update_timeout** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours. | [optional] [default to '0s'] ## Example diff --git a/docs/SshConfig.md b/docs/SshConfig.md index 12928ba..811b29a 100644 --- a/docs/SshConfig.md +++ b/docs/SshConfig.md @@ -1,13 +1,14 @@ # SshConfig +Configuration for SSH transport. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ssh_private_key** | **str** | Base64 encoded private SSH key | [optional] -**private_key_passphrase** | **str** | The passphrase for sshPrivateKey | [optional] -**skip_server_verification** | **bool** | Skip remote server verification | [optional] +**ssh_private_key** | **str** | Base64 encoded private SSH key. | [optional] +**private_key_passphrase** | **str** | The passphrase for sshPrivateKey. | [optional] +**skip_server_verification** | **bool** | Skip remote server verification. | [optional] ## Example diff --git a/docs/SshRepoSpec.md b/docs/SshRepoSpec.md index 3a3dad4..72f6002 100644 --- a/docs/SshRepoSpec.md +++ b/docs/SshRepoSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | The SSH Git repository URL to clone from | +**url** | **str** | The SSH Git repository URL to clone from. | **type** | [**RepoSpecType**](RepoSpecType.md) | | **ssh_config** | [**SshConfig**](SshConfig.md) | | diff --git a/docs/Status.md b/docs/Status.md index 4c1e08d..5ac7a88 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **message** | **str** | A human-readable description of the status of this operation. | [optional] **reason** | **str** | A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. | [optional] -**status** | **str** | Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status | [optional] +**status** | **str** | Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status. | [optional] ## Example diff --git a/docs/TemplateVersion.md b/docs/TemplateVersion.md index b7baa5f..8180e75 100644 --- a/docs/TemplateVersion.md +++ b/docs/TemplateVersion.md @@ -6,8 +6,8 @@ TemplateVersion represents a version of a template. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ObjectMeta**](ObjectMeta.md) | | **spec** | [**TemplateVersionSpec**](TemplateVersionSpec.md) | | **status** | [**TemplateVersionStatus**](TemplateVersionStatus.md) | | [optional] diff --git a/docs/TemplateVersionList.md b/docs/TemplateVersionList.md index c00f929..e9a96fd 100644 --- a/docs/TemplateVersionList.md +++ b/docs/TemplateVersionList.md @@ -6,8 +6,8 @@ TemplateVersionList is a list of TemplateVersions. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | -**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | +**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources. | +**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds. | **metadata** | [**ListMeta**](ListMeta.md) | | **items** | [**List[TemplateVersion]**](TemplateVersion.md) | List of TemplateVersions. | diff --git a/docs/TemplateVersionSpec.md b/docs/TemplateVersionSpec.md index 272dcd9..dfea45e 100644 --- a/docs/TemplateVersionSpec.md +++ b/docs/TemplateVersionSpec.md @@ -1,5 +1,6 @@ # TemplateVersionSpec +TemplateVersionSpec describes a version of a device template. ## Properties diff --git a/docs/TemplateVersionStatus.md b/docs/TemplateVersionStatus.md index 996efc9..2f8210b 100644 --- a/docs/TemplateVersionStatus.md +++ b/docs/TemplateVersionStatus.md @@ -1,18 +1,19 @@ # TemplateVersionStatus +TemplateVersionStatus represents information about the status of a template version. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**update_policy** | [**DeviceUpdatePolicySpec**](DeviceUpdatePolicySpec.md) | | [optional] **os** | [**DeviceOSSpec**](DeviceOSSpec.md) | | [optional] **config** | [**List[ConfigProviderSpec]**](ConfigProviderSpec.md) | List of config providers. | [optional] -**hooks** | [**DeviceHooksSpec**](DeviceHooksSpec.md) | | [optional] **applications** | [**List[ApplicationSpec]**](ApplicationSpec.md) | List of applications. | [optional] **systemd** | [**DeviceSpecSystemd**](DeviceSpecSystemd.md) | | [optional] **resources** | [**List[ResourceMonitor]**](ResourceMonitor.md) | Array of resource monitor configurations. | [optional] -**updated_at** | **datetime** | | [optional] -**conditions** | [**List[Condition]**](Condition.md) | Current state of the device. | [optional] +**updated_at** | **datetime** | The time at which the template was last updated. | [optional] +**conditions** | [**List[Condition]**](Condition.md) | Current state of the device. | ## Example diff --git a/docs/UpdateSchedule.md b/docs/UpdateSchedule.md new file mode 100644 index 0000000..8a20db6 --- /dev/null +++ b/docs/UpdateSchedule.md @@ -0,0 +1,32 @@ +# UpdateSchedule + +Defines the schedule for automatic updates, including timing and optional timeout. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time_zone** | **str** | Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported (\"GMT\", \"UTC\"). | [optional] [default to 'Local'] +**at** | **str** | Cron expression format for scheduling times. The format is `* * * * *`: - Minutes: `*` matches 0-59. - Hours: `*` matches 0-23. - Day of Month: `*` matches 1-31. - Month: `*` matches 1-12. - Day of Week: `*` matches 0-6. Supported operators: - `*`: Matches any value (e.g., `*` in hours matches every hour). - `-`: Range (e.g., `0-8` for 12 AM to 8 AM). - `,`: List (e.g., `1,12` for 1st and 12th minute). - `/`: Step (e.g., `*/12` for every 12th minute). - Single value (e.g., `8` matches the 8th minute). Example: `* 0-8,16-23 * * *`. | +**start_grace_duration** | **str** | The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours. | [optional] [default to '0s'] + +## Example + +```python +from flightctl.models.update_schedule import UpdateSchedule + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateSchedule from a JSON string +update_schedule_instance = UpdateSchedule.from_json(json) +# print the JSON string representation of the object +print(UpdateSchedule.to_json()) + +# convert the object into a dict +update_schedule_dict = update_schedule_instance.to_dict() +# create an instance of UpdateSchedule from a dict +update_schedule_from_dict = UpdateSchedule.from_dict(update_schedule_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/flightctl/__init__.py b/flightctl/__init__.py index e9ceaee..ca0a746 100644 --- a/flightctl/__init__.py +++ b/flightctl/__init__.py @@ -3,11 +3,12 @@ # flake8: noqa """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -17,15 +18,13 @@ __version__ = "1.0.0" # import apis into sdk package +from flightctl.api.authentication_api import AuthenticationApi from flightctl.api.certificatesigningrequest_api import CertificatesigningrequestApi -from flightctl.api.default_api import DefaultApi from flightctl.api.device_api import DeviceApi -from flightctl.api.enrollmentconfig_api import EnrollmentconfigApi from flightctl.api.enrollmentrequest_api import EnrollmentrequestApi from flightctl.api.fleet_api import FleetApi from flightctl.api.repository_api import RepositoryApi from flightctl.api.resourcesync_api import ResourcesyncApi -from flightctl.api.templateversion_api import TemplateversionApi # import ApiClient from flightctl.api_response import ApiResponse @@ -62,14 +61,17 @@ from flightctl.models.device_applications_summary_status import DeviceApplicationsSummaryStatus from flightctl.models.device_config_status import DeviceConfigStatus from flightctl.models.device_console import DeviceConsole -from flightctl.models.device_hooks_spec import DeviceHooksSpec +from flightctl.models.device_decommission import DeviceDecommission +from flightctl.models.device_decommission_target_type import DeviceDecommissionTargetType from flightctl.models.device_integrity_status import DeviceIntegrityStatus from flightctl.models.device_integrity_status_summary import DeviceIntegrityStatusSummary from flightctl.models.device_integrity_status_summary_type import DeviceIntegrityStatusSummaryType +from flightctl.models.device_lifecycle_hook_type import DeviceLifecycleHookType +from flightctl.models.device_lifecycle_status import DeviceLifecycleStatus +from flightctl.models.device_lifecycle_status_type import DeviceLifecycleStatusType from flightctl.models.device_list import DeviceList from flightctl.models.device_os_spec import DeviceOSSpec from flightctl.models.device_os_status import DeviceOSStatus -from flightctl.models.device_reboot_hook_spec import DeviceRebootHookSpec from flightctl.models.device_resource_status import DeviceResourceStatus from flightctl.models.device_resource_status_type import DeviceResourceStatusType from flightctl.models.device_spec import DeviceSpec @@ -78,7 +80,7 @@ from flightctl.models.device_summary_status import DeviceSummaryStatus from flightctl.models.device_summary_status_type import DeviceSummaryStatusType from flightctl.models.device_system_info import DeviceSystemInfo -from flightctl.models.device_update_hook_spec import DeviceUpdateHookSpec +from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec from flightctl.models.device_updated_status import DeviceUpdatedStatus from flightctl.models.device_updated_status_type import DeviceUpdatedStatusType from flightctl.models.devices_summary import DevicesSummary @@ -106,13 +108,9 @@ from flightctl.models.git_config_provider_spec import GitConfigProviderSpec from flightctl.models.git_config_provider_spec_git_ref import GitConfigProviderSpecGitRef from flightctl.models.hook_action import HookAction -from flightctl.models.hook_action_executable import HookActionExecutable -from flightctl.models.hook_action_executable_spec import HookActionExecutableSpec -from flightctl.models.hook_action_one_of import HookActionOneOf -from flightctl.models.hook_action_one_of1 import HookActionOneOf1 -from flightctl.models.hook_action_spec import HookActionSpec -from flightctl.models.hook_action_systemd_spec import HookActionSystemdSpec -from flightctl.models.hook_action_systemd_unit import HookActionSystemdUnit +from flightctl.models.hook_action_run import HookActionRun +from flightctl.models.hook_condition import HookCondition +from flightctl.models.hook_condition_path_op import HookConditionPathOp from flightctl.models.http_config import HttpConfig from flightctl.models.http_config_provider_spec import HttpConfigProviderSpec from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef @@ -145,7 +143,6 @@ from flightctl.models.resource_sync_status import ResourceSyncStatus from flightctl.models.rollout_device_selection import RolloutDeviceSelection from flightctl.models.rollout_policy import RolloutPolicy -from flightctl.models.sort_order import SortOrder from flightctl.models.ssh_config import SshConfig from flightctl.models.ssh_repo_spec import SshRepoSpec from flightctl.models.status import Status @@ -153,3 +150,4 @@ from flightctl.models.template_version_list import TemplateVersionList from flightctl.models.template_version_spec import TemplateVersionSpec from flightctl.models.template_version_status import TemplateVersionStatus +from flightctl.models.update_schedule import UpdateSchedule diff --git a/flightctl/api/__init__.py b/flightctl/api/__init__.py index a3d92c2..c7aea07 100644 --- a/flightctl/api/__init__.py +++ b/flightctl/api/__init__.py @@ -1,13 +1,11 @@ # flake8: noqa # import apis into api package +from flightctl.api.authentication_api import AuthenticationApi from flightctl.api.certificatesigningrequest_api import CertificatesigningrequestApi -from flightctl.api.default_api import DefaultApi from flightctl.api.device_api import DeviceApi -from flightctl.api.enrollmentconfig_api import EnrollmentconfigApi from flightctl.api.enrollmentrequest_api import EnrollmentrequestApi from flightctl.api.fleet_api import FleetApi from flightctl.api.repository_api import RepositoryApi from flightctl.api.resourcesync_api import ResourcesyncApi -from flightctl.api.templateversion_api import TemplateversionApi diff --git a/flightctl/api/authentication_api.py b/flightctl/api/authentication_api.py new file mode 100644 index 0000000..693191e --- /dev/null +++ b/flightctl/api/authentication_api.py @@ -0,0 +1,557 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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 warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from flightctl.models.auth_config import AuthConfig + +from flightctl.api_client import ApiClient, RequestSerialized +from flightctl.api_response import ApiResponse +from flightctl.rest import RESTResponseType + + +class AuthenticationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def auth_config( + 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, + ) -> AuthConfig: + """auth_config + + Get authentication configuration. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthConfig", + '418': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def auth_config_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[AuthConfig]: + """auth_config + + Get authentication configuration. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthConfig", + '418': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def auth_config_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """auth_config + + Get authentication configuration. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._auth_config_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AuthConfig", + '418': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _auth_config_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/auth/config', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def auth_validate( + self, + authentication: Annotated[Optional[StrictStr], Field(description="The authentication token to validate.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """auth_validate + + Validate an authentication token. + + :param authentication: The authentication token to validate. + :type authentication: 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._auth_validate_serialize( + authentication=authentication, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '418': None, + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def auth_validate_with_http_info( + self, + authentication: Annotated[Optional[StrictStr], Field(description="The authentication token to validate.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """auth_validate + + Validate an authentication token. + + :param authentication: The authentication token to validate. + :type authentication: 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._auth_validate_serialize( + authentication=authentication, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '418': None, + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def auth_validate_without_preload_content( + self, + authentication: Annotated[Optional[StrictStr], Field(description="The authentication token to validate.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """auth_validate + + Validate an authentication token. + + :param authentication: The authentication token to validate. + :type authentication: 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._auth_validate_serialize( + authentication=authentication, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '401': None, + '418': None, + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _auth_validate_serialize( + self, + authentication, + _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 + if authentication is not None: + _header_params['Authentication'] = authentication + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/auth/validate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/flightctl/api/certificatesigningrequest_api.py b/flightctl/api/certificatesigningrequest_api.py index a8912fa..3293669 100644 --- a/flightctl/api/certificatesigningrequest_api.py +++ b/flightctl/api/certificatesigningrequest_api.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -22,7 +23,6 @@ from flightctl.models.certificate_signing_request import CertificateSigningRequest from flightctl.models.certificate_signing_request_list import CertificateSigningRequestList from flightctl.models.patch_request_inner import PatchRequestInner -from flightctl.models.sort_order import SortOrder from flightctl.models.status import Status from flightctl.api_client import ApiClient, RequestSerialized @@ -43,6 +43,287 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client + @validate_call + def approve_certificate_signing_request( + self, + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to approve or deny.")], + _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, + ) -> CertificateSigningRequest: + """approve_certificate_signing_request + + approve the specified CertificateSigningRequest + + :param name: The name of the CertificateSigningRequest resource to approve or deny. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._approve_certificate_signing_request_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CertificateSigningRequest", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '500': "Error", + '503': "Error", + } + 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 approve_certificate_signing_request_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to approve or deny.")], + _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[CertificateSigningRequest]: + """approve_certificate_signing_request + + approve the specified CertificateSigningRequest + + :param name: The name of the CertificateSigningRequest resource to approve or deny. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._approve_certificate_signing_request_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CertificateSigningRequest", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '500': "Error", + '503': "Error", + } + 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 approve_certificate_signing_request_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to approve or deny.")], + _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: + """approve_certificate_signing_request + + approve the specified CertificateSigningRequest + + :param name: The name of the CertificateSigningRequest resource to approve or deny. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._approve_certificate_signing_request_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CertificateSigningRequest", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '500': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _approve_certificate_signing_request_serialize( + self, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/v1/certificatesigningrequests/{name}/approval', + 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 create_certificate_signing_request( self, @@ -62,7 +343,7 @@ def create_certificate_signing_request( ) -> CertificateSigningRequest: """create_certificate_signing_request - request Certificate Signing + Create a CertificateSigningRequest resource. :param certificate_signing_request: (required) :type certificate_signing_request: CertificateSigningRequest @@ -97,12 +378,11 @@ def create_certificate_signing_request( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", '201': "CertificateSigningRequest", - '202': "CertificateSigningRequest", - '208': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -134,7 +414,7 @@ def create_certificate_signing_request_with_http_info( ) -> ApiResponse[CertificateSigningRequest]: """create_certificate_signing_request - request Certificate Signing + Create a CertificateSigningRequest resource. :param certificate_signing_request: (required) :type certificate_signing_request: CertificateSigningRequest @@ -169,12 +449,11 @@ def create_certificate_signing_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", '201': "CertificateSigningRequest", - '202': "CertificateSigningRequest", - '208': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -206,7 +485,7 @@ def create_certificate_signing_request_without_preload_content( ) -> RESTResponseType: """create_certificate_signing_request - request Certificate Signing + Create a CertificateSigningRequest resource. :param certificate_signing_request: (required) :type certificate_signing_request: CertificateSigningRequest @@ -241,12 +520,11 @@ def create_certificate_signing_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CertificateSigningRequest", '201': "CertificateSigningRequest", - '202': "CertificateSigningRequest", - '208': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -334,7 +612,7 @@ def _create_certificate_signing_request_serialize( @validate_call def delete_certificate_signing_request( self, - name: Annotated[StrictStr, Field(description="name of the Certificate Signing Request")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -352,7 +630,7 @@ def delete_certificate_signing_request( delete a Certificate Signing Request - :param name: name of the Certificate Signing Request (required) + :param name: The name of the CertificateSigningRequest resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -387,7 +665,9 @@ def delete_certificate_signing_request( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -403,7 +683,7 @@ def delete_certificate_signing_request( @validate_call def delete_certificate_signing_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Certificate Signing Request")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -421,7 +701,7 @@ def delete_certificate_signing_request_with_http_info( delete a Certificate Signing Request - :param name: name of the Certificate Signing Request (required) + :param name: The name of the CertificateSigningRequest resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -456,7 +736,9 @@ def delete_certificate_signing_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -472,7 +754,7 @@ def delete_certificate_signing_request_with_http_info( @validate_call def delete_certificate_signing_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Certificate Signing Request")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -490,7 +772,7 @@ def delete_certificate_signing_request_without_preload_content( delete a Certificate Signing Request - :param name: name of the Certificate Signing Request (required) + :param name: The name of the CertificateSigningRequest resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -525,7 +807,9 @@ def delete_certificate_signing_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -615,7 +899,7 @@ def delete_certificate_signing_requests( ) -> Status: """delete_certificate_signing_requests - delete a collection of CertificateSigningRequest + Delete CertificateSigningRequest resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -649,6 +933,8 @@ def delete_certificate_signing_requests( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -679,7 +965,7 @@ def delete_certificate_signing_requests_with_http_info( ) -> ApiResponse[Status]: """delete_certificate_signing_requests - delete a collection of CertificateSigningRequest + Delete CertificateSigningRequest resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -713,6 +999,8 @@ def delete_certificate_signing_requests_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -743,7 +1031,7 @@ def delete_certificate_signing_requests_without_preload_content( ) -> RESTResponseType: """delete_certificate_signing_requests - delete a collection of CertificateSigningRequest + Delete CertificateSigningRequest resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -777,6 +1065,8 @@ def delete_certificate_signing_requests_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -845,15 +1135,288 @@ def _delete_certificate_signing_requests_serialize( + @validate_call + def deny_certificate_signing_request( + self, + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> CertificateSigningRequest: + """deny_certificate_signing_request + + deny the specified CertificateSigningRequest + + :param name: The name of the CertificateSigningRequest resource to delete. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deny_certificate_signing_request_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CertificateSigningRequest", + '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '503': "Error", + } + 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 deny_certificate_signing_request_with_http_info( + self, + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[CertificateSigningRequest]: + """deny_certificate_signing_request + + deny the specified CertificateSigningRequest + + :param name: The name of the CertificateSigningRequest resource to delete. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deny_certificate_signing_request_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CertificateSigningRequest", + '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '503': "Error", + } + 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 deny_certificate_signing_request_without_preload_content( + self, + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to delete.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """deny_certificate_signing_request + + deny the specified CertificateSigningRequest + + :param name: The name of the CertificateSigningRequest resource to delete. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deny_certificate_signing_request_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "CertificateSigningRequest", + '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _deny_certificate_signing_request_serialize( + self, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v1/certificatesigningrequests/{name}/approval', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_certificate_signing_requests( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -869,20 +1432,16 @@ def list_certificate_signing_requests( ) -> CertificateSigningRequestList: """list_certificate_signing_requests - list CertificateSigningRequests + List CertificateSigningRequest resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -910,8 +1469,6 @@ def list_certificate_signing_requests( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -922,6 +1479,8 @@ def list_certificate_signing_requests( '200': "CertificateSigningRequestList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -939,10 +1498,8 @@ def list_certificate_signing_requests_with_http_info( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -958,20 +1515,16 @@ def list_certificate_signing_requests_with_http_info( ) -> ApiResponse[CertificateSigningRequestList]: """list_certificate_signing_requests - list CertificateSigningRequests + List CertificateSigningRequest resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -999,8 +1552,6 @@ def list_certificate_signing_requests_with_http_info( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1011,6 +1562,8 @@ def list_certificate_signing_requests_with_http_info( '200': "CertificateSigningRequestList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1028,10 +1581,8 @@ def list_certificate_signing_requests_without_preload_content( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1047,20 +1598,16 @@ def list_certificate_signing_requests_without_preload_content( ) -> RESTResponseType: """list_certificate_signing_requests - list CertificateSigningRequests + List CertificateSigningRequest resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1088,8 +1635,6 @@ def list_certificate_signing_requests_without_preload_content( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1100,6 +1645,8 @@ def list_certificate_signing_requests_without_preload_content( '200': "CertificateSigningRequestList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1114,8 +1661,6 @@ def _list_certificate_signing_requests_serialize( label_selector, field_selector, limit, - sort_by, - sort_order, _request_auth, _content_type, _headers, @@ -1154,14 +1699,6 @@ def _list_certificate_signing_requests_serialize( _query_params.append(('limit', limit)) - if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - - if sort_order is not None: - - _query_params.append(('sortOrder', sort_order.value)) - # process the header parameters # process the form parameters # process the body parameter @@ -1201,7 +1738,7 @@ def _list_certificate_signing_requests_serialize( @validate_call def patch_certificate_signing_request( self, - name: Annotated[StrictStr, Field(description="name of the certificatesigningrequest")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1218,9 +1755,9 @@ def patch_certificate_signing_request( ) -> CertificateSigningRequest: """patch_certificate_signing_request - partially update the specified CertificateSigningRequest + Patch a CertificateSigningRequest resource. - :param name: name of the certificatesigningrequest (required) + :param name: The name of the CertificateSigningRequest resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1261,7 +1798,9 @@ def patch_certificate_signing_request( '400': "Error", '401': "Error", '404': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1277,7 +1816,7 @@ def patch_certificate_signing_request( @validate_call def patch_certificate_signing_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the certificatesigningrequest")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1294,9 +1833,9 @@ def patch_certificate_signing_request_with_http_info( ) -> ApiResponse[CertificateSigningRequest]: """patch_certificate_signing_request - partially update the specified CertificateSigningRequest + Patch a CertificateSigningRequest resource. - :param name: name of the certificatesigningrequest (required) + :param name: The name of the CertificateSigningRequest resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1337,7 +1876,9 @@ def patch_certificate_signing_request_with_http_info( '400': "Error", '401': "Error", '404': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1353,7 +1894,7 @@ def patch_certificate_signing_request_with_http_info( @validate_call def patch_certificate_signing_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the certificatesigningrequest")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1370,9 +1911,9 @@ def patch_certificate_signing_request_without_preload_content( ) -> RESTResponseType: """patch_certificate_signing_request - partially update the specified CertificateSigningRequest + Patch a CertificateSigningRequest resource. - :param name: name of the certificatesigningrequest (required) + :param name: The name of the CertificateSigningRequest resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1413,7 +1954,9 @@ def patch_certificate_signing_request_without_preload_content( '400': "Error", '401': "Error", '404': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1505,7 +2048,7 @@ def _patch_certificate_signing_request_serialize( @validate_call def read_certificate_signing_request( self, - name: Annotated[str, Field(strict=True, description="the device identifier of the CertificateSigningRequest")], + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1523,7 +2066,7 @@ def read_certificate_signing_request( read the specified certificateSigningRequest - :param name: the device identifier of the CertificateSigningRequest (required) + :param name: The name of the CertificateSigningRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1558,7 +2101,9 @@ def read_certificate_signing_request( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1574,7 +2119,7 @@ def read_certificate_signing_request( @validate_call def read_certificate_signing_request_with_http_info( self, - name: Annotated[str, Field(strict=True, description="the device identifier of the CertificateSigningRequest")], + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1592,7 +2137,7 @@ def read_certificate_signing_request_with_http_info( read the specified certificateSigningRequest - :param name: the device identifier of the CertificateSigningRequest (required) + :param name: The name of the CertificateSigningRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1627,7 +2172,9 @@ def read_certificate_signing_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1643,7 +2190,7 @@ def read_certificate_signing_request_with_http_info( @validate_call def read_certificate_signing_request_without_preload_content( self, - name: Annotated[str, Field(strict=True, description="the device identifier of the CertificateSigningRequest")], + name: Annotated[str, Field(strict=True, description="The name of the CertificateSigningRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1661,7 +2208,7 @@ def read_certificate_signing_request_without_preload_content( read the specified certificateSigningRequest - :param name: the device identifier of the CertificateSigningRequest (required) + :param name: The name of the CertificateSigningRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1696,7 +2243,9 @@ def read_certificate_signing_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "CertificateSigningRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1771,7 +2320,7 @@ def _read_certificate_signing_request_serialize( @validate_call def replace_certificate_signing_request( self, - name: Annotated[StrictStr, Field(description="name of the CertificateSigningRequest")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to update.")], certificate_signing_request: CertificateSigningRequest, _request_timeout: Union[ None, @@ -1790,7 +2339,7 @@ def replace_certificate_signing_request( replace the specified CertificateSigningRequest - :param name: name of the CertificateSigningRequest (required) + :param name: The name of the CertificateSigningRequest resource to update. (required) :type name: str :param certificate_signing_request: (required) :type certificate_signing_request: CertificateSigningRequest @@ -1830,8 +2379,10 @@ def replace_certificate_signing_request( '201': "CertificateSigningRequest", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1847,7 +2398,7 @@ def replace_certificate_signing_request( @validate_call def replace_certificate_signing_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the CertificateSigningRequest")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to update.")], certificate_signing_request: CertificateSigningRequest, _request_timeout: Union[ None, @@ -1866,7 +2417,7 @@ def replace_certificate_signing_request_with_http_info( replace the specified CertificateSigningRequest - :param name: name of the CertificateSigningRequest (required) + :param name: The name of the CertificateSigningRequest resource to update. (required) :type name: str :param certificate_signing_request: (required) :type certificate_signing_request: CertificateSigningRequest @@ -1906,8 +2457,10 @@ def replace_certificate_signing_request_with_http_info( '201': "CertificateSigningRequest", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1923,7 +2476,7 @@ def replace_certificate_signing_request_with_http_info( @validate_call def replace_certificate_signing_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the CertificateSigningRequest")], + name: Annotated[StrictStr, Field(description="The name of the CertificateSigningRequest resource to update.")], certificate_signing_request: CertificateSigningRequest, _request_timeout: Union[ None, @@ -1942,7 +2495,7 @@ def replace_certificate_signing_request_without_preload_content( replace the specified CertificateSigningRequest - :param name: name of the CertificateSigningRequest (required) + :param name: The name of the CertificateSigningRequest resource to update. (required) :type name: str :param certificate_signing_request: (required) :type certificate_signing_request: CertificateSigningRequest @@ -1982,8 +2535,10 @@ def replace_certificate_signing_request_without_preload_content( '201': "CertificateSigningRequest", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, diff --git a/flightctl/api/device_api.py b/flightctl/api/device_api.py index bb7954e..f8cd301 100644 --- a/flightctl/api/device_api.py +++ b/flightctl/api/device_api.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -21,10 +22,10 @@ from typing_extensions import Annotated from flightctl.models.device import Device from flightctl.models.device_console import DeviceConsole +from flightctl.models.device_decommission import DeviceDecommission from flightctl.models.device_list import DeviceList from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.models.rendered_device_spec import RenderedDeviceSpec -from flightctl.models.sort_order import SortOrder from flightctl.models.status import Status from flightctl.api_client import ApiClient, RequestSerialized @@ -64,7 +65,7 @@ def create_device( ) -> Device: """create_device - create a Device + Create a Device resource. :param device: (required) :type device: Device @@ -102,7 +103,9 @@ def create_device( '201': "Device", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -134,7 +137,7 @@ def create_device_with_http_info( ) -> ApiResponse[Device]: """create_device - create a Device + Create a Device resource. :param device: (required) :type device: Device @@ -172,7 +175,9 @@ def create_device_with_http_info( '201': "Device", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -204,7 +209,7 @@ def create_device_without_preload_content( ) -> RESTResponseType: """create_device - create a Device + Create a Device resource. :param device: (required) :type device: Device @@ -242,7 +247,9 @@ def create_device_without_preload_content( '201': "Device", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -327,10 +334,313 @@ def _create_device_serialize( + @validate_call + def decommission_device( + self, + name: Annotated[StrictStr, Field(description="The name of the Device resource to decommission.")], + device_decommission: DeviceDecommission, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Device: + """decommission_device + + schedule the device to decommission + + :param name: The name of the Device resource to decommission. (required) + :type name: str + :param device_decommission: (required) + :type device_decommission: DeviceDecommission + :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._decommission_device_serialize( + name=name, + device_decommission=device_decommission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Device", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + '503': "Error", + } + 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 decommission_device_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the Device resource to decommission.")], + device_decommission: DeviceDecommission, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Device]: + """decommission_device + + schedule the device to decommission + + :param name: The name of the Device resource to decommission. (required) + :type name: str + :param device_decommission: (required) + :type device_decommission: DeviceDecommission + :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._decommission_device_serialize( + name=name, + device_decommission=device_decommission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Device", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + '503': "Error", + } + 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 decommission_device_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of the Device resource to decommission.")], + device_decommission: DeviceDecommission, + _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: + """decommission_device + + schedule the device to decommission + + :param name: The name of the Device resource to decommission. (required) + :type name: str + :param device_decommission: (required) + :type device_decommission: DeviceDecommission + :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._decommission_device_serialize( + name=name, + device_decommission=device_decommission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Device", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _decommission_device_serialize( + self, + name, + device_decommission, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if device_decommission is not None: + _body_params = device_decommission + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/v1/devices/{name}/decommission', + 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_device( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -346,9 +656,9 @@ def delete_device( ) -> Device: """delete_device - delete a Device + Delete a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -383,7 +693,9 @@ def delete_device( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -399,7 +711,7 @@ def delete_device( @validate_call def delete_device_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -415,9 +727,9 @@ def delete_device_with_http_info( ) -> ApiResponse[Device]: """delete_device - delete a Device + Delete a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -452,7 +764,9 @@ def delete_device_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -468,7 +782,7 @@ def delete_device_with_http_info( @validate_call def delete_device_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -484,9 +798,9 @@ def delete_device_without_preload_content( ) -> RESTResponseType: """delete_device - delete a Device + Delete a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -521,7 +835,9 @@ def delete_device_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -611,7 +927,7 @@ def delete_devices( ) -> Status: """delete_devices - delete a collection of Devices + Delete Device resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -645,6 +961,8 @@ def delete_devices( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -675,7 +993,7 @@ def delete_devices_with_http_info( ) -> ApiResponse[Status]: """delete_devices - delete a collection of Devices + Delete Device resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -709,6 +1027,8 @@ def delete_devices_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -739,7 +1059,7 @@ def delete_devices_without_preload_content( ) -> RESTResponseType: """delete_devices - delete a collection of Devices + Delete Device resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -773,6 +1093,8 @@ def delete_devices_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -844,8 +1166,8 @@ def _delete_devices_serialize( @validate_call def get_rendered_device_spec( self, - name: Annotated[StrictStr, Field(description="Name of the device")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -861,11 +1183,11 @@ def get_rendered_device_spec( ) -> RenderedDeviceSpec: """get_rendered_device_spec - get the full specification for the specified device + Get the rendered, self-contained device specification for a Device resource. - :param name: Name of the device (required) + :param name: The name of the Device resource to get the rendered device specification for. (required) :type name: str - :param known_rendered_version: The last known renderedVersion + :param known_rendered_version: The last known renderedVersion. :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -902,8 +1224,10 @@ def get_rendered_device_spec( '200': "RenderedDeviceSpec", '204': None, '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -919,8 +1243,8 @@ def get_rendered_device_spec( @validate_call def get_rendered_device_spec_with_http_info( self, - name: Annotated[StrictStr, Field(description="Name of the device")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -936,11 +1260,11 @@ def get_rendered_device_spec_with_http_info( ) -> ApiResponse[RenderedDeviceSpec]: """get_rendered_device_spec - get the full specification for the specified device + Get the rendered, self-contained device specification for a Device resource. - :param name: Name of the device (required) + :param name: The name of the Device resource to get the rendered device specification for. (required) :type name: str - :param known_rendered_version: The last known renderedVersion + :param known_rendered_version: The last known renderedVersion. :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -977,8 +1301,10 @@ def get_rendered_device_spec_with_http_info( '200': "RenderedDeviceSpec", '204': None, '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -994,8 +1320,8 @@ def get_rendered_device_spec_with_http_info( @validate_call def get_rendered_device_spec_without_preload_content( self, - name: Annotated[StrictStr, Field(description="Name of the device")], - known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion")] = None, + name: Annotated[StrictStr, Field(description="The name of the Device resource to get the rendered device specification for.")], + known_rendered_version: Annotated[Optional[StrictStr], Field(description="The last known renderedVersion.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1011,11 +1337,11 @@ def get_rendered_device_spec_without_preload_content( ) -> RESTResponseType: """get_rendered_device_spec - get the full specification for the specified device + Get the rendered, self-contained device specification for a Device resource. - :param name: Name of the device (required) + :param name: The name of the Device resource to get the rendered device specification for. (required) :type name: str - :param known_rendered_version: The last known renderedVersion + :param known_rendered_version: The last known renderedVersion. :type known_rendered_version: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1052,8 +1378,10 @@ def get_rendered_device_spec_without_preload_content( '200': "RenderedDeviceSpec", '204': None, '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1135,13 +1463,11 @@ def list_devices( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, status_filter: Annotated[Optional[List[StrictStr]], Field(description="A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1157,13 +1483,13 @@ def list_devices( ) -> DeviceList: """list_devices - list Devices + List Device resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :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 status_filter: A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything. :type status_filter: List[str] @@ -1173,10 +1499,6 @@ def list_devices( :type owner: str :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. :type summary_only: bool - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1207,8 +1529,6 @@ def list_devices( limit=limit, owner=owner, summary_only=summary_only, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1220,6 +1540,7 @@ def list_devices( '400': "Error", '401': "Error", '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1237,13 +1558,11 @@ def list_devices_with_http_info( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, status_filter: Annotated[Optional[List[StrictStr]], Field(description="A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1259,13 +1578,13 @@ def list_devices_with_http_info( ) -> ApiResponse[DeviceList]: """list_devices - list Devices + List Device resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :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 status_filter: A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything. :type status_filter: List[str] @@ -1275,10 +1594,6 @@ def list_devices_with_http_info( :type owner: str :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. :type summary_only: bool - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1309,8 +1624,6 @@ def list_devices_with_http_info( limit=limit, owner=owner, summary_only=summary_only, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1322,6 +1635,7 @@ def list_devices_with_http_info( '400': "Error", '401': "Error", '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1339,13 +1653,11 @@ def list_devices_without_preload_content( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, status_filter: Annotated[Optional[List[StrictStr]], Field(description="A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, summary_only: Annotated[Optional[StrictBool], Field(description="A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1361,13 +1673,13 @@ def list_devices_without_preload_content( ) -> RESTResponseType: """list_devices - list Devices + List Device resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :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 status_filter: A filter to restrict the list of devices by the value of the filtered status key. Defaults to everything. :type status_filter: List[str] @@ -1377,10 +1689,6 @@ def list_devices_without_preload_content( :type owner: str :param summary_only: A boolean flag to include only a summary of the devices. When set to true, the response will contain only the summary information. Only the 'owner' and 'labelSelector' parameters are supported when 'summaryOnly' is true. :type summary_only: bool - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1411,8 +1719,6 @@ def list_devices_without_preload_content( limit=limit, owner=owner, summary_only=summary_only, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1424,6 +1730,7 @@ def list_devices_without_preload_content( '400': "Error", '401': "Error", '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1441,8 +1748,6 @@ def _list_devices_serialize( limit, owner, summary_only, - sort_by, - sort_order, _request_auth, _content_type, _headers, @@ -1494,14 +1799,6 @@ def _list_devices_serialize( _query_params.append(('summaryOnly', summary_only)) - if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - - if sort_order is not None: - - _query_params.append(('sortOrder', sort_order.value)) - # process the header parameters # process the form parameters # process the body parameter @@ -1541,7 +1838,7 @@ def _list_devices_serialize( @validate_call def patch_device( self, - name: Annotated[StrictStr, Field(description="name of the device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1558,9 +1855,9 @@ def patch_device( ) -> Device: """patch_device - Patches the specified device + Patch a Device resource. - :param name: name of the device (required) + :param name: The name of the Device resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1599,8 +1896,10 @@ def patch_device( '200': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1616,7 +1915,7 @@ def patch_device( @validate_call def patch_device_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1633,9 +1932,9 @@ def patch_device_with_http_info( ) -> ApiResponse[Device]: """patch_device - Patches the specified device + Patch a Device resource. - :param name: name of the device (required) + :param name: The name of the Device resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1674,8 +1973,10 @@ def patch_device_with_http_info( '200': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1691,7 +1992,7 @@ def patch_device_with_http_info( @validate_call def patch_device_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1708,9 +2009,9 @@ def patch_device_without_preload_content( ) -> RESTResponseType: """patch_device - Patches the specified device + Patch a Device resource. - :param name: name of the device (required) + :param name: The name of the Device resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1749,8 +2050,10 @@ def patch_device_without_preload_content( '200': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1842,7 +2145,7 @@ def _patch_device_serialize( @validate_call def read_device( self, - name: Annotated[StrictStr, Field(description="unique name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1858,9 +2161,9 @@ def read_device( ) -> Device: """read_device - read the specified Device + Get a Device resource. - :param name: unique name of the Device (required) + :param name: The name of the Device resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1895,7 +2198,9 @@ def read_device( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1911,7 +2216,7 @@ def read_device( @validate_call def read_device_with_http_info( self, - name: Annotated[StrictStr, Field(description="unique name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1927,9 +2232,9 @@ def read_device_with_http_info( ) -> ApiResponse[Device]: """read_device - read the specified Device + Get a Device resource. - :param name: unique name of the Device (required) + :param name: The name of the Device resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1964,7 +2269,9 @@ def read_device_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1980,7 +2287,7 @@ def read_device_with_http_info( @validate_call def read_device_without_preload_content( self, - name: Annotated[StrictStr, Field(description="unique name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1996,9 +2303,9 @@ def read_device_without_preload_content( ) -> RESTResponseType: """read_device - read the specified Device + Get a Device resource. - :param name: unique name of the Device (required) + :param name: The name of the Device resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2033,7 +2340,9 @@ def read_device_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2108,7 +2417,7 @@ def _read_device_serialize( @validate_call def read_device_status( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2124,9 +2433,9 @@ def read_device_status( ) -> Device: """read_device_status - read status of the specified Device + Get the status of a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2161,7 +2470,9 @@ def read_device_status( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2177,7 +2488,7 @@ def read_device_status( @validate_call def read_device_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2193,9 +2504,9 @@ def read_device_status_with_http_info( ) -> ApiResponse[Device]: """read_device_status - read status of the specified Device + Get the status of a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2230,7 +2541,9 @@ def read_device_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2246,7 +2559,7 @@ def read_device_status_with_http_info( @validate_call def read_device_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2262,9 +2575,9 @@ def read_device_status_without_preload_content( ) -> RESTResponseType: """read_device_status - read status of the specified Device + Get the status of a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2299,7 +2612,9 @@ def read_device_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Device", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2374,7 +2689,7 @@ def _read_device_status_serialize( @validate_call def replace_device( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to update.")], device: Device, _request_timeout: Union[ None, @@ -2391,9 +2706,9 @@ def replace_device( ) -> Device: """replace_device - replace the specified Device + Update a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to update. (required) :type name: str :param device: (required) :type device: Device @@ -2433,8 +2748,10 @@ def replace_device( '201': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2450,7 +2767,7 @@ def replace_device( @validate_call def replace_device_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to update.")], device: Device, _request_timeout: Union[ None, @@ -2467,9 +2784,9 @@ def replace_device_with_http_info( ) -> ApiResponse[Device]: """replace_device - replace the specified Device + Update a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to update. (required) :type name: str :param device: (required) :type device: Device @@ -2509,8 +2826,10 @@ def replace_device_with_http_info( '201': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2526,7 +2845,7 @@ def replace_device_with_http_info( @validate_call def replace_device_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to update.")], device: Device, _request_timeout: Union[ None, @@ -2543,9 +2862,9 @@ def replace_device_without_preload_content( ) -> RESTResponseType: """replace_device - replace the specified Device + Update a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to update. (required) :type name: str :param device: (required) :type device: Device @@ -2585,8 +2904,10 @@ def replace_device_without_preload_content( '201': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2677,7 +2998,7 @@ def _replace_device_serialize( @validate_call def replace_device_status( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to update.")], device: Device, _request_timeout: Union[ None, @@ -2694,9 +3015,9 @@ def replace_device_status( ) -> Device: """replace_device_status - replace status of the specified Device + Update the status of a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to update. (required) :type name: str :param device: (required) :type device: Device @@ -2735,7 +3056,9 @@ def replace_device_status( '200': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2751,7 +3074,7 @@ def replace_device_status( @validate_call def replace_device_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to update.")], device: Device, _request_timeout: Union[ None, @@ -2768,9 +3091,9 @@ def replace_device_status_with_http_info( ) -> ApiResponse[Device]: """replace_device_status - replace status of the specified Device + Update the status of a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to update. (required) :type name: str :param device: (required) :type device: Device @@ -2809,7 +3132,9 @@ def replace_device_status_with_http_info( '200': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2825,7 +3150,7 @@ def replace_device_status_with_http_info( @validate_call def replace_device_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to update.")], device: Device, _request_timeout: Union[ None, @@ -2842,9 +3167,9 @@ def replace_device_status_without_preload_content( ) -> RESTResponseType: """replace_device_status - replace status of the specified Device + Update the status of a Device resource. - :param name: name of the Device (required) + :param name: The name of the Device resource to update. (required) :type name: str :param device: (required) :type device: Device @@ -2883,7 +3208,9 @@ def replace_device_status_without_preload_content( '200': "Device", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2974,7 +3301,7 @@ def _replace_device_status_serialize( @validate_call def request_console( self, - name: Annotated[StrictStr, Field(description="unique name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to create a console connection to.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2992,7 +3319,7 @@ def request_console( Request a console connection - :param name: unique name of the Device (required) + :param name: The name of the Device resource to create a console connection to. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3027,8 +3354,10 @@ def request_console( _response_types_map: Dict[str, Optional[str]] = { '200': "DeviceConsole", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -3044,7 +3373,7 @@ def request_console( @validate_call def request_console_with_http_info( self, - name: Annotated[StrictStr, Field(description="unique name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to create a console connection to.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3062,7 +3391,7 @@ def request_console_with_http_info( Request a console connection - :param name: unique name of the Device (required) + :param name: The name of the Device resource to create a console connection to. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3097,8 +3426,10 @@ def request_console_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "DeviceConsole", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -3114,7 +3445,7 @@ def request_console_with_http_info( @validate_call def request_console_without_preload_content( self, - name: Annotated[StrictStr, Field(description="unique name of the Device")], + name: Annotated[StrictStr, Field(description="The name of the Device resource to create a console connection to.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3132,7 +3463,7 @@ def request_console_without_preload_content( Request a console connection - :param name: unique name of the Device (required) + :param name: The name of the Device resource to create a console connection to. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3167,8 +3498,10 @@ def request_console_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "DeviceConsole", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, diff --git a/flightctl/api/enrollmentrequest_api.py b/flightctl/api/enrollmentrequest_api.py index f641d2b..fc4ba9d 100644 --- a/flightctl/api/enrollmentrequest_api.py +++ b/flightctl/api/enrollmentrequest_api.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -19,10 +20,10 @@ from pydantic import Field, StrictInt, StrictStr from typing import Optional from typing_extensions import Annotated +from flightctl.models.enrollment_config import EnrollmentConfig from flightctl.models.enrollment_request import EnrollmentRequest from flightctl.models.enrollment_request_approval import EnrollmentRequestApproval from flightctl.models.enrollment_request_list import EnrollmentRequestList -from flightctl.models.sort_order import SortOrder from flightctl.models.status import Status from flightctl.api_client import ApiClient, RequestSerialized @@ -46,7 +47,7 @@ def __init__(self, api_client=None) -> None: @validate_call def approve_enrollment_request( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest to approve or deny.")], enrollment_request_approval: EnrollmentRequestApproval, _request_timeout: Union[ None, @@ -63,9 +64,9 @@ def approve_enrollment_request( ) -> EnrollmentRequestApproval: """approve_enrollment_request - create approval of the specified EnrollmentRequest + Approve or deny an EnrollmentRequest. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest to approve or deny. (required) :type name: str :param enrollment_request_approval: (required) :type enrollment_request_approval: EnrollmentRequestApproval @@ -105,8 +106,10 @@ def approve_enrollment_request( '422': "Error", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '500': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -122,7 +125,7 @@ def approve_enrollment_request( @validate_call def approve_enrollment_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest to approve or deny.")], enrollment_request_approval: EnrollmentRequestApproval, _request_timeout: Union[ None, @@ -139,9 +142,9 @@ def approve_enrollment_request_with_http_info( ) -> ApiResponse[EnrollmentRequestApproval]: """approve_enrollment_request - create approval of the specified EnrollmentRequest + Approve or deny an EnrollmentRequest. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest to approve or deny. (required) :type name: str :param enrollment_request_approval: (required) :type enrollment_request_approval: EnrollmentRequestApproval @@ -181,8 +184,10 @@ def approve_enrollment_request_with_http_info( '422': "Error", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '500': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -198,7 +203,7 @@ def approve_enrollment_request_with_http_info( @validate_call def approve_enrollment_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest to approve or deny.")], enrollment_request_approval: EnrollmentRequestApproval, _request_timeout: Union[ None, @@ -215,9 +220,9 @@ def approve_enrollment_request_without_preload_content( ) -> RESTResponseType: """approve_enrollment_request - create approval of the specified EnrollmentRequest + Approve or deny an EnrollmentRequest. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest to approve or deny. (required) :type name: str :param enrollment_request_approval: (required) :type enrollment_request_approval: EnrollmentRequestApproval @@ -257,8 +262,10 @@ def approve_enrollment_request_without_preload_content( '422': "Error", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '500': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -365,7 +372,7 @@ def create_enrollment_request( ) -> EnrollmentRequest: """create_enrollment_request - request enrollment of a Device + Create an EnrollmentRequest resource. :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -404,7 +411,9 @@ def create_enrollment_request( '208': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -436,7 +445,7 @@ def create_enrollment_request_with_http_info( ) -> ApiResponse[EnrollmentRequest]: """create_enrollment_request - request enrollment of a Device + Create an EnrollmentRequest resource. :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -475,7 +484,9 @@ def create_enrollment_request_with_http_info( '208': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -507,7 +518,7 @@ def create_enrollment_request_without_preload_content( ) -> RESTResponseType: """create_enrollment_request - request enrollment of a Device + Create an EnrollmentRequest resource. :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -546,7 +557,9 @@ def create_enrollment_request_without_preload_content( '208': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -634,7 +647,7 @@ def _create_enrollment_request_serialize( @validate_call def delete_enrollment_request( self, - name: Annotated[StrictStr, Field(description="name of the Enrollment Request")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -650,9 +663,9 @@ def delete_enrollment_request( ) -> EnrollmentRequest: """delete_enrollment_request - delete a Enrollment Request + Delete an EnrollmentRequest resource. - :param name: name of the Enrollment Request (required) + :param name: The name of the EnrollmentRequest resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -687,7 +700,9 @@ def delete_enrollment_request( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -703,7 +718,7 @@ def delete_enrollment_request( @validate_call def delete_enrollment_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Enrollment Request")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -719,9 +734,9 @@ def delete_enrollment_request_with_http_info( ) -> ApiResponse[EnrollmentRequest]: """delete_enrollment_request - delete a Enrollment Request + Delete an EnrollmentRequest resource. - :param name: name of the Enrollment Request (required) + :param name: The name of the EnrollmentRequest resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -756,7 +771,9 @@ def delete_enrollment_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -772,7 +789,7 @@ def delete_enrollment_request_with_http_info( @validate_call def delete_enrollment_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Enrollment Request")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -788,9 +805,9 @@ def delete_enrollment_request_without_preload_content( ) -> RESTResponseType: """delete_enrollment_request - delete a Enrollment Request + Delete an EnrollmentRequest resource. - :param name: name of the Enrollment Request (required) + :param name: The name of the EnrollmentRequest resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -825,7 +842,9 @@ def delete_enrollment_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -915,7 +934,7 @@ def delete_enrollment_requests( ) -> Status: """delete_enrollment_requests - delete a collection of Enrollments + Delete EnrollmentRequest resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -949,6 +968,8 @@ def delete_enrollment_requests( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -979,7 +1000,7 @@ def delete_enrollment_requests_with_http_info( ) -> ApiResponse[Status]: """delete_enrollment_requests - delete a collection of Enrollments + Delete EnrollmentRequest resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1013,6 +1034,8 @@ def delete_enrollment_requests_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1043,7 +1066,7 @@ def delete_enrollment_requests_without_preload_content( ) -> RESTResponseType: """delete_enrollment_requests - delete a collection of Enrollments + Delete EnrollmentRequest resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1077,6 +1100,8 @@ def delete_enrollment_requests_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1145,15 +1170,288 @@ def _delete_enrollment_requests_serialize( + @validate_call + def enrollment_config( + self, + name: Annotated[StrictStr, Field(description="The name of approved CertificateSigningRequest.")], + _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, + ) -> EnrollmentConfig: + """enrollment_config + + Get an EnrollmentConfig. + + :param name: The name of approved CertificateSigningRequest. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enrollment_config_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnrollmentConfig", + '400': "Error", + '403': "Error", + '404': "Error", + '401': "Error", + '503': "Error", + } + 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 enrollment_config_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of approved CertificateSigningRequest.")], + _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[EnrollmentConfig]: + """enrollment_config + + Get an EnrollmentConfig. + + :param name: The name of approved CertificateSigningRequest. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enrollment_config_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnrollmentConfig", + '400': "Error", + '403': "Error", + '404': "Error", + '401': "Error", + '503': "Error", + } + 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 enrollment_config_without_preload_content( + self, + name: Annotated[StrictStr, Field(description="The name of approved CertificateSigningRequest.")], + _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: + """enrollment_config + + Get an EnrollmentConfig. + + :param name: The name of approved CertificateSigningRequest. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._enrollment_config_serialize( + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "EnrollmentConfig", + '400': "Error", + '403': "Error", + '404': "Error", + '401': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _enrollment_config_serialize( + self, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/enrollmentconfig/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def list_enrollment_requests( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1169,20 +1467,16 @@ def list_enrollment_requests( ) -> EnrollmentRequestList: """list_enrollment_requests - list Enrollment Requests + List EnrollmentRequest resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1210,8 +1504,6 @@ def list_enrollment_requests( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1222,6 +1514,8 @@ def list_enrollment_requests( '200': "EnrollmentRequestList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1239,10 +1533,8 @@ def list_enrollment_requests_with_http_info( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1258,20 +1550,16 @@ def list_enrollment_requests_with_http_info( ) -> ApiResponse[EnrollmentRequestList]: """list_enrollment_requests - list Enrollment Requests + List EnrollmentRequest resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1299,8 +1587,6 @@ def list_enrollment_requests_with_http_info( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1311,6 +1597,8 @@ def list_enrollment_requests_with_http_info( '200': "EnrollmentRequestList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1328,10 +1616,8 @@ def list_enrollment_requests_without_preload_content( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1347,20 +1633,16 @@ def list_enrollment_requests_without_preload_content( ) -> RESTResponseType: """list_enrollment_requests - list Enrollment Requests + List EnrollmentRequest resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1388,8 +1670,6 @@ def list_enrollment_requests_without_preload_content( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1400,6 +1680,8 @@ def list_enrollment_requests_without_preload_content( '200': "EnrollmentRequestList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1414,8 +1696,6 @@ def _list_enrollment_requests_serialize( label_selector, field_selector, limit, - sort_by, - sort_order, _request_auth, _content_type, _headers, @@ -1454,14 +1734,6 @@ def _list_enrollment_requests_serialize( _query_params.append(('limit', limit)) - if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - - if sort_order is not None: - - _query_params.append(('sortOrder', sort_order.value)) - # process the header parameters # process the form parameters # process the body parameter @@ -1501,7 +1773,7 @@ def _list_enrollment_requests_serialize( @validate_call def read_enrollment_request( self, - name: Annotated[StrictStr, Field(description="the fingerprint of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1517,9 +1789,9 @@ def read_enrollment_request( ) -> EnrollmentRequest: """read_enrollment_request - read the specified Enrollment + Get an EnrollmentRequest resource. - :param name: the fingerprint of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1554,7 +1826,9 @@ def read_enrollment_request( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1570,7 +1844,7 @@ def read_enrollment_request( @validate_call def read_enrollment_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="the fingerprint of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1586,9 +1860,9 @@ def read_enrollment_request_with_http_info( ) -> ApiResponse[EnrollmentRequest]: """read_enrollment_request - read the specified Enrollment + Get an EnrollmentRequest resource. - :param name: the fingerprint of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1623,7 +1897,9 @@ def read_enrollment_request_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1639,7 +1915,7 @@ def read_enrollment_request_with_http_info( @validate_call def read_enrollment_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="the fingerprint of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1655,9 +1931,9 @@ def read_enrollment_request_without_preload_content( ) -> RESTResponseType: """read_enrollment_request - read the specified Enrollment + Get an EnrollmentRequest resource. - :param name: the fingerprint of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1692,7 +1968,9 @@ def read_enrollment_request_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1767,7 +2045,7 @@ def _read_enrollment_request_serialize( @validate_call def read_enrollment_request_status( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1783,9 +2061,9 @@ def read_enrollment_request_status( ) -> EnrollmentRequest: """read_enrollment_request_status - read status of the specified EnrollmentRequest + Get the status of an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1820,7 +2098,9 @@ def read_enrollment_request_status( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1836,7 +2116,7 @@ def read_enrollment_request_status( @validate_call def read_enrollment_request_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1852,9 +2132,9 @@ def read_enrollment_request_status_with_http_info( ) -> ApiResponse[EnrollmentRequest]: """read_enrollment_request_status - read status of the specified EnrollmentRequest + Get the status of an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1889,7 +2169,9 @@ def read_enrollment_request_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1905,7 +2187,7 @@ def read_enrollment_request_status_with_http_info( @validate_call def read_enrollment_request_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1921,9 +2203,9 @@ def read_enrollment_request_status_without_preload_content( ) -> RESTResponseType: """read_enrollment_request_status - read status of the specified EnrollmentRequest + Get the status of an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1958,7 +2240,9 @@ def read_enrollment_request_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2033,7 +2317,7 @@ def _read_enrollment_request_status_serialize( @validate_call def replace_enrollment_request( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to update.")], enrollment_request: EnrollmentRequest, _request_timeout: Union[ None, @@ -2050,9 +2334,9 @@ def replace_enrollment_request( ) -> EnrollmentRequest: """replace_enrollment_request - replace the specified Enrollment Request + Update an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to update. (required) :type name: str :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -2092,8 +2376,10 @@ def replace_enrollment_request( '201': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2109,7 +2395,7 @@ def replace_enrollment_request( @validate_call def replace_enrollment_request_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to update.")], enrollment_request: EnrollmentRequest, _request_timeout: Union[ None, @@ -2126,9 +2412,9 @@ def replace_enrollment_request_with_http_info( ) -> ApiResponse[EnrollmentRequest]: """replace_enrollment_request - replace the specified Enrollment Request + Update an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to update. (required) :type name: str :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -2168,8 +2454,10 @@ def replace_enrollment_request_with_http_info( '201': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2185,7 +2473,7 @@ def replace_enrollment_request_with_http_info( @validate_call def replace_enrollment_request_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to update.")], enrollment_request: EnrollmentRequest, _request_timeout: Union[ None, @@ -2202,9 +2490,9 @@ def replace_enrollment_request_without_preload_content( ) -> RESTResponseType: """replace_enrollment_request - replace the specified Enrollment Request + Update an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to update. (required) :type name: str :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -2244,8 +2532,10 @@ def replace_enrollment_request_without_preload_content( '201': "EnrollmentRequest", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2336,7 +2626,7 @@ def _replace_enrollment_request_serialize( @validate_call def replace_enrollment_request_status( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to update.")], enrollment_request: EnrollmentRequest, _request_timeout: Union[ None, @@ -2353,9 +2643,9 @@ def replace_enrollment_request_status( ) -> EnrollmentRequest: """replace_enrollment_request_status - replace status of the specified EnrollmentRequest + Update the status of an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to update. (required) :type name: str :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -2393,7 +2683,9 @@ def replace_enrollment_request_status( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2409,7 +2701,7 @@ def replace_enrollment_request_status( @validate_call def replace_enrollment_request_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to update.")], enrollment_request: EnrollmentRequest, _request_timeout: Union[ None, @@ -2426,9 +2718,9 @@ def replace_enrollment_request_status_with_http_info( ) -> ApiResponse[EnrollmentRequest]: """replace_enrollment_request_status - replace status of the specified EnrollmentRequest + Update the status of an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to update. (required) :type name: str :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -2466,7 +2758,9 @@ def replace_enrollment_request_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2482,7 +2776,7 @@ def replace_enrollment_request_status_with_http_info( @validate_call def replace_enrollment_request_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the EnrollmentRequest")], + name: Annotated[StrictStr, Field(description="The name of the EnrollmentRequest resource to update.")], enrollment_request: EnrollmentRequest, _request_timeout: Union[ None, @@ -2499,9 +2793,9 @@ def replace_enrollment_request_status_without_preload_content( ) -> RESTResponseType: """replace_enrollment_request_status - replace status of the specified EnrollmentRequest + Update the status of an EnrollmentRequest resource. - :param name: name of the EnrollmentRequest (required) + :param name: The name of the EnrollmentRequest resource to update. (required) :type name: str :param enrollment_request: (required) :type enrollment_request: EnrollmentRequest @@ -2539,7 +2833,9 @@ def replace_enrollment_request_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "EnrollmentRequest", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, diff --git a/flightctl/api/fleet_api.py b/flightctl/api/fleet_api.py index 3d77ff5..def2ecd 100644 --- a/flightctl/api/fleet_api.py +++ b/flightctl/api/fleet_api.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -22,8 +23,9 @@ from flightctl.models.fleet import Fleet from flightctl.models.fleet_list import FleetList from flightctl.models.patch_request_inner import PatchRequestInner -from flightctl.models.sort_order import SortOrder from flightctl.models.status import Status +from flightctl.models.template_version import TemplateVersion +from flightctl.models.template_version_list import TemplateVersionList from flightctl.api_client import ApiClient, RequestSerialized from flightctl.api_response import ApiResponse @@ -62,7 +64,7 @@ def create_fleet( ) -> Fleet: """create_fleet - create a Fleet + Create a Fleet resource. :param fleet: (required) :type fleet: Fleet @@ -100,7 +102,9 @@ def create_fleet( '201': "Fleet", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -132,7 +136,7 @@ def create_fleet_with_http_info( ) -> ApiResponse[Fleet]: """create_fleet - create a Fleet + Create a Fleet resource. :param fleet: (required) :type fleet: Fleet @@ -170,7 +174,9 @@ def create_fleet_with_http_info( '201': "Fleet", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -202,7 +208,7 @@ def create_fleet_without_preload_content( ) -> RESTResponseType: """create_fleet - create a Fleet + Create a Fleet resource. :param fleet: (required) :type fleet: Fleet @@ -240,7 +246,9 @@ def create_fleet_without_preload_content( '201': "Fleet", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -328,7 +336,7 @@ def _create_fleet_serialize( @validate_call def delete_fleet( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -344,9 +352,9 @@ def delete_fleet( ) -> Fleet: """delete_fleet - delete a Fleet + Delete a Fleet resource. - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -381,8 +389,10 @@ def delete_fleet( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -398,7 +408,7 @@ def delete_fleet( @validate_call def delete_fleet_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -414,9 +424,9 @@ def delete_fleet_with_http_info( ) -> ApiResponse[Fleet]: """delete_fleet - delete a Fleet + Delete a Fleet resource. - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -451,8 +461,10 @@ def delete_fleet_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -468,7 +480,7 @@ def delete_fleet_with_http_info( @validate_call def delete_fleet_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -484,9 +496,9 @@ def delete_fleet_without_preload_content( ) -> RESTResponseType: """delete_fleet - delete a Fleet + Delete a Fleet resource. - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -521,8 +533,10 @@ def delete_fleet_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -612,7 +626,7 @@ def delete_fleets( ) -> Status: """delete_fleets - delete a collection of Fleets + Delete Fleet resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -646,6 +660,8 @@ def delete_fleets( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -676,7 +692,7 @@ def delete_fleets_with_http_info( ) -> ApiResponse[Status]: """delete_fleets - delete a collection of Fleets + Delete Fleet resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -710,6 +726,8 @@ def delete_fleets_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -740,7 +758,7 @@ def delete_fleets_without_preload_content( ) -> RESTResponseType: """delete_fleets - delete a collection of Fleets + Delete Fleet resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -774,6 +792,8 @@ def delete_fleets_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -842,17 +862,1016 @@ def _delete_fleets_serialize( + @validate_call + def delete_template_version( + self, + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], + _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, + ) -> TemplateVersion: + """delete_template_version + + delete a template version + + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_template_version_serialize( + fleet=fleet, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateVersion", + '401': "Error", + '403': "Error", + '404': "Error", + '503': "Error", + } + 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_version_with_http_info( + self, + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], + _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[TemplateVersion]: + """delete_template_version + + delete a template version + + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_template_version_serialize( + fleet=fleet, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateVersion", + '401': "Error", + '403': "Error", + '404': "Error", + '503': "Error", + } + 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_version_without_preload_content( + self, + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], + _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_version + + delete a template version + + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_template_version_serialize( + fleet=fleet, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateVersion", + '401': "Error", + '403': "Error", + '404': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_template_version_serialize( + self, + fleet, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fleet is not None: + _path_params['fleet'] = fleet + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/v1/fleets/{fleet}/templateversions/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def 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': "Error", + '403': "Error", + '503': "Error", + } + 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': "Error", + '403': "Error", + '503': "Error", + } + 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': "Error", + '403': "Error", + '503': "Error", + } + 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 list_fleets( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, + add_devices_count: Annotated[Optional[StrictBool], Field(description="Include the number of devices in each fleet.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FleetList: + """list_fleets + + List Fleet resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param owner: A selector to restrict the list of returned objects by their owner. Defaults to everything. + :type owner: str + :param add_devices_count: Include the number of devices in each fleet. + :type add_devices_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_fleets_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + owner=owner, + add_devices_count=add_devices_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FleetList", + '400': "Error", + '401': "Error", + '403': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_fleets_with_http_info( + self, + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, + add_devices_count: Annotated[Optional[StrictBool], Field(description="Include the number of devices in each fleet.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FleetList]: + """list_fleets + + List Fleet resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param owner: A selector to restrict the list of returned objects by their owner. Defaults to everything. + :type owner: str + :param add_devices_count: Include the number of devices in each fleet. + :type add_devices_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_fleets_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + owner=owner, + add_devices_count=add_devices_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FleetList", + '400': "Error", + '401': "Error", + '403': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_fleets_without_preload_content( + self, + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, + add_devices_count: Annotated[Optional[StrictBool], Field(description="Include the number of devices in each fleet.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """list_fleets + + List Fleet resources. + + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param owner: A selector to restrict the list of returned objects by their owner. Defaults to everything. + :type owner: str + :param add_devices_count: Include the number of devices in each fleet. + :type add_devices_count: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_fleets_serialize( + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + owner=owner, + add_devices_count=add_devices_count, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FleetList", + '400': "Error", + '401': "Error", + '403': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_fleets_serialize( + self, + var_continue, + label_selector, + field_selector, + limit, + owner, + add_devices_count, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if owner is not None: + + _query_params.append(('owner', owner)) + + if add_devices_count is not None: + + _query_params.append(('addDevicesCount', add_devices_count)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/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 list_template_versions( + self, + fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> TemplateVersionList: + """list_template_versions + + list template versions + + :param fleet: The owner of the template versions. (required) + :type fleet: str + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_template_versions_serialize( + fleet=fleet, + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateVersionList", + '400': "Error", + '401': "Error", + '403': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_template_versions_with_http_info( + self, + fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], + var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, - add_devices_count: Annotated[Optional[StrictBool], Field(description="include the number of devices in each fleet")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -865,27 +1884,21 @@ def list_fleets( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FleetList: - """list_fleets + ) -> ApiResponse[TemplateVersionList]: + """list_template_versions - list Fleets + list template versions + :param fleet: The owner of the template versions. (required) + :type fleet: str :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param owner: A selector to restrict the list of returned objects by their owner. Defaults to everything. - :type owner: str - :param add_devices_count: include the number of devices in each fleet - :type add_devices_count: bool - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -908,15 +1921,12 @@ def list_fleets( :return: Returns the result object. """ # noqa: E501 - _param = self._list_fleets_serialize( + _param = self._list_template_versions_serialize( + fleet=fleet, var_continue=var_continue, label_selector=label_selector, field_selector=field_selector, limit=limit, - owner=owner, - add_devices_count=add_devices_count, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -924,9 +1934,11 @@ def list_fleets( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FleetList", + '200': "TemplateVersionList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -936,20 +1948,17 @@ def list_fleets( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call - def list_fleets_with_http_info( + def list_template_versions_without_preload_content( self, + fleet: Annotated[StrictStr, Field(description="The owner of the template versions.")], var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, - add_devices_count: Annotated[Optional[StrictBool], Field(description="include the number of devices in each fleet")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -962,27 +1971,255 @@ def list_fleets_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FleetList]: - """list_fleets + ) -> RESTResponseType: + """list_template_versions + + list template versions + + :param fleet: The owner of the template versions. (required) + :type fleet: str + :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. + :type var_continue: str + :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. + :type label_selector: str + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). + :type field_selector: str + :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. + :type limit: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_template_versions_serialize( + fleet=fleet, + var_continue=var_continue, + label_selector=label_selector, + field_selector=field_selector, + limit=limit, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TemplateVersionList", + '400': "Error", + '401': "Error", + '403': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_template_versions_serialize( + self, + fleet, + var_continue, + label_selector, + field_selector, + limit, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if fleet is not None: + _path_params['fleet'] = fleet + # process the query parameters + if var_continue is not None: + + _query_params.append(('continue', var_continue)) + + if label_selector is not None: + + _query_params.append(('labelSelector', label_selector)) + + if field_selector is not None: + + _query_params.append(('fieldSelector', field_selector)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/v1/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 patch_fleet( + self, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: Optional[List[PatchRequestInner]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Fleet: + """patch_fleet + + Patch a Fleet resource. + + :param name: The name of the Fleet resource to patch. (required) + :type name: str + :param patch_request_inner: + :type patch_request_inner: List[PatchRequestInner] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._patch_fleet_serialize( + name=name, + patch_request_inner=patch_request_inner, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Fleet", + '400': "Error", + '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '503': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def patch_fleet_with_http_info( + self, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: Optional[List[PatchRequestInner]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Fleet]: + """patch_fleet - list Fleets + Patch a Fleet resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int - :param owner: A selector to restrict the list of returned objects by their owner. Defaults to everything. - :type owner: str - :param add_devices_count: include the number of devices in each fleet - :type add_devices_count: bool - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder + :param name: The name of the Fleet resource to patch. (required) + :type name: str + :param patch_request_inner: + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1005,15 +2242,9 @@ def list_fleets_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_fleets_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - owner=owner, - add_devices_count=add_devices_count, - sort_by=sort_by, - sort_order=sort_order, + _param = self._patch_fleet_serialize( + name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1021,9 +2252,13 @@ def list_fleets_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FleetList", + '200': "Fleet", '400': "Error", '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1037,16 +2272,10 @@ def list_fleets_with_http_info( @validate_call - def list_fleets_without_preload_content( + def patch_fleet_without_preload_content( self, - var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, - limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - owner: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their owner. Defaults to everything.")] = None, - add_devices_count: Annotated[Optional[StrictBool], Field(description="include the number of devices in each fleet")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to patch.")], + patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1060,26 +2289,14 @@ def list_fleets_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """list_fleets + """patch_fleet - list Fleets + Patch a Fleet resource. - :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. - :type var_continue: str - :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. - :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). - :type field_selector: str - :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. - :type limit: int - :param owner: A selector to restrict the list of returned objects by their owner. Defaults to everything. - :type owner: str - :param add_devices_count: include the number of devices in each fleet - :type add_devices_count: bool - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder + :param name: The name of the Fleet resource to patch. (required) + :type name: str + :param patch_request_inner: + :type patch_request_inner: List[PatchRequestInner] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1102,15 +2319,9 @@ def list_fleets_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_fleets_serialize( - var_continue=var_continue, - label_selector=label_selector, - field_selector=field_selector, - limit=limit, - owner=owner, - add_devices_count=add_devices_count, - sort_by=sort_by, - sort_order=sort_order, + _param = self._patch_fleet_serialize( + name=name, + patch_request_inner=patch_request_inner, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1118,9 +2329,13 @@ def list_fleets_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FleetList", + '200': "Fleet", '400': "Error", '401': "Error", + '403': "Error", + '404': "Error", + '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1129,16 +2344,10 @@ def list_fleets_without_preload_content( return response_data.response - def _list_fleets_serialize( + def _patch_fleet_serialize( self, - var_continue, - label_selector, - field_selector, - limit, - owner, - add_devices_count, - sort_by, - sort_order, + name, + patch_request_inner, _request_auth, _content_type, _headers, @@ -1148,6 +2357,7 @@ def _list_fleets_serialize( _host = None _collection_formats: Dict[str, str] = { + 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1160,42 +2370,14 @@ def _list_fleets_serialize( _body_params: Optional[bytes] = None # process the path parameters + if name is not None: + _path_params['name'] = name # process the query parameters - if var_continue is not None: - - _query_params.append(('continue', var_continue)) - - if label_selector is not None: - - _query_params.append(('labelSelector', label_selector)) - - if field_selector is not None: - - _query_params.append(('fieldSelector', field_selector)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - if owner is not None: - - _query_params.append(('owner', owner)) - - if add_devices_count is not None: - - _query_params.append(('addDevicesCount', add_devices_count)) - - if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - - if sort_order is not None: - - _query_params.append(('sortOrder', sort_order.value)) - # process the header parameters # process the form parameters # process the body parameter + if patch_request_inner is not None: + _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1206,14 +2388,27 @@ def _list_fleets_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json-patch+json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='GET', - resource_path='/api/v1/fleets', + method='PATCH', + resource_path='/api/v1/fleets/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1230,10 +2425,10 @@ def _list_fleets_serialize( @validate_call - def patch_fleet( + def read_fleet( self, - name: Annotated[StrictStr, Field(description="name of the fleet")], - patch_request_inner: Optional[List[PatchRequestInner]] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], + add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1247,14 +2442,14 @@ def patch_fleet( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Fleet: - """patch_fleet + """read_fleet - Patches the specified fleet + Get a Fleet resource. - :param name: name of the fleet (required) + :param name: The name of the Fleet resource to get. (required) :type name: str - :param patch_request_inner: - :type patch_request_inner: List[PatchRequestInner] + :param add_devices_summary: Include a summary of the devices in the fleet. + :type add_devices_summary: bool :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 @@ -1277,9 +2472,9 @@ def patch_fleet( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_serialize( + _param = self._read_fleet_serialize( name=name, - patch_request_inner=patch_request_inner, + add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1288,10 +2483,10 @@ def patch_fleet( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", - '400': "Error", '401': "Error", + '403': "Error", '404': "Error", - '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1305,10 +2500,10 @@ def patch_fleet( @validate_call - def patch_fleet_with_http_info( + def read_fleet_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the fleet")], - patch_request_inner: Optional[List[PatchRequestInner]] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], + add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1322,14 +2517,14 @@ def patch_fleet_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Fleet]: - """patch_fleet + """read_fleet - Patches the specified fleet + Get a Fleet resource. - :param name: name of the fleet (required) + :param name: The name of the Fleet resource to get. (required) :type name: str - :param patch_request_inner: - :type patch_request_inner: List[PatchRequestInner] + :param add_devices_summary: Include a summary of the devices in the fleet. + :type add_devices_summary: bool :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 @@ -1352,9 +2547,9 @@ def patch_fleet_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_serialize( + _param = self._read_fleet_serialize( name=name, - patch_request_inner=patch_request_inner, + add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1363,10 +2558,10 @@ def patch_fleet_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", - '400': "Error", '401': "Error", + '403': "Error", '404': "Error", - '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1380,10 +2575,10 @@ def patch_fleet_with_http_info( @validate_call - def patch_fleet_without_preload_content( + def read_fleet_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the fleet")], - patch_request_inner: Optional[List[PatchRequestInner]] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], + add_devices_summary: Annotated[Optional[StrictBool], Field(description="Include a summary of the devices in the fleet.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1397,14 +2592,14 @@ def patch_fleet_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """patch_fleet + """read_fleet - Patches the specified fleet + Get a Fleet resource. - :param name: name of the fleet (required) + :param name: The name of the Fleet resource to get. (required) :type name: str - :param patch_request_inner: - :type patch_request_inner: List[PatchRequestInner] + :param add_devices_summary: Include a summary of the devices in the fleet. + :type add_devices_summary: bool :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 @@ -1427,9 +2622,9 @@ def patch_fleet_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._patch_fleet_serialize( + _param = self._read_fleet_serialize( name=name, - patch_request_inner=patch_request_inner, + add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1438,10 +2633,10 @@ def patch_fleet_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", - '400': "Error", '401': "Error", + '403': "Error", '404': "Error", - '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1450,10 +2645,10 @@ def patch_fleet_without_preload_content( return response_data.response - def _patch_fleet_serialize( + def _read_fleet_serialize( self, name, - patch_request_inner, + add_devices_summary, _request_auth, _content_type, _headers, @@ -1463,7 +2658,6 @@ def _patch_fleet_serialize( _host = None _collection_formats: Dict[str, str] = { - 'PatchRequestInner': '', } _path_params: Dict[str, str] = {} @@ -1479,11 +2673,13 @@ def _patch_fleet_serialize( if name is not None: _path_params['name'] = name # process the query parameters + if add_devices_summary is not None: + + _query_params.append(('addDevicesSummary', add_devices_summary)) + # process the header parameters # process the form parameters # process the body parameter - if patch_request_inner is not None: - _body_params = patch_request_inner # set the HTTP header `Accept` @@ -1494,26 +2690,13 @@ def _patch_fleet_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json-patch+json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ ] return self.api_client.param_serialize( - method='PATCH', + method='GET', resource_path='/api/v1/fleets/{name}', path_params=_path_params, query_params=_query_params, @@ -1531,10 +2714,9 @@ def _patch_fleet_serialize( @validate_call - def read_fleet( + def read_fleet_status( self, - name: Annotated[StrictStr, Field(description="unique name of the Fleet")], - add_devices_summary: Annotated[Optional[StrictBool], Field(description="include a summary of the devices in the fleet")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1548,14 +2730,12 @@ def read_fleet( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> Fleet: - """read_fleet + """read_fleet_status - read the specified Fleet + read status of the specified Fleet - :param name: unique name of the Fleet (required) + :param name: The name of the Fleet resource to get. (required) :type name: str - :param add_devices_summary: include a summary of the devices in the fleet - :type add_devices_summary: bool :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 @@ -1578,9 +2758,8 @@ def read_fleet( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_serialize( + _param = self._read_fleet_status_serialize( name=name, - add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1590,7 +2769,9 @@ def read_fleet( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1604,10 +2785,9 @@ def read_fleet( @validate_call - def read_fleet_with_http_info( + def read_fleet_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="unique name of the Fleet")], - add_devices_summary: Annotated[Optional[StrictBool], Field(description="include a summary of the devices in the fleet")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1621,14 +2801,12 @@ def read_fleet_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[Fleet]: - """read_fleet + """read_fleet_status - read the specified Fleet + read status of the specified Fleet - :param name: unique name of the Fleet (required) + :param name: The name of the Fleet resource to get. (required) :type name: str - :param add_devices_summary: include a summary of the devices in the fleet - :type add_devices_summary: bool :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 @@ -1651,9 +2829,8 @@ def read_fleet_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_serialize( + _param = self._read_fleet_status_serialize( name=name, - add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1663,7 +2840,9 @@ def read_fleet_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1677,10 +2856,9 @@ def read_fleet_with_http_info( @validate_call - def read_fleet_without_preload_content( + def read_fleet_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="unique name of the Fleet")], - add_devices_summary: Annotated[Optional[StrictBool], Field(description="include a summary of the devices in the fleet")] = None, + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1694,14 +2872,12 @@ def read_fleet_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_fleet + """read_fleet_status - read the specified Fleet + read status of the specified Fleet - :param name: unique name of the Fleet (required) + :param name: The name of the Fleet resource to get. (required) :type name: str - :param add_devices_summary: include a summary of the devices in the fleet - :type add_devices_summary: bool :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 @@ -1724,9 +2900,8 @@ def read_fleet_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_serialize( + _param = self._read_fleet_status_serialize( name=name, - add_devices_summary=add_devices_summary, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1736,7 +2911,9 @@ def read_fleet_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1745,10 +2922,9 @@ def read_fleet_without_preload_content( return response_data.response - def _read_fleet_serialize( + def _read_fleet_status_serialize( self, name, - add_devices_summary, _request_auth, _content_type, _headers, @@ -1773,10 +2949,6 @@ def _read_fleet_serialize( if name is not None: _path_params['name'] = name # process the query parameters - if add_devices_summary is not None: - - _query_params.append(('addDevicesSummary', add_devices_summary)) - # process the header parameters # process the form parameters # process the body parameter @@ -1797,7 +2969,7 @@ def _read_fleet_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/fleets/{name}', + resource_path='/api/v1/fleets/{name}/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1814,9 +2986,10 @@ def _read_fleet_serialize( @validate_call - def read_fleet_status( + def read_template_version( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1829,12 +3002,14 @@ def read_fleet_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Fleet: - """read_fleet_status + ) -> TemplateVersion: + """read_template_version - read status of the specified Fleet + read the specified template version - :param name: name of the Fleet (required) + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1858,7 +3033,8 @@ def read_fleet_status( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_status_serialize( + _param = self._read_template_version_serialize( + fleet=fleet, name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -1867,9 +3043,11 @@ def read_fleet_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "TemplateVersion", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1883,9 +3061,10 @@ def read_fleet_status( @validate_call - def read_fleet_status_with_http_info( + def read_template_version_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1898,12 +3077,14 @@ def read_fleet_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Fleet]: - """read_fleet_status + ) -> ApiResponse[TemplateVersion]: + """read_template_version - read status of the specified Fleet + read the specified template version - :param name: name of the Fleet (required) + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1927,7 +3108,8 @@ def read_fleet_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_status_serialize( + _param = self._read_template_version_serialize( + fleet=fleet, name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -1936,9 +3118,11 @@ def read_fleet_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "TemplateVersion", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1952,9 +3136,10 @@ def read_fleet_status_with_http_info( @validate_call - def read_fleet_status_without_preload_content( + def read_template_version_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + fleet: Annotated[StrictStr, Field(description="The owner of the template version.")], + name: Annotated[StrictStr, Field(description="The name of the template version.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1968,11 +3153,13 @@ def read_fleet_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """read_fleet_status + """read_template_version - read status of the specified Fleet + read the specified template version - :param name: name of the Fleet (required) + :param fleet: The owner of the template version. (required) + :type fleet: str + :param name: The name of the template version. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1996,7 +3183,8 @@ def read_fleet_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._read_fleet_status_serialize( + _param = self._read_template_version_serialize( + fleet=fleet, name=name, _request_auth=_request_auth, _content_type=_content_type, @@ -2005,9 +3193,11 @@ def read_fleet_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "Fleet", + '200': "TemplateVersion", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2016,8 +3206,9 @@ def read_fleet_status_without_preload_content( return response_data.response - def _read_fleet_status_serialize( + def _read_template_version_serialize( self, + fleet, name, _request_auth, _content_type, @@ -2040,6 +3231,8 @@ def _read_fleet_status_serialize( _body_params: Optional[bytes] = None # process the path parameters + if fleet is not None: + _path_params['fleet'] = fleet if name is not None: _path_params['name'] = name # process the query parameters @@ -2063,7 +3256,7 @@ def _read_fleet_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/v1/fleets/{name}/status', + resource_path='/api/v1/fleets/{fleet}/templateversions/{name}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2082,7 +3275,7 @@ def _read_fleet_status_serialize( @validate_call def replace_fleet( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to update.")], fleet: Fleet, _request_timeout: Union[ None, @@ -2099,9 +3292,9 @@ def replace_fleet( ) -> Fleet: """replace_fleet - replace the specified Fleet + Update a Fleet resource. - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to update. (required) :type name: str :param fleet: (required) :type fleet: Fleet @@ -2142,7 +3335,9 @@ def replace_fleet( '400': "Error", '401': "Error", '404': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2158,7 +3353,7 @@ def replace_fleet( @validate_call def replace_fleet_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to update.")], fleet: Fleet, _request_timeout: Union[ None, @@ -2175,9 +3370,9 @@ def replace_fleet_with_http_info( ) -> ApiResponse[Fleet]: """replace_fleet - replace the specified Fleet + Update a Fleet resource. - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to update. (required) :type name: str :param fleet: (required) :type fleet: Fleet @@ -2218,7 +3413,9 @@ def replace_fleet_with_http_info( '400': "Error", '401': "Error", '404': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2234,7 +3431,7 @@ def replace_fleet_with_http_info( @validate_call def replace_fleet_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to update.")], fleet: Fleet, _request_timeout: Union[ None, @@ -2251,9 +3448,9 @@ def replace_fleet_without_preload_content( ) -> RESTResponseType: """replace_fleet - replace the specified Fleet + Update a Fleet resource. - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to update. (required) :type name: str :param fleet: (required) :type fleet: Fleet @@ -2294,7 +3491,9 @@ def replace_fleet_without_preload_content( '400': "Error", '401': "Error", '404': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2385,7 +3584,7 @@ def _replace_fleet_serialize( @validate_call def replace_fleet_status( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to update.")], fleet: Fleet, _request_timeout: Union[ None, @@ -2404,7 +3603,7 @@ def replace_fleet_status( replace status of the specified Fleet - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to update. (required) :type name: str :param fleet: (required) :type fleet: Fleet @@ -2442,7 +3641,9 @@ def replace_fleet_status( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2458,7 +3659,7 @@ def replace_fleet_status( @validate_call def replace_fleet_status_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to update.")], fleet: Fleet, _request_timeout: Union[ None, @@ -2477,7 +3678,7 @@ def replace_fleet_status_with_http_info( replace status of the specified Fleet - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to update. (required) :type name: str :param fleet: (required) :type fleet: Fleet @@ -2515,7 +3716,9 @@ def replace_fleet_status_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -2531,7 +3734,7 @@ def replace_fleet_status_with_http_info( @validate_call def replace_fleet_status_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the Fleet")], + name: Annotated[StrictStr, Field(description="The name of the Fleet resource to update.")], fleet: Fleet, _request_timeout: Union[ None, @@ -2550,7 +3753,7 @@ def replace_fleet_status_without_preload_content( replace status of the specified Fleet - :param name: name of the Fleet (required) + :param name: The name of the Fleet resource to update. (required) :type name: str :param fleet: (required) :type fleet: Fleet @@ -2588,7 +3791,9 @@ def replace_fleet_status_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Fleet", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, diff --git a/flightctl/api/repository_api.py b/flightctl/api/repository_api.py index d0d3a0e..71d3204 100644 --- a/flightctl/api/repository_api.py +++ b/flightctl/api/repository_api.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -22,7 +23,6 @@ from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.models.repository import Repository from flightctl.models.repository_list import RepositoryList -from flightctl.models.sort_order import SortOrder from flightctl.models.status import Status from flightctl.api_client import ApiClient, RequestSerialized @@ -62,7 +62,7 @@ def create_repository( ) -> Repository: """create_repository - create a repository + Create a Repository resource. :param repository: (required) :type repository: Repository @@ -100,7 +100,9 @@ def create_repository( '201': "Repository", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -132,7 +134,7 @@ def create_repository_with_http_info( ) -> ApiResponse[Repository]: """create_repository - create a repository + Create a Repository resource. :param repository: (required) :type repository: Repository @@ -170,7 +172,9 @@ def create_repository_with_http_info( '201': "Repository", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -202,7 +206,7 @@ def create_repository_without_preload_content( ) -> RESTResponseType: """create_repository - create a repository + Create a Repository resource. :param repository: (required) :type repository: Repository @@ -240,7 +244,9 @@ def create_repository_without_preload_content( '201': "Repository", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -343,7 +349,7 @@ def delete_repositories( ) -> Status: """delete_repositories - delete a collection of Repositories + Delete Repository resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -377,6 +383,8 @@ def delete_repositories( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -407,7 +415,7 @@ def delete_repositories_with_http_info( ) -> ApiResponse[Status]: """delete_repositories - delete a collection of Repositories + Delete Repository resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -441,6 +449,8 @@ def delete_repositories_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -471,7 +481,7 @@ def delete_repositories_without_preload_content( ) -> RESTResponseType: """delete_repositories - delete a collection of Repositories + Delete Repository resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -505,6 +515,8 @@ def delete_repositories_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -576,7 +588,7 @@ def _delete_repositories_serialize( @validate_call def delete_repository( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -592,9 +604,9 @@ def delete_repository( ) -> Repository: """delete_repository - delete a repository + Delete a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -629,7 +641,9 @@ def delete_repository( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -645,7 +659,7 @@ def delete_repository( @validate_call def delete_repository_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -661,9 +675,9 @@ def delete_repository_with_http_info( ) -> ApiResponse[Repository]: """delete_repository - delete a repository + Delete a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -698,7 +712,9 @@ def delete_repository_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -714,7 +730,7 @@ def delete_repository_with_http_info( @validate_call def delete_repository_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -730,9 +746,9 @@ def delete_repository_without_preload_content( ) -> RESTResponseType: """delete_repository - delete a repository + Delete a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -767,7 +783,9 @@ def delete_repository_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -844,10 +862,8 @@ def list_repositories( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -863,20 +879,16 @@ def list_repositories( ) -> RepositoryList: """list_repositories - list repositories + List Repository resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -904,8 +916,6 @@ def list_repositories( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -916,6 +926,8 @@ def list_repositories( '200': "RepositoryList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -933,10 +945,8 @@ def list_repositories_with_http_info( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -952,20 +962,16 @@ def list_repositories_with_http_info( ) -> ApiResponse[RepositoryList]: """list_repositories - list repositories + List Repository resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -993,8 +999,6 @@ def list_repositories_with_http_info( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1005,6 +1009,8 @@ def list_repositories_with_http_info( '200': "RepositoryList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1022,10 +1028,8 @@ def list_repositories_without_preload_content( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2).")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1041,20 +1045,16 @@ def list_repositories_without_preload_content( ) -> RESTResponseType: """list_repositories - list repositories + List Repository resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supports '=', '==', and '!='.(e.g. key1=value1,key2!=value2). + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1082,8 +1082,6 @@ def list_repositories_without_preload_content( label_selector=label_selector, field_selector=field_selector, limit=limit, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1094,6 +1092,8 @@ def list_repositories_without_preload_content( '200': "RepositoryList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1108,8 +1108,6 @@ def _list_repositories_serialize( label_selector, field_selector, limit, - sort_by, - sort_order, _request_auth, _content_type, _headers, @@ -1148,14 +1146,6 @@ def _list_repositories_serialize( _query_params.append(('limit', limit)) - if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - - if sort_order is not None: - - _query_params.append(('sortOrder', sort_order.value)) - # process the header parameters # process the form parameters # process the body parameter @@ -1195,7 +1185,7 @@ def _list_repositories_serialize( @validate_call def patch_repository( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1212,9 +1202,9 @@ def patch_repository( ) -> Repository: """patch_repository - Patches the specified repository + Patch a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1253,8 +1243,10 @@ def patch_repository( '200': "Repository", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1270,7 +1262,7 @@ def patch_repository( @validate_call def patch_repository_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1287,9 +1279,9 @@ def patch_repository_with_http_info( ) -> ApiResponse[Repository]: """patch_repository - Patches the specified repository + Patch a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1328,8 +1320,10 @@ def patch_repository_with_http_info( '200': "Repository", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1345,7 +1339,7 @@ def patch_repository_with_http_info( @validate_call def patch_repository_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1362,9 +1356,9 @@ def patch_repository_without_preload_content( ) -> RESTResponseType: """patch_repository - Patches the specified repository + Patch a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1403,8 +1397,10 @@ def patch_repository_without_preload_content( '200': "Repository", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1496,7 +1492,7 @@ def _patch_repository_serialize( @validate_call def read_repository( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1512,9 +1508,9 @@ def read_repository( ) -> Repository: """read_repository - read the specified repository + Get a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1549,7 +1545,9 @@ def read_repository( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1565,7 +1563,7 @@ def read_repository( @validate_call def read_repository_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1581,9 +1579,9 @@ def read_repository_with_http_info( ) -> ApiResponse[Repository]: """read_repository - read the specified repository + Get a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1618,7 +1616,9 @@ def read_repository_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1634,7 +1634,7 @@ def read_repository_with_http_info( @validate_call def read_repository_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1650,9 +1650,9 @@ def read_repository_without_preload_content( ) -> RESTResponseType: """read_repository - read the specified repository + Get a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1687,7 +1687,9 @@ def read_repository_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Repository", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1762,7 +1764,7 @@ def _read_repository_serialize( @validate_call def replace_repository( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to update.")], repository: Repository, _request_timeout: Union[ None, @@ -1779,9 +1781,9 @@ def replace_repository( ) -> Repository: """replace_repository - replace the specified repository + Update a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to update. (required) :type name: str :param repository: (required) :type repository: Repository @@ -1821,8 +1823,10 @@ def replace_repository( '201': "Repository", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1838,7 +1842,7 @@ def replace_repository( @validate_call def replace_repository_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to update.")], repository: Repository, _request_timeout: Union[ None, @@ -1855,9 +1859,9 @@ def replace_repository_with_http_info( ) -> ApiResponse[Repository]: """replace_repository - replace the specified repository + Update a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to update. (required) :type name: str :param repository: (required) :type repository: Repository @@ -1897,8 +1901,10 @@ def replace_repository_with_http_info( '201': "Repository", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1914,7 +1920,7 @@ def replace_repository_with_http_info( @validate_call def replace_repository_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the repository")], + name: Annotated[StrictStr, Field(description="The name of the Repository resource to update.")], repository: Repository, _request_timeout: Union[ None, @@ -1931,9 +1937,9 @@ def replace_repository_without_preload_content( ) -> RESTResponseType: """replace_repository - replace the specified repository + Update a Repository resource. - :param name: name of the repository (required) + :param name: The name of the Repository resource to update. (required) :type name: str :param repository: (required) :type repository: Repository @@ -1973,8 +1979,10 @@ def replace_repository_without_preload_content( '201': "Repository", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, diff --git a/flightctl/api/resourcesync_api.py b/flightctl/api/resourcesync_api.py index 01ee9b2..251432d 100644 --- a/flightctl/api/resourcesync_api.py +++ b/flightctl/api/resourcesync_api.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -22,7 +23,6 @@ from flightctl.models.patch_request_inner import PatchRequestInner from flightctl.models.resource_sync import ResourceSync from flightctl.models.resource_sync_list import ResourceSyncList -from flightctl.models.sort_order import SortOrder from flightctl.models.status import Status from flightctl.api_client import ApiClient, RequestSerialized @@ -62,7 +62,7 @@ def create_resource_sync( ) -> ResourceSync: """create_resource_sync - create a resourcesync + Create a ResourceSync resource. :param resource_sync: (required) :type resource_sync: ResourceSync @@ -100,7 +100,9 @@ def create_resource_sync( '201': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -132,7 +134,7 @@ def create_resource_sync_with_http_info( ) -> ApiResponse[ResourceSync]: """create_resource_sync - create a resourcesync + Create a ResourceSync resource. :param resource_sync: (required) :type resource_sync: ResourceSync @@ -170,7 +172,9 @@ def create_resource_sync_with_http_info( '201': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -202,7 +206,7 @@ def create_resource_sync_without_preload_content( ) -> RESTResponseType: """create_resource_sync - create a resourcesync + Create a ResourceSync resource. :param resource_sync: (required) :type resource_sync: ResourceSync @@ -240,7 +244,9 @@ def create_resource_sync_without_preload_content( '201': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -328,7 +334,7 @@ def _create_resource_sync_serialize( @validate_call def delete_resource_sync( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -344,9 +350,9 @@ def delete_resource_sync( ) -> ResourceSync: """delete_resource_sync - delete a resourcesync + Delete a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -381,7 +387,9 @@ def delete_resource_sync( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -397,7 +405,7 @@ def delete_resource_sync( @validate_call def delete_resource_sync_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -413,9 +421,9 @@ def delete_resource_sync_with_http_info( ) -> ApiResponse[ResourceSync]: """delete_resource_sync - delete a resourcesync + Delete a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -450,7 +458,9 @@ def delete_resource_sync_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -466,7 +476,7 @@ def delete_resource_sync_with_http_info( @validate_call def delete_resource_sync_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to delete.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -482,9 +492,9 @@ def delete_resource_sync_without_preload_content( ) -> RESTResponseType: """delete_resource_sync - delete a resourcesync + Delete a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to delete. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -519,7 +529,9 @@ def delete_resource_sync_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -609,7 +621,7 @@ def delete_resource_syncs( ) -> Status: """delete_resource_syncs - delete a collection of ResourceSync + Delete ResourceSync resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -643,6 +655,8 @@ def delete_resource_syncs( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -673,7 +687,7 @@ def delete_resource_syncs_with_http_info( ) -> ApiResponse[Status]: """delete_resource_syncs - delete a collection of ResourceSync + Delete ResourceSync resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -707,6 +721,8 @@ def delete_resource_syncs_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -737,7 +753,7 @@ def delete_resource_syncs_without_preload_content( ) -> RESTResponseType: """delete_resource_syncs - delete a collection of ResourceSync + Delete ResourceSync resources. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -771,6 +787,8 @@ def delete_resource_syncs_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "Status", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -844,11 +862,9 @@ def list_resource_sync( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, repository: Annotated[Optional[StrictStr], Field(description="The name of the repository to filter results by.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -864,22 +880,18 @@ def list_resource_sync( ) -> ResourceSyncList: """list_resource_sync - list resourcesync + List ResourceSync resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation. + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int :param repository: The name of the repository to filter results by. :type repository: str - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -908,8 +920,6 @@ def list_resource_sync( field_selector=field_selector, limit=limit, repository=repository, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -920,6 +930,8 @@ def list_resource_sync( '200': "ResourceSyncList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -937,11 +949,9 @@ def list_resource_sync_with_http_info( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, repository: Annotated[Optional[StrictStr], Field(description="The name of the repository to filter results by.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -957,22 +967,18 @@ def list_resource_sync_with_http_info( ) -> ApiResponse[ResourceSyncList]: """list_resource_sync - list resourcesync + List ResourceSync resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation. + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int :param repository: The name of the repository to filter results by. :type repository: str - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1001,8 +1007,6 @@ def list_resource_sync_with_http_info( field_selector=field_selector, limit=limit, repository=repository, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1013,6 +1017,8 @@ def list_resource_sync_with_http_info( '200': "ResourceSyncList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1030,11 +1036,9 @@ def list_resource_sync_without_preload_content( self, var_continue: Annotated[Optional[StrictStr], Field(description="An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their labels. Defaults to everything.")] = None, - field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation.")] = None, + field_selector: Annotated[Optional[StrictStr], Field(description="A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\").")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query.")] = None, repository: Annotated[Optional[StrictStr], Field(description="The name of the repository to filter results by.")] = None, - sort_by: Annotated[Optional[StrictStr], Field(description="Specifies the field to sort by.")] = None, - sort_order: Annotated[Optional[SortOrder], Field(description="Specifies the sort order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1050,22 +1054,18 @@ def list_resource_sync_without_preload_content( ) -> RESTResponseType: """list_resource_sync - list resourcesync + List ResourceSync resources. :param var_continue: An optional parameter to query more results from the server. The value of the paramter must match the value of the 'continue' field in the previous list response. :type var_continue: str :param label_selector: A selector to restrict the list of returned objects by their labels. Defaults to everything. :type label_selector: str - :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). For a full list of operators and examples, refer to the documentation. + :param field_selector: A selector to restrict the list of returned objects by their fields, supporting operators like '=', '==', and '!=' (e.g., \"key1=value1,key2!=value2\"). :type field_selector: str :param limit: The maximum number of results returned in the list response. The server will set the 'continue' field in the list response if more results exist. The continue value may then be specified as parameter in a subsequent query. :type limit: int :param repository: The name of the repository to filter results by. :type repository: str - :param sort_by: Specifies the field to sort by. - :type sort_by: str - :param sort_order: Specifies the sort order. - :type sort_order: SortOrder :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 @@ -1094,8 +1094,6 @@ def list_resource_sync_without_preload_content( field_selector=field_selector, limit=limit, repository=repository, - sort_by=sort_by, - sort_order=sort_order, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1106,6 +1104,8 @@ def list_resource_sync_without_preload_content( '200': "ResourceSyncList", '400': "Error", '401': "Error", + '403': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1121,8 +1121,6 @@ def _list_resource_sync_serialize( field_selector, limit, repository, - sort_by, - sort_order, _request_auth, _content_type, _headers, @@ -1165,14 +1163,6 @@ def _list_resource_sync_serialize( _query_params.append(('repository', repository)) - if sort_by is not None: - - _query_params.append(('sortBy', sort_by)) - - if sort_order is not None: - - _query_params.append(('sortOrder', sort_order.value)) - # process the header parameters # process the form parameters # process the body parameter @@ -1212,7 +1202,7 @@ def _list_resource_sync_serialize( @validate_call def patch_resource_sync( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1229,9 +1219,9 @@ def patch_resource_sync( ) -> ResourceSync: """patch_resource_sync - Patches the specified resourcesync + Patch a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1270,8 +1260,10 @@ def patch_resource_sync( '200': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1287,7 +1279,7 @@ def patch_resource_sync( @validate_call def patch_resource_sync_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1304,9 +1296,9 @@ def patch_resource_sync_with_http_info( ) -> ApiResponse[ResourceSync]: """patch_resource_sync - Patches the specified resourcesync + Patch a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1345,8 +1337,10 @@ def patch_resource_sync_with_http_info( '200': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1362,7 +1356,7 @@ def patch_resource_sync_with_http_info( @validate_call def patch_resource_sync_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to patch.")], patch_request_inner: Optional[List[PatchRequestInner]] = None, _request_timeout: Union[ None, @@ -1379,9 +1373,9 @@ def patch_resource_sync_without_preload_content( ) -> RESTResponseType: """patch_resource_sync - Patches the specified resourcesync + Patch a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to patch. (required) :type name: str :param patch_request_inner: :type patch_request_inner: List[PatchRequestInner] @@ -1420,8 +1414,10 @@ def patch_resource_sync_without_preload_content( '200': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1513,7 +1509,7 @@ def _patch_resource_sync_serialize( @validate_call def read_resource_sync( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1529,9 +1525,9 @@ def read_resource_sync( ) -> ResourceSync: """read_resource_sync - read the specified resourcesync + Get a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1566,7 +1562,9 @@ def read_resource_sync( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1582,7 +1580,7 @@ def read_resource_sync( @validate_call def read_resource_sync_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1598,9 +1596,9 @@ def read_resource_sync_with_http_info( ) -> ApiResponse[ResourceSync]: """read_resource_sync - read the specified resourcesync + Get a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1635,7 +1633,9 @@ def read_resource_sync_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1651,7 +1651,7 @@ def read_resource_sync_with_http_info( @validate_call def read_resource_sync_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1667,9 +1667,9 @@ def read_resource_sync_without_preload_content( ) -> RESTResponseType: """read_resource_sync - read the specified resourcesync + Get a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to get. (required) :type name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1704,7 +1704,9 @@ def read_resource_sync_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "ResourceSync", '401': "Error", + '403': "Error", '404': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1779,7 +1781,7 @@ def _read_resource_sync_serialize( @validate_call def replace_resource_sync( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to update.")], resource_sync: ResourceSync, _request_timeout: Union[ None, @@ -1796,9 +1798,9 @@ def replace_resource_sync( ) -> ResourceSync: """replace_resource_sync - replace the specified resourcesync + Update a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to update. (required) :type name: str :param resource_sync: (required) :type resource_sync: ResourceSync @@ -1838,8 +1840,10 @@ def replace_resource_sync( '201': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1855,7 +1859,7 @@ def replace_resource_sync( @validate_call def replace_resource_sync_with_http_info( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to update.")], resource_sync: ResourceSync, _request_timeout: Union[ None, @@ -1872,9 +1876,9 @@ def replace_resource_sync_with_http_info( ) -> ApiResponse[ResourceSync]: """replace_resource_sync - replace the specified resourcesync + Update a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to update. (required) :type name: str :param resource_sync: (required) :type resource_sync: ResourceSync @@ -1914,8 +1918,10 @@ def replace_resource_sync_with_http_info( '201': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, @@ -1931,7 +1937,7 @@ def replace_resource_sync_with_http_info( @validate_call def replace_resource_sync_without_preload_content( self, - name: Annotated[StrictStr, Field(description="name of the resourcesync")], + name: Annotated[StrictStr, Field(description="The name of the ResourceSync resource to update.")], resource_sync: ResourceSync, _request_timeout: Union[ None, @@ -1948,9 +1954,9 @@ def replace_resource_sync_without_preload_content( ) -> RESTResponseType: """replace_resource_sync - replace the specified resourcesync + Update a ResourceSync resource. - :param name: name of the resourcesync (required) + :param name: The name of the ResourceSync resource to update. (required) :type name: str :param resource_sync: (required) :type resource_sync: ResourceSync @@ -1990,8 +1996,10 @@ def replace_resource_sync_without_preload_content( '201': "ResourceSync", '400': "Error", '401': "Error", + '403': "Error", '404': "Error", '409': "Error", + '503': "Error", } response_data = self.api_client.call_api( *_param, diff --git a/flightctl/api_client.py b/flightctl/api_client.py index 48b0aee..b3b8f84 100644 --- a/flightctl/api_client.py +++ b/flightctl/api_client.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/configuration.py b/flightctl/configuration.py index fc92e98..0d99307 100644 --- a/flightctl/configuration.py +++ b/flightctl/configuration.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -493,7 +494,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: undefined\n"\ + "Version of the API: v1alpha1\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/flightctl/exceptions.py b/flightctl/exceptions.py index 41ec8b9..0d7e4fe 100644 --- a/flightctl/exceptions.py +++ b/flightctl/exceptions.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/__init__.py b/flightctl/models/__init__.py index 741f42d..385b469 100644 --- a/flightctl/models/__init__.py +++ b/flightctl/models/__init__.py @@ -2,11 +2,12 @@ # flake8: noqa """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -37,14 +38,17 @@ from flightctl.models.device_applications_summary_status import DeviceApplicationsSummaryStatus from flightctl.models.device_config_status import DeviceConfigStatus from flightctl.models.device_console import DeviceConsole -from flightctl.models.device_hooks_spec import DeviceHooksSpec +from flightctl.models.device_decommission import DeviceDecommission +from flightctl.models.device_decommission_target_type import DeviceDecommissionTargetType from flightctl.models.device_integrity_status import DeviceIntegrityStatus from flightctl.models.device_integrity_status_summary import DeviceIntegrityStatusSummary from flightctl.models.device_integrity_status_summary_type import DeviceIntegrityStatusSummaryType +from flightctl.models.device_lifecycle_hook_type import DeviceLifecycleHookType +from flightctl.models.device_lifecycle_status import DeviceLifecycleStatus +from flightctl.models.device_lifecycle_status_type import DeviceLifecycleStatusType from flightctl.models.device_list import DeviceList from flightctl.models.device_os_spec import DeviceOSSpec from flightctl.models.device_os_status import DeviceOSStatus -from flightctl.models.device_reboot_hook_spec import DeviceRebootHookSpec from flightctl.models.device_resource_status import DeviceResourceStatus from flightctl.models.device_resource_status_type import DeviceResourceStatusType from flightctl.models.device_spec import DeviceSpec @@ -53,7 +57,7 @@ from flightctl.models.device_summary_status import DeviceSummaryStatus from flightctl.models.device_summary_status_type import DeviceSummaryStatusType from flightctl.models.device_system_info import DeviceSystemInfo -from flightctl.models.device_update_hook_spec import DeviceUpdateHookSpec +from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec from flightctl.models.device_updated_status import DeviceUpdatedStatus from flightctl.models.device_updated_status_type import DeviceUpdatedStatusType from flightctl.models.devices_summary import DevicesSummary @@ -81,13 +85,9 @@ from flightctl.models.git_config_provider_spec import GitConfigProviderSpec from flightctl.models.git_config_provider_spec_git_ref import GitConfigProviderSpecGitRef from flightctl.models.hook_action import HookAction -from flightctl.models.hook_action_executable import HookActionExecutable -from flightctl.models.hook_action_executable_spec import HookActionExecutableSpec -from flightctl.models.hook_action_one_of import HookActionOneOf -from flightctl.models.hook_action_one_of1 import HookActionOneOf1 -from flightctl.models.hook_action_spec import HookActionSpec -from flightctl.models.hook_action_systemd_spec import HookActionSystemdSpec -from flightctl.models.hook_action_systemd_unit import HookActionSystemdUnit +from flightctl.models.hook_action_run import HookActionRun +from flightctl.models.hook_condition import HookCondition +from flightctl.models.hook_condition_path_op import HookConditionPathOp from flightctl.models.http_config import HttpConfig from flightctl.models.http_config_provider_spec import HttpConfigProviderSpec from flightctl.models.http_config_provider_spec_http_ref import HttpConfigProviderSpecHttpRef @@ -120,7 +120,6 @@ from flightctl.models.resource_sync_status import ResourceSyncStatus from flightctl.models.rollout_device_selection import RolloutDeviceSelection from flightctl.models.rollout_policy import RolloutPolicy -from flightctl.models.sort_order import SortOrder from flightctl.models.ssh_config import SshConfig from flightctl.models.ssh_repo_spec import SshRepoSpec from flightctl.models.status import Status @@ -128,3 +127,4 @@ from flightctl.models.template_version_list import TemplateVersionList from flightctl.models.template_version_spec import TemplateVersionSpec from flightctl.models.template_version_status import TemplateVersionStatus +from flightctl.models.update_schedule import UpdateSchedule diff --git a/flightctl/models/application_env_vars.py b/flightctl/models/application_env_vars.py index bc75782..a63b385 100644 --- a/flightctl/models/application_env_vars.py +++ b/flightctl/models/application_env_vars.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,7 +27,7 @@ class ApplicationEnvVars(BaseModel): """ ApplicationEnvVars """ # noqa: E501 - env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime", alias="envVars") + env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime.", alias="envVars") __properties: ClassVar[List[str]] = ["envVars"] model_config = ConfigDict( diff --git a/flightctl/models/application_spec.py b/flightctl/models/application_spec.py index 29d5dc8..a831060 100644 --- a/flightctl/models/application_spec.py +++ b/flightctl/models/application_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,9 +27,9 @@ class ApplicationSpec(BaseModel): """ ApplicationSpec """ # noqa: E501 - env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime", alias="envVars") - name: Optional[StrictStr] = Field(default=None, description="The name of the application") - image: StrictStr = Field(description="Reference to the container image for the application package") + env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime.", alias="envVars") + name: Optional[StrictStr] = Field(default=None, description="The name of the application.") + image: StrictStr = Field(description="Reference to the container image for the application package.") __properties: ClassVar[List[str]] = ["envVars", "name", "image"] model_config = ConfigDict( diff --git a/flightctl/models/application_status_type.py b/flightctl/models/application_status_type.py index 047712e..871d91b 100644 --- a/flightctl/models/application_status_type.py +++ b/flightctl/models/application_status_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class ApplicationStatusType(str, Enum): """ - ApplicationStatusType + Status of a single application on the device. """ """ diff --git a/flightctl/models/applications_summary_status_type.py b/flightctl/models/applications_summary_status_type.py index adbf058..b6804d3 100644 --- a/flightctl/models/applications_summary_status_type.py +++ b/flightctl/models/applications_summary_status_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class ApplicationsSummaryStatusType(str, Enum): """ - ApplicationsSummaryStatusType + Status of all applications on the device. """ """ diff --git a/flightctl/models/auth_config.py b/flightctl/models/auth_config.py index 15181b2..9315622 100644 --- a/flightctl/models/auth_config.py +++ b/flightctl/models/auth_config.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,8 +27,8 @@ class AuthConfig(BaseModel): """ Auth config. """ # noqa: E501 - auth_type: StrictStr = Field(description="Auth type", alias="authType") - auth_url: StrictStr = Field(description="Auth URL", alias="authURL") + auth_type: StrictStr = Field(description="Auth type.", alias="authType") + auth_url: StrictStr = Field(description="Auth URL.", alias="authURL") __properties: ClassVar[List[str]] = ["authType", "authURL"] model_config = ConfigDict( diff --git a/flightctl/models/batch.py b/flightctl/models/batch.py index 645af2b..7d01166 100644 --- a/flightctl/models/batch.py +++ b/flightctl/models/batch.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/batch_limit.py b/flightctl/models/batch_limit.py index cd7dba3..7495e9d 100644 --- a/flightctl/models/batch_limit.py +++ b/flightctl/models/batch_limit.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,7 +27,7 @@ class BatchLimit(BaseModel): """ - BatchLimit + The maximum number or percentage of devices to update in the batch. """ # data type: str oneof_schema_1_validator: Optional[StrictStr] = Field(default=None, description="Percentage is the string format representing percentage string.") diff --git a/flightctl/models/batch_sequence.py b/flightctl/models/batch_sequence.py index fe61b81..f8a764f 100644 --- a/flightctl/models/batch_sequence.py +++ b/flightctl/models/batch_sequence.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class BatchSequence(BaseModel): """ BatchSequence defines the list of batches to be executed in sequence. """ # noqa: E501 - sequence: Optional[Annotated[List[Batch], Field(min_length=1)]] = None + sequence: Optional[Annotated[List[Batch], Field(min_length=1)]] = Field(default=None, description="A list of batch definitions.") __properties: ClassVar[List[str]] = ["sequence"] model_config = ConfigDict( diff --git a/flightctl/models/certificate_signing_request.py b/flightctl/models/certificate_signing_request.py index 62c6fdb..5875b2c 100644 --- a/flightctl/models/certificate_signing_request.py +++ b/flightctl/models/certificate_signing_request.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,12 +28,12 @@ class CertificateSigningRequest(BaseModel): """ - CertificateSigningRequest represents a request for a signed certificate from the CA + CertificateSigningRequest represents a request for a signed certificate from the CA. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta - spec: CertificateSigningRequestSpec + spec: Optional[CertificateSigningRequestSpec] = None status: Optional[CertificateSigningRequestStatus] = None __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "spec", "status"] diff --git a/flightctl/models/certificate_signing_request_list.py b/flightctl/models/certificate_signing_request_list.py index 5693cdc..a42905c 100644 --- a/flightctl/models/certificate_signing_request_list.py +++ b/flightctl/models/certificate_signing_request_list.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,10 +27,10 @@ class CertificateSigningRequestList(BaseModel): """ - CertificateSigningRequestList is a list of CertificateSigningRequest + CertificateSigningRequestList is a list of CertificateSigningRequest. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ListMeta items: List[CertificateSigningRequest] = Field(description="List of CertificateSigningRequest.") __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "items"] diff --git a/flightctl/models/certificate_signing_request_spec.py b/flightctl/models/certificate_signing_request_spec.py index b62c91f..2293323 100644 --- a/flightctl/models/certificate_signing_request_spec.py +++ b/flightctl/models/certificate_signing_request_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,15 +25,15 @@ class CertificateSigningRequestSpec(BaseModel): """ - Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec + Wrapper around a user-created CSR, modeled on kubernetes io.k8s.api.certificates.v1.CertificateSigningRequestSpec. """ # noqa: E501 - expiration_seconds: Optional[StrictInt] = Field(default=None, description="Requested duration of validity for the certificate", alias="expirationSeconds") - extra: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Extra attributes of the user that created the CSR, populated by the API server on creation and immutable") - request: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource") - signer_name: StrictStr = Field(description="Indicates the requested signer, and is a qualified name", alias="signerName") - uid: Optional[StrictStr] = Field(default=None, description="UID of the user that created the CSR, populated by the API server on creation and immutable") + expiration_seconds: Optional[StrictInt] = Field(default=None, description="Requested duration of validity for the certificate.", alias="expirationSeconds") + extra: Optional[Dict[str, List[StrictStr]]] = Field(default=None, description="Extra attributes of the user that created the CSR, populated by the API server on creation and immutable.") + request: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The base64-encoded PEM-encoded PKCS#10 CSR. Matches the spec.request field in a kubernetes CertificateSigningRequest resource.") + signer_name: StrictStr = Field(description="Indicates the requested signer, and is a qualified name.", alias="signerName") + uid: Optional[StrictStr] = Field(default=None, description="UID of the user that created the CSR, populated by the API server on creation and immutable.") usages: Optional[List[StrictStr]] = Field(default=None, description="Usages specifies a set of key usages requested in the issued certificate.") - username: Optional[StrictStr] = Field(default=None, description="Name of the user that created the CSR, populated by the API server on creation and immutable") + username: Optional[StrictStr] = Field(default=None, description="Name of the user that created the CSR, populated by the API server on creation and immutable.") __properties: ClassVar[List[str]] = ["expirationSeconds", "extra", "request", "signerName", "uid", "usages", "username"] model_config = ConfigDict( diff --git a/flightctl/models/certificate_signing_request_status.py b/flightctl/models/certificate_signing_request_status.py index 601d5e9..5a29571 100644 --- a/flightctl/models/certificate_signing_request_status.py +++ b/flightctl/models/certificate_signing_request_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,10 +26,10 @@ class CertificateSigningRequestStatus(BaseModel): """ - Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists + Indicates approval/denial/failure status of the CSR, and contains the issued certifiate if any exists. """ # noqa: E501 - certificate: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The issued signed certificate, immutable once populated") - conditions: List[Condition] = Field(description="Conditions applied to the request. Known conditions are Approved, Denied, and Failed") + certificate: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="The issued signed certificate, immutable once populated.") + conditions: List[Condition] = Field(description="Conditions applied to the request. Known conditions are Approved, Denied, and Failed.") __properties: ClassVar[List[str]] = ["certificate", "conditions"] model_config = ConfigDict( diff --git a/flightctl/models/condition.py b/flightctl/models/condition.py index ad9869f..53f4c86 100644 --- a/flightctl/models/condition.py +++ b/flightctl/models/condition.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -34,7 +35,7 @@ class Condition(BaseModel): observed_generation: Optional[StrictInt] = Field(default=None, description="The .metadata.generation that the condition was set based upon.", alias="observedGeneration") last_transition_time: datetime = Field(description="The last time the condition transitioned from one status to another.", alias="lastTransitionTime") message: StrictStr = Field(description="Human readable message indicating details about last transition.") - reason: StrictStr = Field(description="(brief) reason for the condition's last transition.") + reason: StrictStr = Field(description="A (brief) reason for the condition's last transition.") __properties: ClassVar[List[str]] = ["type", "status", "observedGeneration", "lastTransitionTime", "message", "reason"] model_config = ConfigDict( diff --git a/flightctl/models/condition_status.py b/flightctl/models/condition_status.py index e9a309c..8e1eb43 100644 --- a/flightctl/models/condition_status.py +++ b/flightctl/models/condition_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class ConditionStatus(str, Enum): """ - ConditionStatus + Status of the condition, one of True, False, Unknown. """ """ diff --git a/flightctl/models/condition_type.py b/flightctl/models/condition_type.py index 9c16587..75827f7 100644 --- a/flightctl/models/condition_type.py +++ b/flightctl/models/condition_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class ConditionType(str, Enum): """ - ConditionType + Type of condition in CamelCase. """ """ @@ -37,6 +38,7 @@ class ConditionType(str, Enum): UPDATING = 'Updating' SPECVALID = 'SpecValid' MULTIPLEOWNERS = 'MultipleOwners' + DEVICEDECOMMISSIONING = 'DeviceDecommissioning' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/config_provider_spec.py b/flightctl/models/config_provider_spec.py index 2611b11..16ac14f 100644 --- a/flightctl/models/config_provider_spec.py +++ b/flightctl/models/config_provider_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/cpu_resource_monitor_spec.py b/flightctl/models/cpu_resource_monitor_spec.py index 03cc01c..22b3bf7 100644 --- a/flightctl/models/cpu_resource_monitor_spec.py +++ b/flightctl/models/cpu_resource_monitor_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class CPUResourceMonitorSpec(BaseModel): """ CPUResourceMonitorSpec """ # noqa: E501 - monitor_type: StrictStr = Field(alias="monitorType") + monitor_type: StrictStr = Field(description="The type of resource to monitor.", alias="monitorType") alert_rules: List[ResourceAlertRule] = Field(description="Array of alert rules. Only one alert per severity is allowed.", alias="alertRules") sampling_interval: Annotated[str, Field(strict=True)] = Field(description="Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.", alias="samplingInterval") __properties: ClassVar[List[str]] = ["monitorType", "alertRules", "samplingInterval"] diff --git a/flightctl/models/custom_resource_monitor_spec.py b/flightctl/models/custom_resource_monitor_spec.py index 1c71679..8bcc05d 100644 --- a/flightctl/models/custom_resource_monitor_spec.py +++ b/flightctl/models/custom_resource_monitor_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class CustomResourceMonitorSpec(BaseModel): """ CustomResourceMonitorSpec """ # noqa: E501 - monitor_type: StrictStr = Field(alias="monitorType") + monitor_type: StrictStr = Field(description="The type of resource to monitor.", alias="monitorType") alert_rules: List[ResourceAlertRule] = Field(description="Array of alert rules. Only one alert per severity is allowed.", alias="alertRules") sampling_interval: Annotated[str, Field(strict=True)] = Field(description="Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.", alias="samplingInterval") __properties: ClassVar[List[str]] = ["monitorType", "alertRules", "samplingInterval"] diff --git a/flightctl/models/device.py b/flightctl/models/device.py index 51366f6..18468b0 100644 --- a/flightctl/models/device.py +++ b/flightctl/models/device.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -29,8 +30,8 @@ class Device(BaseModel): """ Device represents a physical device. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta spec: Optional[DeviceSpec] = None status: Optional[DeviceStatus] = None diff --git a/flightctl/models/device_application_status.py b/flightctl/models/device_application_status.py index 7fdc9f6..e1ada83 100644 --- a/flightctl/models/device_application_status.py +++ b/flightctl/models/device_application_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/device_applications_summary_status.py b/flightctl/models/device_applications_summary_status.py index b86cd71..95790af 100644 --- a/flightctl/models/device_applications_summary_status.py +++ b/flightctl/models/device_applications_summary_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,10 +26,10 @@ class DeviceApplicationsSummaryStatus(BaseModel): """ - DeviceApplicationsSummaryStatus + A summary of the health of applications on the device. """ # noqa: E501 status: ApplicationsSummaryStatusType - info: Optional[StrictStr] = Field(default=None, description="Human readable information detailing the last system application transition.") + info: Optional[StrictStr] = Field(default=None, description="Human readable information detailing the last application transition.") __properties: ClassVar[List[str]] = ["status", "info"] model_config = ConfigDict( diff --git a/flightctl/models/device_config_status.py b/flightctl/models/device_config_status.py index 864926a..e5256ca 100644 --- a/flightctl/models/device_config_status.py +++ b/flightctl/models/device_config_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,7 +25,7 @@ class DeviceConfigStatus(BaseModel): """ - DeviceConfigStatus + Current status of the device config. """ # noqa: E501 rendered_version: StrictStr = Field(description="Version of the device rendered config.", alias="renderedVersion") __properties: ClassVar[List[str]] = ["renderedVersion"] diff --git a/flightctl/models/device_console.py b/flightctl/models/device_console.py index 3c35588..a7df042 100644 --- a/flightctl/models/device_console.py +++ b/flightctl/models/device_console.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,10 +25,10 @@ class DeviceConsole(BaseModel): """ - DeviceConsole + DeviceConsole represents the console connection information. """ # noqa: E501 - g_rpc_endpoint: StrictStr = Field(alias="gRPCEndpoint") - session_id: StrictStr = Field(alias="sessionID") + g_rpc_endpoint: StrictStr = Field(description="The gRPC endpoint for the console connection.", alias="gRPCEndpoint") + session_id: StrictStr = Field(description="The session ID for the console connection.", alias="sessionID") __properties: ClassVar[List[str]] = ["gRPCEndpoint", "sessionID"] model_config = ConfigDict( diff --git a/flightctl/models/device_decommission.py b/flightctl/models/device_decommission.py new file mode 100644 index 0000000..f94ace2 --- /dev/null +++ b/flightctl/models/device_decommission.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_decommission_target_type import DeviceDecommissionTargetType +from typing import Optional, Set +from typing_extensions import Self + +class DeviceDecommission(BaseModel): + """ + Metadata about a device decommissioning request. + """ # noqa: E501 + target: DeviceDecommissionTargetType + __properties: ClassVar[List[str]] = ["target"] + + 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 DeviceDecommission 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 DeviceDecommission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "target": obj.get("target") + }) + return _obj + + diff --git a/flightctl/models/device_decommission_target_type.py b/flightctl/models/device_decommission_target_type.py new file mode 100644 index 0000000..316df12 --- /dev/null +++ b/flightctl/models/device_decommission_target_type.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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 DeviceDecommissionTargetType(str, Enum): + """ + Specifies the desired decommissioning method of the device. + """ + + """ + allowed enum values + """ + UNENROLL = 'Unenroll' + FACTORYRESET = 'FactoryReset' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DeviceDecommissionTargetType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/device_integrity_status.py b/flightctl/models/device_integrity_status.py index 66010de..f3d491a 100644 --- a/flightctl/models/device_integrity_status.py +++ b/flightctl/models/device_integrity_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,7 +26,7 @@ class DeviceIntegrityStatus(BaseModel): """ - DeviceIntegrityStatus + Status of device integrity. """ # noqa: E501 summary: DeviceIntegrityStatusSummary __properties: ClassVar[List[str]] = ["summary"] diff --git a/flightctl/models/device_integrity_status_summary.py b/flightctl/models/device_integrity_status_summary.py index 1eefc5e..62c753a 100644 --- a/flightctl/models/device_integrity_status_summary.py +++ b/flightctl/models/device_integrity_status_summary.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,7 +26,7 @@ class DeviceIntegrityStatusSummary(BaseModel): """ - DeviceIntegrityStatusSummary + Summary status of the integrity of the device. """ # noqa: E501 status: DeviceIntegrityStatusSummaryType info: Optional[StrictStr] = Field(default=None, description="Human readable information about the last integrity transition.") diff --git a/flightctl/models/device_integrity_status_summary_type.py b/flightctl/models/device_integrity_status_summary_type.py index 0f724ab..7223ca1 100644 --- a/flightctl/models/device_integrity_status_summary_type.py +++ b/flightctl/models/device_integrity_status_summary_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class DeviceIntegrityStatusSummaryType(str, Enum): """ - DeviceIntegrityStatusSummaryType + Status of the integrity of the device. """ """ diff --git a/flightctl/models/device_lifecycle_hook_type.py b/flightctl/models/device_lifecycle_hook_type.py new file mode 100644 index 0000000..b360d2f --- /dev/null +++ b/flightctl/models/device_lifecycle_hook_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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 DeviceLifecycleHookType(str, Enum): + """ + DeviceLifecycleHookType + """ + + """ + allowed enum values + """ + BEFOREUPDATING = 'BeforeUpdating' + AFTERUPDATING = 'AfterUpdating' + BEFOREREBOOTING = 'BeforeRebooting' + AFTERREBOOTING = 'AfterRebooting' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DeviceLifecycleHookType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/device_lifecycle_status.py b/flightctl/models/device_lifecycle_status.py new file mode 100644 index 0000000..a9f5a82 --- /dev/null +++ b/flightctl/models/device_lifecycle_status.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_lifecycle_status_type import DeviceLifecycleStatusType +from typing import Optional, Set +from typing_extensions import Self + +class DeviceLifecycleStatus(BaseModel): + """ + Current status of the device lifecycle. + """ # noqa: E501 + status: DeviceLifecycleStatusType + info: Optional[StrictStr] = Field(default=None, description="Human readable information about the device lifecycle status.") + __properties: ClassVar[List[str]] = ["status", "info"] + + 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 DeviceLifecycleStatus 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 DeviceLifecycleStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "info": obj.get("info") + }) + return _obj + + diff --git a/flightctl/models/device_lifecycle_status_type.py b/flightctl/models/device_lifecycle_status_type.py new file mode 100644 index 0000000..f585a7a --- /dev/null +++ b/flightctl/models/device_lifecycle_status_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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 DeviceLifecycleStatusType(str, Enum): + """ + Status type of the device lifecycle. + """ + + """ + allowed enum values + """ + UNKNOWN = 'Unknown' + ENROLLED = 'Enrolled' + DECOMMISSIONING = 'Decommissioning' + DECOMMISSIONED = 'Decommissioned' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of DeviceLifecycleStatusType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/flightctl/models/device_list.py b/flightctl/models/device_list.py index 2de8751..25e99bd 100644 --- a/flightctl/models/device_list.py +++ b/flightctl/models/device_list.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -29,8 +30,8 @@ class DeviceList(BaseModel): """ DeviceList is a list of Devices. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ListMeta items: List[Device] = Field(description="List of Devices.") summary: Optional[DevicesSummary] = None diff --git a/flightctl/models/device_os_spec.py b/flightctl/models/device_os_spec.py index 1cd05a7..0451130 100644 --- a/flightctl/models/device_os_spec.py +++ b/flightctl/models/device_os_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,9 +25,9 @@ class DeviceOSSpec(BaseModel): """ - DeviceOSSpec + DeviceOSSpec describes the target OS for the device. """ # noqa: E501 - image: StrictStr = Field(description="ostree image name or URL.") + image: StrictStr = Field(description="The target OS image name or URL.") __properties: ClassVar[List[str]] = ["image"] model_config = ConfigDict( diff --git a/flightctl/models/device_os_status.py b/flightctl/models/device_os_status.py index 8a3b666..fb1eb60 100644 --- a/flightctl/models/device_os_status.py +++ b/flightctl/models/device_os_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,10 +25,10 @@ class DeviceOSStatus(BaseModel): """ - DeviceOSStatus + Current status of the device OS. """ # noqa: E501 image: StrictStr = Field(description="Version of the OS image.") - image_digest: StrictStr = Field(description="The digest of the OS image (e.g. sha256:a0...)", alias="imageDigest") + image_digest: StrictStr = Field(description="The digest of the OS image (e.g. sha256:a0...).", alias="imageDigest") __properties: ClassVar[List[str]] = ["image", "imageDigest"] model_config = ConfigDict( diff --git a/flightctl/models/device_resource_status.py b/flightctl/models/device_resource_status.py index b2498e8..eb2b180 100644 --- a/flightctl/models/device_resource_status.py +++ b/flightctl/models/device_resource_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,7 +26,7 @@ class DeviceResourceStatus(BaseModel): """ - DeviceResourceStatus + Current status of the resources of the device. """ # noqa: E501 cpu: DeviceResourceStatusType memory: DeviceResourceStatusType diff --git a/flightctl/models/device_resource_status_type.py b/flightctl/models/device_resource_status_type.py index f357232..7b4d264 100644 --- a/flightctl/models/device_resource_status_type.py +++ b/flightctl/models/device_resource_status_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class DeviceResourceStatusType(str, Enum): """ - DeviceResourceStatusType + The types of resource statuses. """ """ diff --git a/flightctl/models/device_spec.py b/flightctl/models/device_spec.py index 7c783ef..850aebc 100644 --- a/flightctl/models/device_spec.py +++ b/flightctl/models/device_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -21,24 +22,24 @@ from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.application_spec import ApplicationSpec from flightctl.models.config_provider_spec import ConfigProviderSpec -from flightctl.models.device_hooks_spec import DeviceHooksSpec from flightctl.models.device_os_spec import DeviceOSSpec from flightctl.models.device_spec_systemd import DeviceSpecSystemd +from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec from flightctl.models.resource_monitor import ResourceMonitor from typing import Optional, Set from typing_extensions import Self class DeviceSpec(BaseModel): """ - DeviceSpec + DeviceSpec describes a device. """ # noqa: E501 + update_policy: Optional[DeviceUpdatePolicySpec] = Field(default=None, alias="updatePolicy") os: Optional[DeviceOSSpec] = None config: Optional[List[ConfigProviderSpec]] = Field(default=None, description="List of config providers.") - hooks: Optional[DeviceHooksSpec] = None applications: Optional[List[ApplicationSpec]] = Field(default=None, description="List of applications.") systemd: Optional[DeviceSpecSystemd] = None resources: Optional[List[ResourceMonitor]] = Field(default=None, description="Array of resource monitor configurations.") - __properties: ClassVar[List[str]] = ["os", "config", "hooks", "applications", "systemd", "resources"] + __properties: ClassVar[List[str]] = ["updatePolicy", "os", "config", "applications", "systemd", "resources"] model_config = ConfigDict( populate_by_name=True, @@ -79,6 +80,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of update_policy + if self.update_policy: + _dict['updatePolicy'] = self.update_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of os if self.os: _dict['os'] = self.os.to_dict() @@ -89,9 +93,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_config: _items.append(_item_config.to_dict()) _dict['config'] = _items - # override the default output from pydantic by calling `to_dict()` of hooks - if self.hooks: - _dict['hooks'] = self.hooks.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in applications (list) _items = [] if self.applications: @@ -121,9 +122,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "updatePolicy": DeviceUpdatePolicySpec.from_dict(obj["updatePolicy"]) if obj.get("updatePolicy") is not None else None, "os": DeviceOSSpec.from_dict(obj["os"]) if obj.get("os") is not None else None, "config": [ConfigProviderSpec.from_dict(_item) for _item in obj["config"]] if obj.get("config") is not None else None, - "hooks": DeviceHooksSpec.from_dict(obj["hooks"]) if obj.get("hooks") is not None else None, "applications": [ApplicationSpec.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None, "systemd": DeviceSpecSystemd.from_dict(obj["systemd"]) if obj.get("systemd") is not None else None, "resources": [ResourceMonitor.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None diff --git a/flightctl/models/device_spec_systemd.py b/flightctl/models/device_spec_systemd.py index 5b36604..883a262 100644 --- a/flightctl/models/device_spec_systemd.py +++ b/flightctl/models/device_spec_systemd.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,9 +26,9 @@ class DeviceSpecSystemd(BaseModel): """ - DeviceSpecSystemd + The systemd services to monitor. """ # noqa: E501 - match_patterns: Optional[List[Annotated[str, Field(strict=True, max_length=256)]]] = Field(default=None, alias="matchPatterns") + match_patterns: Optional[List[Annotated[str, Field(strict=True, max_length=256)]]] = Field(default=None, description="A list of match patterns.", alias="matchPatterns") __properties: ClassVar[List[str]] = ["matchPatterns"] model_config = ConfigDict( diff --git a/flightctl/models/device_status.py b/flightctl/models/device_status.py index 005a1f4..0b3ec98 100644 --- a/flightctl/models/device_status.py +++ b/flightctl/models/device_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,6 +26,7 @@ from flightctl.models.device_applications_summary_status import DeviceApplicationsSummaryStatus from flightctl.models.device_config_status import DeviceConfigStatus from flightctl.models.device_integrity_status import DeviceIntegrityStatus +from flightctl.models.device_lifecycle_status import DeviceLifecycleStatus from flightctl.models.device_os_status import DeviceOSStatus from flightctl.models.device_resource_status import DeviceResourceStatus from flightctl.models.device_summary_status import DeviceSummaryStatus @@ -47,8 +49,9 @@ class DeviceStatus(BaseModel): os: DeviceOSStatus updated: DeviceUpdatedStatus summary: DeviceSummaryStatus - last_seen: datetime = Field(alias="lastSeen") - __properties: ClassVar[List[str]] = ["conditions", "systemInfo", "applications", "applicationsSummary", "resources", "integrity", "config", "os", "updated", "summary", "lastSeen"] + last_seen: datetime = Field(description="The last time the device was seen by the service.", alias="lastSeen") + lifecycle: DeviceLifecycleStatus + __properties: ClassVar[List[str]] = ["conditions", "systemInfo", "applications", "applicationsSummary", "resources", "integrity", "config", "os", "updated", "summary", "lastSeen", "lifecycle"] model_config = ConfigDict( populate_by_name=True, @@ -127,6 +130,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of summary if self.summary: _dict['summary'] = self.summary.to_dict() + # override the default output from pydantic by calling `to_dict()` of lifecycle + if self.lifecycle: + _dict['lifecycle'] = self.lifecycle.to_dict() return _dict @classmethod @@ -149,7 +155,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "os": DeviceOSStatus.from_dict(obj["os"]) if obj.get("os") is not None else None, "updated": DeviceUpdatedStatus.from_dict(obj["updated"]) if obj.get("updated") is not None else None, "summary": DeviceSummaryStatus.from_dict(obj["summary"]) if obj.get("summary") is not None else None, - "lastSeen": obj.get("lastSeen") + "lastSeen": obj.get("lastSeen"), + "lifecycle": DeviceLifecycleStatus.from_dict(obj["lifecycle"]) if obj.get("lifecycle") is not None else None }) return _obj diff --git a/flightctl/models/device_summary_status.py b/flightctl/models/device_summary_status.py index a61c43a..58965ee 100644 --- a/flightctl/models/device_summary_status.py +++ b/flightctl/models/device_summary_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,7 +26,7 @@ class DeviceSummaryStatus(BaseModel): """ - DeviceSummaryStatus + A summary of the health of the device hardware and operating system resources. """ # noqa: E501 status: DeviceSummaryStatusType info: Optional[StrictStr] = Field(default=None, description="Human readable information detailing the last device status transition.") diff --git a/flightctl/models/device_summary_status_type.py b/flightctl/models/device_summary_status_type.py index 01c7a48..1fff707 100644 --- a/flightctl/models/device_summary_status_type.py +++ b/flightctl/models/device_summary_status_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class DeviceSummaryStatusType(str, Enum): """ - DeviceSummaryStatusType + Status of the device. """ """ diff --git a/flightctl/models/device_system_info.py b/flightctl/models/device_system_info.py index d180716..b6fbade 100644 --- a/flightctl/models/device_system_info.py +++ b/flightctl/models/device_system_info.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/device_update_policy_spec.py b/flightctl/models/device_update_policy_spec.py new file mode 100644 index 0000000..97afdfc --- /dev/null +++ b/flightctl/models/device_update_policy_spec.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.update_schedule import UpdateSchedule +from typing import Optional, Set +from typing_extensions import Self + +class DeviceUpdatePolicySpec(BaseModel): + """ + Specifies the policy for managing device updates, including when updates should be downloaded and applied. + """ # noqa: E501 + download_schedule: Optional[UpdateSchedule] = Field(default=None, alias="downloadSchedule") + update_schedule: Optional[UpdateSchedule] = Field(default=None, alias="updateSchedule") + __properties: ClassVar[List[str]] = ["downloadSchedule", "updateSchedule"] + + 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 DeviceUpdatePolicySpec 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 download_schedule + if self.download_schedule: + _dict['downloadSchedule'] = self.download_schedule.to_dict() + # override the default output from pydantic by calling `to_dict()` of update_schedule + if self.update_schedule: + _dict['updateSchedule'] = self.update_schedule.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeviceUpdatePolicySpec from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "downloadSchedule": UpdateSchedule.from_dict(obj["downloadSchedule"]) if obj.get("downloadSchedule") is not None else None, + "updateSchedule": UpdateSchedule.from_dict(obj["updateSchedule"]) if obj.get("updateSchedule") is not None else None + }) + return _obj + + diff --git a/flightctl/models/device_updated_status.py b/flightctl/models/device_updated_status.py index 5546c14..ab99398 100644 --- a/flightctl/models/device_updated_status.py +++ b/flightctl/models/device_updated_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,7 +26,7 @@ class DeviceUpdatedStatus(BaseModel): """ - DeviceUpdatedStatus + Current status of the device update. """ # noqa: E501 status: DeviceUpdatedStatusType info: Optional[StrictStr] = Field(default=None, description="Human readable information about the last device update transition.") diff --git a/flightctl/models/device_updated_status_type.py b/flightctl/models/device_updated_status_type.py index ab94020..ac040c1 100644 --- a/flightctl/models/device_updated_status_type.py +++ b/flightctl/models/device_updated_status_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class DeviceUpdatedStatusType(str, Enum): """ - DeviceUpdatedStatusType + Status type of the device update. """ """ diff --git a/flightctl/models/devices_summary.py b/flightctl/models/devices_summary.py index 966d624..039098c 100644 --- a/flightctl/models/devices_summary.py +++ b/flightctl/models/devices_summary.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/disk_resource_monitor_spec.py b/flightctl/models/disk_resource_monitor_spec.py index b35e8cd..497d435 100644 --- a/flightctl/models/disk_resource_monitor_spec.py +++ b/flightctl/models/disk_resource_monitor_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class DiskResourceMonitorSpec(BaseModel): """ DiskResourceMonitorSpec """ # noqa: E501 - monitor_type: StrictStr = Field(alias="monitorType") + monitor_type: StrictStr = Field(description="The type of resource to monitor.", alias="monitorType") alert_rules: List[ResourceAlertRule] = Field(description="Array of alert rules. Only one alert per severity is allowed.", alias="alertRules") sampling_interval: Annotated[str, Field(strict=True)] = Field(description="Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.", alias="samplingInterval") path: StrictStr = Field(description="The directory path to monitor for disk usage.") diff --git a/flightctl/models/disruption_allowance.py b/flightctl/models/disruption_allowance.py index 911636e..0bd1b07 100644 --- a/flightctl/models/disruption_allowance.py +++ b/flightctl/models/disruption_allowance.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/enrollment_config.py b/flightctl/models/enrollment_config.py index f8ba1f9..4a33faf 100644 --- a/flightctl/models/enrollment_config.py +++ b/flightctl/models/enrollment_config.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -17,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List from flightctl.models.enrollment_service import EnrollmentService from typing import Optional, Set @@ -28,8 +29,7 @@ class EnrollmentConfig(BaseModel): EnrollmentConfig """ # noqa: E501 enrollment_service: EnrollmentService = Field(alias="enrollment-service") - grpc_management_endpoint: StrictStr = Field(alias="grpc-management-endpoint") - __properties: ClassVar[List[str]] = ["enrollment-service", "grpc-management-endpoint"] + __properties: ClassVar[List[str]] = ["enrollment-service"] model_config = ConfigDict( populate_by_name=True, @@ -85,8 +85,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "enrollment-service": EnrollmentService.from_dict(obj["enrollment-service"]) if obj.get("enrollment-service") is not None else None, - "grpc-management-endpoint": obj.get("grpc-management-endpoint") + "enrollment-service": EnrollmentService.from_dict(obj["enrollment-service"]) if obj.get("enrollment-service") is not None else None }) return _obj diff --git a/flightctl/models/enrollment_request.py b/flightctl/models/enrollment_request.py index ee7eab0..29b6613 100644 --- a/flightctl/models/enrollment_request.py +++ b/flightctl/models/enrollment_request.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -29,8 +30,8 @@ class EnrollmentRequest(BaseModel): """ EnrollmentRequest represents a request for approval to enroll a device. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta spec: EnrollmentRequestSpec status: Optional[EnrollmentRequestStatus] = None diff --git a/flightctl/models/enrollment_request_approval.py b/flightctl/models/enrollment_request_approval.py index a19e859..f5f4a4c 100644 --- a/flightctl/models/enrollment_request_approval.py +++ b/flightctl/models/enrollment_request_approval.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,12 +26,12 @@ class EnrollmentRequestApproval(BaseModel): """ - EnrollmentRequestApproval + EnrollmentRequestApproval contains information about the approval of a device enrollment request. """ # noqa: E501 - labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="labels is a set of labels to apply to the device.") - approved: StrictBool = Field(description="approved indicates whether the request has been approved.") - approved_by: Optional[StrictStr] = Field(default=None, description="approvedBy is the name of the approver.", alias="approvedBy") - approved_at: Optional[datetime] = Field(default=None, description="approvedAt is the time at which the request was approved.", alias="approvedAt") + labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A set of labels to apply to the device.") + approved: StrictBool = Field(description="Indicates whether the request has been approved.") + approved_by: Optional[StrictStr] = Field(default=None, description="The name of the approver.", alias="approvedBy") + approved_at: Optional[datetime] = Field(default=None, description="The time at which the request was approved.", alias="approvedAt") __properties: ClassVar[List[str]] = ["labels", "approved", "approvedBy", "approvedAt"] model_config = ConfigDict( diff --git a/flightctl/models/enrollment_request_list.py b/flightctl/models/enrollment_request_list.py index 2381506..c827be8 100644 --- a/flightctl/models/enrollment_request_list.py +++ b/flightctl/models/enrollment_request_list.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,8 +29,8 @@ class EnrollmentRequestList(BaseModel): """ EnrollmentRequestList is a list of EnrollmentRequest. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ListMeta items: List[EnrollmentRequest] = Field(description="List of EnrollmentRequest.") __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "items"] diff --git a/flightctl/models/enrollment_request_spec.py b/flightctl/models/enrollment_request_spec.py index 253901c..9bfc456 100644 --- a/flightctl/models/enrollment_request_spec.py +++ b/flightctl/models/enrollment_request_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,9 +28,9 @@ class EnrollmentRequestSpec(BaseModel): """ EnrollmentRequestSpec is a description of a EnrollmentRequest's target state. """ # noqa: E501 - csr: StrictStr = Field(description="csr is a PEM-encoded PKCS#10 certificate signing request.") + csr: StrictStr = Field(description="The PEM-encoded PKCS#10 certificate signing request.") device_status: Optional[DeviceStatus] = Field(default=None, alias="deviceStatus") - labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A set of labels that the service will apply to this device when its enrollment is approved") + labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A set of labels that the service will apply to this device when its enrollment is approved.") __properties: ClassVar[List[str]] = ["csr", "deviceStatus", "labels"] model_config = ConfigDict( diff --git a/flightctl/models/enrollment_request_status.py b/flightctl/models/enrollment_request_status.py index 02c37c9..f9da46d 100644 --- a/flightctl/models/enrollment_request_status.py +++ b/flightctl/models/enrollment_request_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class EnrollmentRequestStatus(BaseModel): """ EnrollmentRequestStatus represents information about the status of a EnrollmentRequest. """ # noqa: E501 - certificate: Optional[StrictStr] = Field(default=None, description="certificate is a PEM-encoded signed certificate.") + certificate: Optional[StrictStr] = Field(default=None, description="The PEM-encoded signed certificate.") conditions: List[Condition] = Field(description="Current state of the EnrollmentRequest.") approval: Optional[EnrollmentRequestApproval] = None __properties: ClassVar[List[str]] = ["certificate", "conditions", "approval"] diff --git a/flightctl/models/enrollment_service.py b/flightctl/models/enrollment_service.py index b5f7971..1f19f5d 100644 --- a/flightctl/models/enrollment_service.py +++ b/flightctl/models/enrollment_service.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,11 +27,11 @@ class EnrollmentService(BaseModel): """ - EnrollmentService + EnrollmentService contains information about how to communicate with a Flight Control enrollment service. """ # noqa: E501 authentication: EnrollmentServiceAuth service: EnrollmentServiceService - enrollment_ui_endpoint: StrictStr = Field(alias="enrollment-ui-endpoint") + enrollment_ui_endpoint: StrictStr = Field(description="The URL of the UI that the agent uses to print the QR code and link for enrolling the device.", alias="enrollment-ui-endpoint") __properties: ClassVar[List[str]] = ["authentication", "service", "enrollment-ui-endpoint"] model_config = ConfigDict( diff --git a/flightctl/models/enrollment_service_auth.py b/flightctl/models/enrollment_service_auth.py index 6908567..1783ed6 100644 --- a/flightctl/models/enrollment_service_auth.py +++ b/flightctl/models/enrollment_service_auth.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,10 +25,10 @@ class EnrollmentServiceAuth(BaseModel): """ - EnrollmentServiceAuth + EnrollmentServiceAuth contains the client authentication information for a Flight Control enrollment service. """ # noqa: E501 - client_certificate_data: StrictStr = Field(alias="client-certificate-data") - client_key_data: StrictStr = Field(alias="client-key-data") + client_certificate_data: StrictStr = Field(description="ClientCertificateData contains PEM-encoded data from a client cert file for TLS.", alias="client-certificate-data") + client_key_data: StrictStr = Field(description="ClientKeyData contains PEM-encoded data from a client key file for TLS.", alias="client-key-data") __properties: ClassVar[List[str]] = ["client-certificate-data", "client-key-data"] model_config = ConfigDict( diff --git a/flightctl/models/enrollment_service_service.py b/flightctl/models/enrollment_service_service.py index 942bd26..c2a9624 100644 --- a/flightctl/models/enrollment_service_service.py +++ b/flightctl/models/enrollment_service_service.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,10 +25,10 @@ class EnrollmentServiceService(BaseModel): """ - EnrollmentServiceService + EnrollmentServiceService contains information about connecting to a Flight Control enrollment service. """ # noqa: E501 - certificate_authority_data: StrictStr = Field(alias="certificate-authority-data") - server: StrictStr + certificate_authority_data: StrictStr = Field(description="CertificateAuthorityData contains PEM-encoded certificate authority certificates.", alias="certificate-authority-data") + server: StrictStr = Field(description="Server is the address of the Flight Control enrollment service (https://hostname:port).") __properties: ClassVar[List[str]] = ["certificate-authority-data", "server"] model_config = ConfigDict( diff --git a/flightctl/models/error.py b/flightctl/models/error.py index 346c870..41629d7 100644 --- a/flightctl/models/error.py +++ b/flightctl/models/error.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,7 +27,7 @@ class Error(BaseModel): """ Error """ # noqa: E501 - message: StrictStr = Field(description="Error message") + message: StrictStr = Field(description="Error message.") __properties: ClassVar[List[str]] = ["message"] model_config = ConfigDict( diff --git a/flightctl/models/file_operation.py b/flightctl/models/file_operation.py index d8f2eb1..1c8f106 100644 --- a/flightctl/models/file_operation.py +++ b/flightctl/models/file_operation.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,16 +21,15 @@ class FileOperation(str, Enum): """ - The type of operation that was observed on the file. + FileOperation """ """ allowed enum values """ - CREATE = 'Create' - REMOVE = 'Remove' - UPDATE = 'Update' - REBOOT = 'Reboot' + CREATED = 'created' + REMOVED = 'removed' + UPDATED = 'updated' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/flightctl/models/file_spec.py b/flightctl/models/file_spec.py index da111c3..7a9fe9e 100644 --- a/flightctl/models/file_spec.py +++ b/flightctl/models/file_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -29,7 +30,7 @@ class FileSpec(BaseModel): path: StrictStr = Field(description="The absolute path to the file on the device. Note that any existing file will be overwritten.") content: StrictStr = Field(description="The plain text (UTF-8) or base64-encoded content of the file.") content_encoding: Optional[StrictStr] = Field(default=None, description="How the contents are encoded. Must be either \"plain\" or \"base64\". Defaults to \"plain\".", alias="contentEncoding") - mode: Optional[StrictInt] = Field(default=None, description="The file’s permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644. ") + mode: Optional[StrictInt] = Field(default=None, description="The file's permission mode. You may specify the more familiar octal with a leading zero (e.g., 0644) or as a decimal without a leading zero (e.g., 420). Setuid/setgid/sticky bits are supported. If not specified, the permission mode for files defaults to 0644.") user: Optional[StrictStr] = Field(default=None, description="The file's owner, specified either as a name or numeric ID. Defaults to \"root\".") group: Optional[StrictStr] = Field(default=None, description="The file's group, specified either as a name or numeric ID. Defaults to \"root\".") __properties: ClassVar[List[str]] = ["path", "content", "contentEncoding", "mode", "user", "group"] diff --git a/flightctl/models/fleet.py b/flightctl/models/fleet.py index e56f582..8d4bbf4 100644 --- a/flightctl/models/fleet.py +++ b/flightctl/models/fleet.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -29,8 +30,8 @@ class Fleet(BaseModel): """ Fleet represents a set of devices. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta spec: FleetSpec status: Optional[FleetStatus] = None diff --git a/flightctl/models/fleet_list.py b/flightctl/models/fleet_list.py index 61a239e..7796df9 100644 --- a/flightctl/models/fleet_list.py +++ b/flightctl/models/fleet_list.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,8 +29,8 @@ class FleetList(BaseModel): """ FleetList is a list of Fleets. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ListMeta items: List[Fleet] = Field(description="List of Fleets.") __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "items"] diff --git a/flightctl/models/fleet_rollout_status.py b/flightctl/models/fleet_rollout_status.py index b4dc177..8066baf 100644 --- a/flightctl/models/fleet_rollout_status.py +++ b/flightctl/models/fleet_rollout_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,9 +25,9 @@ class FleetRolloutStatus(BaseModel): """ - FleetRolloutStatus + FleetRolloutStatus represents information about the status of a fleet rollout. """ # noqa: E501 - current_batch: Optional[StrictInt] = Field(default=None, alias="currentBatch") + current_batch: Optional[StrictInt] = Field(default=None, description="The batch number currently being rolled out.", alias="currentBatch") __properties: ClassVar[List[str]] = ["currentBatch"] model_config = ConfigDict( diff --git a/flightctl/models/fleet_spec.py b/flightctl/models/fleet_spec.py index df991ee..6341347 100644 --- a/flightctl/models/fleet_spec.py +++ b/flightctl/models/fleet_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/fleet_spec_template.py b/flightctl/models/fleet_spec_template.py index e94a3e5..b6c3b2a 100644 --- a/flightctl/models/fleet_spec_template.py +++ b/flightctl/models/fleet_spec_template.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,7 +27,7 @@ class FleetSpecTemplate(BaseModel): """ - FleetSpecTemplate + The template for the devices in the fleet. """ # noqa: E501 metadata: Optional[ObjectMeta] = None spec: DeviceSpec diff --git a/flightctl/models/fleet_status.py b/flightctl/models/fleet_status.py index 89d5f38..ed449a0 100644 --- a/flightctl/models/fleet_status.py +++ b/flightctl/models/fleet_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/generic_repo_spec.py b/flightctl/models/generic_repo_spec.py index f9908ec..a7a52ec 100644 --- a/flightctl/models/generic_repo_spec.py +++ b/flightctl/models/generic_repo_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,7 +28,7 @@ class GenericRepoSpec(BaseModel): """ GenericRepoSpec """ # noqa: E501 - url: StrictStr = Field(description="The (possibly remote) repository URL") + url: StrictStr = Field(description="The (possibly remote) repository URL.") type: RepoSpecType __properties: ClassVar[List[str]] = ["url", "type"] diff --git a/flightctl/models/git_config_provider_spec.py b/flightctl/models/git_config_provider_spec.py index f0434ee..fda8486 100644 --- a/flightctl/models/git_config_provider_spec.py +++ b/flightctl/models/git_config_provider_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,7 +28,7 @@ class GitConfigProviderSpec(BaseModel): """ GitConfigProviderSpec """ # noqa: E501 - name: StrictStr = Field(description="The name of the config provider") + name: StrictStr = Field(description="The name of the config provider.") git_ref: GitConfigProviderSpecGitRef = Field(alias="gitRef") __properties: ClassVar[List[str]] = ["name", "gitRef"] diff --git a/flightctl/models/git_config_provider_spec_git_ref.py b/flightctl/models/git_config_provider_spec_git_ref.py index 81172ac..90cb74c 100644 --- a/flightctl/models/git_config_provider_spec_git_ref.py +++ b/flightctl/models/git_config_provider_spec_git_ref.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,12 +25,12 @@ class GitConfigProviderSpecGitRef(BaseModel): """ - GitConfigProviderSpecGitRef + The reference to a Git configuration server. """ # noqa: E501 - repository: StrictStr = Field(description="The name of the repository resource to use as the sync source ") - target_revision: StrictStr = Field(alias="targetRevision") - path: StrictStr - mount_path: Optional[StrictStr] = Field(default='/', description="Path to config in device", alias="mountPath") + repository: StrictStr = Field(description="The name of the Repository resource.") + target_revision: StrictStr = Field(description="The revision to use from the Repository.", alias="targetRevision") + path: StrictStr = Field(description="The path to the config in the Repository.") + mount_path: Optional[StrictStr] = Field(default='/', description="Path in the device's file system at which the repository's path should be mounted.", alias="mountPath") __properties: ClassVar[List[str]] = ["repository", "targetRevision", "path", "mountPath"] model_config = ConfigDict( diff --git a/flightctl/models/hook_action.py b/flightctl/models/hook_action.py index fbe4045..20a5f63 100644 --- a/flightctl/models/hook_action.py +++ b/flightctl/models/hook_action.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -13,125 +14,102 @@ from __future__ import annotations -import json import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from flightctl.models.hook_action_one_of import HookActionOneOf -from flightctl.models.hook_action_one_of1 import HookActionOneOf1 -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self +import re # noqa: F401 +import json -HOOKACTION_ONE_OF_SCHEMAS = ["HookActionOneOf", "HookActionOneOf1"] +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from flightctl.models.hook_condition import HookCondition +from typing import Optional, Set +from typing_extensions import Self class HookAction(BaseModel): """ HookAction - """ - # data type: HookActionOneOf - oneof_schema_1_validator: Optional[HookActionOneOf] = None - # data type: HookActionOneOf1 - oneof_schema_2_validator: Optional[HookActionOneOf1] = None - actual_instance: Optional[Union[HookActionOneOf, HookActionOneOf1]] = None - one_of_schemas: Set[str] = { "HookActionOneOf", "HookActionOneOf1" } + """ # noqa: E501 + var_if: Optional[List[HookCondition]] = Field(default=None, description="Conditions that must be met for the action to be executed.", alias="if") + timeout: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are 's' for seconds, 'm' for minutes, and 'h' for hours.") + run: StrictStr = Field(description="The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context.") + env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime.", alias="envVars") + work_dir: Optional[StrictStr] = Field(default=None, description="The working directory to be used when running the command.", alias="workDir") + __properties: ClassVar[List[str]] = ["if", "timeout", "run", "envVars", "workDir"] + + @field_validator('timeout') + def timeout_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?:[1-9]\d*)?\d[smh]$", value): + raise ValueError(r"must validate the regular expression /^(?:[1-9]\d*)?\d[smh]$/") + return value model_config = ConfigDict( + populate_by_name=True, validate_assignment=True, protected_namespaces=(), ) - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = HookAction.model_construct() - error_messages = [] - match = 0 - # validate data type: HookActionOneOf - if not isinstance(v, HookActionOneOf): - error_messages.append(f"Error! Input type `{type(v)}` is not `HookActionOneOf`") - else: - match += 1 - # validate data type: HookActionOneOf1 - if not isinstance(v, HookActionOneOf1): - error_messages.append(f"Error! Input type `{type(v)}` is not `HookActionOneOf1`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in HookAction with oneOf schemas: HookActionOneOf, HookActionOneOf1. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in HookAction with oneOf schemas: HookActionOneOf, HookActionOneOf1. Details: " + ", ".join(error_messages)) - else: - return v + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) + 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) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into HookActionOneOf - try: - instance.actual_instance = HookActionOneOf.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into HookActionOneOf1 - try: - instance.actual_instance = HookActionOneOf1.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into HookAction with oneOf schemas: HookActionOneOf, HookActionOneOf1. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into HookAction with oneOf schemas: HookActionOneOf, HookActionOneOf1. Details: " + ", ".join(error_messages)) - else: - return instance + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HookAction 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 var_if (list) + _items = [] + if self.var_if: + for _item_var_if in self.var_if: + if _item_var_if: + _items.append(_item_var_if.to_dict()) + _dict['if'] = _items + return _dict - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], HookActionOneOf, HookActionOneOf1]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HookAction from a dict""" + if obj is None: return None - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "if": [HookCondition.from_dict(_item) for _item in obj["if"]] if obj.get("if") is not None else None, + "timeout": obj.get("timeout"), + "run": obj.get("run"), + "envVars": obj.get("envVars"), + "workDir": obj.get("workDir") + }) + return _obj diff --git a/flightctl/models/hook_action_run.py b/flightctl/models/hook_action_run.py new file mode 100644 index 0000000..a8dc276 --- /dev/null +++ b/flightctl/models/hook_action_run.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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 typing import Optional, Set +from typing_extensions import Self + +class HookActionRun(BaseModel): + """ + HookActionRun + """ # noqa: E501 + run: StrictStr = Field(description="The command to be executed, including any arguments using standard shell syntax. This field supports multiple commands piped together, as if they were executed under a bash -c context.") + env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime.", alias="envVars") + work_dir: Optional[StrictStr] = Field(default=None, description="The working directory to be used when running the command.", alias="workDir") + __properties: ClassVar[List[str]] = ["run", "envVars", "workDir"] + + 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 HookActionRun 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 HookActionRun from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "run": obj.get("run"), + "envVars": obj.get("envVars"), + "workDir": obj.get("workDir") + }) + return _obj + + diff --git a/flightctl/models/hook_condition.py b/flightctl/models/hook_condition.py new file mode 100644 index 0000000..c4bc337 --- /dev/null +++ b/flightctl/models/hook_condition.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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 +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from flightctl.models.hook_condition_path_op import HookConditionPathOp +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +HOOKCONDITION_ONE_OF_SCHEMAS = ["HookConditionPathOp", "str"] + +class HookCondition(BaseModel): + """ + HookCondition + """ + # data type: HookConditionPathOp + oneof_schema_1_validator: Optional[HookConditionPathOp] = None + # data type: str + oneof_schema_2_validator: Optional[StrictStr] = Field(default=None, description="An expression that must evaluate to true as condition for the action to be performed.") + actual_instance: Optional[Union[HookConditionPathOp, str]] = None + one_of_schemas: Set[str] = { "HookConditionPathOp", "str" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = HookCondition.model_construct() + error_messages = [] + match = 0 + # validate data type: HookConditionPathOp + if not isinstance(v, HookConditionPathOp): + error_messages.append(f"Error! Input type `{type(v)}` is not `HookConditionPathOp`") + else: + match += 1 + # validate data type: str + try: + instance.oneof_schema_2_validator = v + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in HookCondition with oneOf schemas: HookConditionPathOp, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in HookCondition with oneOf schemas: HookConditionPathOp, str. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into HookConditionPathOp + try: + instance.actual_instance = HookConditionPathOp.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into str + try: + # validation + instance.oneof_schema_2_validator = json.loads(json_str) + # assign value to actual_instance + instance.actual_instance = instance.oneof_schema_2_validator + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into HookCondition with oneOf schemas: HookConditionPathOp, str. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into HookCondition with oneOf schemas: HookConditionPathOp, str. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], HookConditionPathOp, str]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/flightctl/models/hook_condition_path_op.py b/flightctl/models/hook_condition_path_op.py new file mode 100644 index 0000000..2ec6f91 --- /dev/null +++ b/flightctl/models/hook_condition_path_op.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.file_operation import FileOperation +from typing import Optional, Set +from typing_extensions import Self + +class HookConditionPathOp(BaseModel): + """ + HookConditionPathOp + """ # noqa: E501 + path: StrictStr = Field(description="The absolute path to a file or directory that must have changed as condition for the action to be performed.") + op: List[FileOperation] = Field(description="The operation(s) on files at or below the path that satisfy the path condition.") + __properties: ClassVar[List[str]] = ["path", "op"] + + 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 HookConditionPathOp 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 HookConditionPathOp from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "path": obj.get("path"), + "op": obj.get("op") + }) + return _obj + + diff --git a/flightctl/models/http_config.py b/flightctl/models/http_config.py index 9fe7ab2..5ca7dbc 100644 --- a/flightctl/models/http_config.py +++ b/flightctl/models/http_config.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,15 +25,15 @@ class HttpConfig(BaseModel): """ - HttpConfig + Configuration for HTTP transport. """ # noqa: E501 - username: Optional[StrictStr] = Field(default=None, description="The username for auth with HTTP transport") - password: Optional[SecretStr] = Field(default=None, description="The password for auth with HTTP transport") - tls_crt: Optional[SecretStr] = Field(default=None, description="Base64 encoded TLS cert data", alias="tls.crt") - tls_key: Optional[SecretStr] = Field(default=None, description="Base64 encoded TLS cert key", alias="tls.key") - ca_crt: Optional[StrictStr] = Field(default=None, description="Base64 encoded root CA", alias="ca.crt") - skip_server_verification: Optional[StrictBool] = Field(default=None, description="Skip remote server verification", alias="skipServerVerification") - token: Optional[SecretStr] = Field(default=None, description="The token for auth with HTTP transport") + username: Optional[StrictStr] = Field(default=None, description="The username for auth with HTTP transport.") + password: Optional[SecretStr] = Field(default=None, description="The password for auth with HTTP transport.") + tls_crt: Optional[SecretStr] = Field(default=None, description="Base64 encoded TLS cert data.", alias="tls.crt") + tls_key: Optional[SecretStr] = Field(default=None, description="Base64 encoded TLS cert key.", alias="tls.key") + ca_crt: Optional[StrictStr] = Field(default=None, description="Base64 encoded root CA.", alias="ca.crt") + skip_server_verification: Optional[StrictBool] = Field(default=None, description="Skip remote server verification.", alias="skipServerVerification") + token: Optional[SecretStr] = Field(default=None, description="The token for auth with HTTP transport.") __properties: ClassVar[List[str]] = ["username", "password", "tls.crt", "tls.key", "ca.crt", "skipServerVerification", "token"] model_config = ConfigDict( diff --git a/flightctl/models/http_config_provider_spec.py b/flightctl/models/http_config_provider_spec.py index 4fbc199..a698cb3 100644 --- a/flightctl/models/http_config_provider_spec.py +++ b/flightctl/models/http_config_provider_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,7 +28,7 @@ class HttpConfigProviderSpec(BaseModel): """ HttpConfigProviderSpec """ # noqa: E501 - name: StrictStr = Field(description="The name of the config provider") + name: StrictStr = Field(description="The name of the config provider.") http_ref: HttpConfigProviderSpecHttpRef = Field(alias="httpRef") __properties: ClassVar[List[str]] = ["name", "httpRef"] diff --git a/flightctl/models/http_config_provider_spec_http_ref.py b/flightctl/models/http_config_provider_spec_http_ref.py index 5d72b41..4000aee 100644 --- a/flightctl/models/http_config_provider_spec_http_ref.py +++ b/flightctl/models/http_config_provider_spec_http_ref.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,11 +25,11 @@ class HttpConfigProviderSpecHttpRef(BaseModel): """ - HttpConfigProviderSpecHttpRef + The reference to an HTTP configuration server. """ # noqa: E501 - repository: StrictStr = Field(description="The name of the repository resource to use as the sync source ") - suffix: Optional[StrictStr] = Field(default=None, description="Part of the URL that comes after the base URL. It can include query parameters such as: /path/to/endpoint?query=param ") - file_path: StrictStr = Field(description="The path of the file where the response is stored in the filesystem of the device. ", alias="filePath") + repository: StrictStr = Field(description="The name of the repository resource to use as the sync source.") + suffix: Optional[StrictStr] = Field(default=None, description="Part of the URL that comes after the base URL. It can include query parameters such as: \"/path/to/endpoint?query=param\".") + file_path: StrictStr = Field(description="Path in the device's file system to which the content returned by the HTTP sever should be written.", alias="filePath") __properties: ClassVar[List[str]] = ["repository", "suffix", "filePath"] model_config = ConfigDict( diff --git a/flightctl/models/http_repo_spec.py b/flightctl/models/http_repo_spec.py index b070663..212559a 100644 --- a/flightctl/models/http_repo_spec.py +++ b/flightctl/models/http_repo_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class HttpRepoSpec(BaseModel): """ HttpRepoSpec """ # noqa: E501 - url: StrictStr = Field(description="The HTTP URL to call or clone from") + url: StrictStr = Field(description="The HTTP URL to call or clone from.") type: RepoSpecType http_config: HttpConfig = Field(alias="httpConfig") validation_suffix: Optional[StrictStr] = Field(default=None, description="URL suffix used only for validating access to the repository. Users might use the URL field as a root URL to be used by config sources adding suffixes. This will help with the validation of the http endpoint.", alias="validationSuffix") diff --git a/flightctl/models/image_application_provider.py b/flightctl/models/image_application_provider.py index 19cdec2..07d84d3 100644 --- a/flightctl/models/image_application_provider.py +++ b/flightctl/models/image_application_provider.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,7 +27,7 @@ class ImageApplicationProvider(BaseModel): """ ImageApplicationProvider """ # noqa: E501 - image: StrictStr = Field(description="Reference to the container image for the application package") + image: StrictStr = Field(description="Reference to the container image for the application package.") __properties: ClassVar[List[str]] = ["image"] model_config = ConfigDict( diff --git a/flightctl/models/inline_config_provider_spec.py b/flightctl/models/inline_config_provider_spec.py index ba1dec1..1d560e1 100644 --- a/flightctl/models/inline_config_provider_spec.py +++ b/flightctl/models/inline_config_provider_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,8 +28,8 @@ class InlineConfigProviderSpec(BaseModel): """ InlineConfigProviderSpec """ # noqa: E501 - name: StrictStr = Field(description="The name of the config provider") - inline: List[FileSpec] + name: StrictStr = Field(description="The name of the config provider.") + inline: List[FileSpec] = Field(description="A list of files to create on the device.") __properties: ClassVar[List[str]] = ["name", "inline"] model_config = ConfigDict( diff --git a/flightctl/models/kubernetes_secret_provider_spec.py b/flightctl/models/kubernetes_secret_provider_spec.py index 56fea19..09e7f63 100644 --- a/flightctl/models/kubernetes_secret_provider_spec.py +++ b/flightctl/models/kubernetes_secret_provider_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,7 +28,7 @@ class KubernetesSecretProviderSpec(BaseModel): """ KubernetesSecretProviderSpec """ # noqa: E501 - name: StrictStr = Field(description="The name of the config provider") + name: StrictStr = Field(description="The name of the config provider.") secret_ref: KubernetesSecretProviderSpecSecretRef = Field(alias="secretRef") __properties: ClassVar[List[str]] = ["name", "secretRef"] diff --git a/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py b/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py index 4823169..08a7cf1 100644 --- a/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py +++ b/flightctl/models/kubernetes_secret_provider_spec_secret_ref.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,11 +25,11 @@ class KubernetesSecretProviderSpecSecretRef(BaseModel): """ - KubernetesSecretProviderSpecSecretRef + The reference to a Kubernetes secret. """ # noqa: E501 - name: StrictStr - namespace: StrictStr - mount_path: StrictStr = Field(alias="mountPath") + name: StrictStr = Field(description="The name of the secret.") + namespace: StrictStr = Field(description="The namespace of the secret.") + mount_path: StrictStr = Field(description="Path in the device's file system at which the secret should be mounted.", alias="mountPath") __properties: ClassVar[List[str]] = ["name", "namespace", "mountPath"] model_config = ConfigDict( diff --git a/flightctl/models/label_selector.py b/flightctl/models/label_selector.py index 641ecf4..740036e 100644 --- a/flightctl/models/label_selector.py +++ b/flightctl/models/label_selector.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,10 +27,10 @@ class LabelSelector(BaseModel): """ - A map of key,value pairs that are ANDed. Empty/null label selectors match nothing. + A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. Empty/null label selectors match nothing. """ # noqa: E501 - match_labels: Optional[Dict[str, StrictStr]] = Field(default=None, alias="matchLabels") - match_expressions: Optional[Annotated[List[MatchExpression], Field(min_length=1)]] = Field(default=None, alias="matchExpressions") + match_labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A map of {key,value} pairs.", alias="matchLabels") + match_expressions: Optional[Annotated[List[MatchExpression], Field(min_length=1)]] = Field(default=None, description="A list of match expressions.", alias="matchExpressions") __properties: ClassVar[List[str]] = ["matchLabels", "matchExpressions"] model_config = ConfigDict( diff --git a/flightctl/models/list_meta.py b/flightctl/models/list_meta.py index ab117bc..47ae51b 100644 --- a/flightctl/models/list_meta.py +++ b/flightctl/models/list_meta.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,8 +27,8 @@ class ListMeta(BaseModel): """ ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}. """ # noqa: E501 - var_continue: Optional[StrictStr] = Field(default=None, description="continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", alias="continue") - remaining_item_count: Optional[StrictInt] = Field(default=None, description="remainingItemCount is the number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", alias="remainingItemCount") + var_continue: Optional[StrictStr] = Field(default=None, description="May be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.", alias="continue") + remaining_item_count: Optional[StrictInt] = Field(default=None, description="The number of subsequent items in the list which are not included in this list response. If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is *estimating* the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.", alias="remainingItemCount") __properties: ClassVar[List[str]] = ["continue", "remainingItemCount"] model_config = ConfigDict( diff --git a/flightctl/models/match_expression.py b/flightctl/models/match_expression.py index d22d441..ea1edf9 100644 --- a/flightctl/models/match_expression.py +++ b/flightctl/models/match_expression.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -17,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -26,9 +27,9 @@ class MatchExpression(BaseModel): """ MatchExpression """ # noqa: E501 - key: StrictStr - operator: StrictStr - values: Optional[List[StrictStr]] = None + key: StrictStr = Field(description="The label key that the selector applies to.") + operator: StrictStr = Field(description="The operation to apply when matching.") + values: Optional[List[StrictStr]] = Field(default=None, description="The list of values to match.") __properties: ClassVar[List[str]] = ["key", "operator", "values"] @field_validator('operator') diff --git a/flightctl/models/memory_resource_monitor_spec.py b/flightctl/models/memory_resource_monitor_spec.py index 3e92e84..3fc081a 100644 --- a/flightctl/models/memory_resource_monitor_spec.py +++ b/flightctl/models/memory_resource_monitor_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class MemoryResourceMonitorSpec(BaseModel): """ MemoryResourceMonitorSpec """ # noqa: E501 - monitor_type: StrictStr = Field(alias="monitorType") + monitor_type: StrictStr = Field(description="The type of resource to monitor.", alias="monitorType") alert_rules: List[ResourceAlertRule] = Field(description="Array of alert rules. Only one alert per severity is allowed.", alias="alertRules") sampling_interval: Annotated[str, Field(strict=True)] = Field(description="Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.", alias="samplingInterval") __properties: ClassVar[List[str]] = ["monitorType", "alertRules", "samplingInterval"] diff --git a/flightctl/models/object_meta.py b/flightctl/models/object_meta.py index 18aa717..f52c2d6 100644 --- a/flightctl/models/object_meta.py +++ b/flightctl/models/object_meta.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,9 +28,9 @@ class ObjectMeta(BaseModel): """ ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. """ # noqa: E501 - creation_timestamp: Optional[datetime] = Field(default=None, alias="creationTimestamp") - deletion_timestamp: Optional[datetime] = Field(default=None, alias="deletionTimestamp") - name: Optional[StrictStr] = Field(default=None, description="name of the object") + creation_timestamp: Optional[datetime] = Field(default=None, description="The time the object was created.", alias="creationTimestamp") + deletion_timestamp: Optional[datetime] = Field(default=None, description="The time the object will be deleted.", alias="deletionTimestamp") + name: Optional[StrictStr] = Field(default=None, description="The name of the object.") labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="Map of string keys and values that can be used to organize and categorize (scope and select) objects.") generation: Optional[StrictInt] = Field(default=None, description="A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.") owner: Optional[StrictStr] = Field(default=None, description="A resource that owns this resource, in \"kind/name\" format.") diff --git a/flightctl/models/patch_request_inner.py b/flightctl/models/patch_request_inner.py index b3a3ef9..f985ca1 100644 --- a/flightctl/models/patch_request_inner.py +++ b/flightctl/models/patch_request_inner.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/rendered_application_spec.py b/flightctl/models/rendered_application_spec.py index a81bb0a..bb1ac46 100644 --- a/flightctl/models/rendered_application_spec.py +++ b/flightctl/models/rendered_application_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,11 +25,11 @@ class RenderedApplicationSpec(BaseModel): """ - RenderedApplicationSpec + RenderedApplicationSpec describes the rendered and self-contained specification of an application. """ # noqa: E501 - env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime", alias="envVars") - name: Optional[StrictStr] = None - image: StrictStr = Field(description="Reference to the container image for the application package") + env_vars: Optional[Dict[str, StrictStr]] = Field(default=None, description="Environment variable key-value pairs, injected during runtime.", alias="envVars") + name: Optional[StrictStr] = Field(default=None, description="An application name.") + image: StrictStr = Field(description="Reference to the container image for the application package.") __properties: ClassVar[List[str]] = ["envVars", "name", "image"] model_config = ConfigDict( diff --git a/flightctl/models/rendered_device_spec.py b/flightctl/models/rendered_device_spec.py index afd7f3a..04103bd 100644 --- a/flightctl/models/rendered_device_spec.py +++ b/flightctl/models/rendered_device_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,8 +21,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from flightctl.models.device_console import DeviceConsole -from flightctl.models.device_hooks_spec import DeviceHooksSpec +from flightctl.models.device_decommission import DeviceDecommission from flightctl.models.device_os_spec import DeviceOSSpec +from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec from flightctl.models.rendered_application_spec import RenderedApplicationSpec from flightctl.models.rendered_device_spec_systemd import RenderedDeviceSpecSystemd from flightctl.models.resource_monitor import ResourceMonitor @@ -30,17 +32,18 @@ class RenderedDeviceSpec(BaseModel): """ - RenderedDeviceSpec + RenderedDeviceSpec describes the rendered and self-contained specification of a Device. """ # noqa: E501 - rendered_version: StrictStr = Field(alias="renderedVersion") + rendered_version: StrictStr = Field(description="Version of the rendered device spec.", alias="renderedVersion") + update_policy: Optional[DeviceUpdatePolicySpec] = Field(default=None, alias="updatePolicy") os: Optional[DeviceOSSpec] = None - config: Optional[StrictStr] = None - applications: Optional[List[RenderedApplicationSpec]] = None - hooks: Optional[DeviceHooksSpec] = None + config: Optional[StrictStr] = Field(default=None, description="The configuration to apply, in Ignition format.") + applications: Optional[List[RenderedApplicationSpec]] = Field(default=None, description="The list of applications to deploy.") systemd: Optional[RenderedDeviceSpecSystemd] = None resources: Optional[List[ResourceMonitor]] = Field(default=None, description="Array of resource monitor configurations.") console: Optional[DeviceConsole] = None - __properties: ClassVar[List[str]] = ["renderedVersion", "os", "config", "applications", "hooks", "systemd", "resources", "console"] + decommission: Optional[DeviceDecommission] = None + __properties: ClassVar[List[str]] = ["renderedVersion", "updatePolicy", "os", "config", "applications", "systemd", "resources", "console", "decommission"] model_config = ConfigDict( populate_by_name=True, @@ -81,6 +84,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of update_policy + if self.update_policy: + _dict['updatePolicy'] = self.update_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of os if self.os: _dict['os'] = self.os.to_dict() @@ -91,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_applications: _items.append(_item_applications.to_dict()) _dict['applications'] = _items - # override the default output from pydantic by calling `to_dict()` of hooks - if self.hooks: - _dict['hooks'] = self.hooks.to_dict() # override the default output from pydantic by calling `to_dict()` of systemd if self.systemd: _dict['systemd'] = self.systemd.to_dict() @@ -107,6 +110,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of console if self.console: _dict['console'] = self.console.to_dict() + # override the default output from pydantic by calling `to_dict()` of decommission + if self.decommission: + _dict['decommission'] = self.decommission.to_dict() return _dict @classmethod @@ -120,13 +126,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "renderedVersion": obj.get("renderedVersion"), + "updatePolicy": DeviceUpdatePolicySpec.from_dict(obj["updatePolicy"]) if obj.get("updatePolicy") is not None else None, "os": DeviceOSSpec.from_dict(obj["os"]) if obj.get("os") is not None else None, "config": obj.get("config"), "applications": [RenderedApplicationSpec.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None, - "hooks": DeviceHooksSpec.from_dict(obj["hooks"]) if obj.get("hooks") is not None else None, "systemd": RenderedDeviceSpecSystemd.from_dict(obj["systemd"]) if obj.get("systemd") is not None else None, "resources": [ResourceMonitor.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None, - "console": DeviceConsole.from_dict(obj["console"]) if obj.get("console") is not None else None + "console": DeviceConsole.from_dict(obj["console"]) if obj.get("console") is not None else None, + "decommission": DeviceDecommission.from_dict(obj["decommission"]) if obj.get("decommission") is not None else None }) return _obj diff --git a/flightctl/models/rendered_device_spec_systemd.py b/flightctl/models/rendered_device_spec_systemd.py index 62d10f0..0bf0b4e 100644 --- a/flightctl/models/rendered_device_spec_systemd.py +++ b/flightctl/models/rendered_device_spec_systemd.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,9 +25,9 @@ class RenderedDeviceSpecSystemd(BaseModel): """ - RenderedDeviceSpecSystemd + The systemd services to monitor. """ # noqa: E501 - match_patterns: Optional[List[StrictStr]] = Field(default=None, alias="matchPatterns") + match_patterns: Optional[List[StrictStr]] = Field(default=None, description="A list of match patterns.", alias="matchPatterns") __properties: ClassVar[List[str]] = ["matchPatterns"] model_config = ConfigDict( diff --git a/flightctl/models/repo_spec_type.py b/flightctl/models/repo_spec_type.py index 529b04b..256578f 100644 --- a/flightctl/models/repo_spec_type.py +++ b/flightctl/models/repo_spec_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class RepoSpecType(str, Enum): """ - RepoSpecType is the type of the repository + RepoSpecType is the type of the repository. """ """ diff --git a/flightctl/models/repository.py b/flightctl/models/repository.py index 0f994aa..29aaf24 100644 --- a/flightctl/models/repository.py +++ b/flightctl/models/repository.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,10 +28,10 @@ class Repository(BaseModel): """ - Repository represents a Git repository or an HTTP endpoint + Repository represents a Git repository or an HTTP endpoint. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta spec: Optional[RepositorySpec] = None status: Optional[RepositoryStatus] = None diff --git a/flightctl/models/repository_list.py b/flightctl/models/repository_list.py index eeb2cb7..638fc85 100644 --- a/flightctl/models/repository_list.py +++ b/flightctl/models/repository_list.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,8 +29,8 @@ class RepositoryList(BaseModel): """ RepositoryList is a list of Repositories. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ListMeta items: List[Repository] = Field(description="List of repositories.") __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "items"] diff --git a/flightctl/models/repository_spec.py b/flightctl/models/repository_spec.py index 24b49a9..1fc3330 100644 --- a/flightctl/models/repository_spec.py +++ b/flightctl/models/repository_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class RepositorySpec(BaseModel): """ - RepositorySpec + RepositorySpec describes a configuration repository. """ # data type: GenericRepoSpec oneof_schema_1_validator: Optional[GenericRepoSpec] = None diff --git a/flightctl/models/repository_status.py b/flightctl/models/repository_status.py index 17f561e..f791b0f 100644 --- a/flightctl/models/repository_status.py +++ b/flightctl/models/repository_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,7 +26,7 @@ class RepositoryStatus(BaseModel): """ - RepositoryStatus represents information about the status of a repository. Status may trail the actual state of a repository. + RepositoryStatus represents information about the status of a repository. """ # noqa: E501 conditions: List[Condition] = Field(description="Current state of the repository.") __properties: ClassVar[List[str]] = ["conditions"] diff --git a/flightctl/models/resource_alert_rule.py b/flightctl/models/resource_alert_rule.py index c6eacba..c57af35 100644 --- a/flightctl/models/resource_alert_rule.py +++ b/flightctl/models/resource_alert_rule.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/resource_alert_severity_type.py b/flightctl/models/resource_alert_severity_type.py index de1688e..4656e20 100644 --- a/flightctl/models/resource_alert_severity_type.py +++ b/flightctl/models/resource_alert_severity_type.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -20,7 +21,7 @@ class ResourceAlertSeverityType(str, Enum): """ - ResourceAlertSeverityType + Severity of the alert. """ """ diff --git a/flightctl/models/resource_monitor.py b/flightctl/models/resource_monitor.py index b5faadf..deb2742 100644 --- a/flightctl/models/resource_monitor.py +++ b/flightctl/models/resource_monitor.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/flightctl/models/resource_monitor_spec.py b/flightctl/models/resource_monitor_spec.py index cba9ef4..1cee6f5 100644 --- a/flightctl/models/resource_monitor_spec.py +++ b/flightctl/models/resource_monitor_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,9 +27,9 @@ class ResourceMonitorSpec(BaseModel): """ - ResourceMonitorSpec + Specification for monitoring a resource. """ # noqa: E501 - monitor_type: StrictStr = Field(alias="monitorType") + monitor_type: StrictStr = Field(description="The type of resource to monitor.", alias="monitorType") alert_rules: List[ResourceAlertRule] = Field(description="Array of alert rules. Only one alert per severity is allowed.", alias="alertRules") sampling_interval: Annotated[str, Field(strict=True)] = Field(description="Duration between monitor samples. Format: positive integer followed by 's' for seconds, 'm' for minutes, 'h' for hours.", alias="samplingInterval") __properties: ClassVar[List[str]] = ["monitorType", "alertRules", "samplingInterval"] diff --git a/flightctl/models/resource_sync.py b/flightctl/models/resource_sync.py index 39d083d..f6eb99d 100644 --- a/flightctl/models/resource_sync.py +++ b/flightctl/models/resource_sync.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -27,10 +28,10 @@ class ResourceSync(BaseModel): """ - ResourceSync represents a reference to one or more files in a repository to sync to resource definitions + ResourceSync represents a reference to one or more files in a repository to sync to resource definitions. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta spec: ResourceSyncSpec status: Optional[ResourceSyncStatus] = None diff --git a/flightctl/models/resource_sync_list.py b/flightctl/models/resource_sync_list.py index ac30a4d..6df499d 100644 --- a/flightctl/models/resource_sync_list.py +++ b/flightctl/models/resource_sync_list.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,8 +29,8 @@ class ResourceSyncList(BaseModel): """ ResourceSyncList """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ListMeta items: List[ResourceSync] = Field(description="List of resourcesync.") __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "items"] diff --git a/flightctl/models/resource_sync_spec.py b/flightctl/models/resource_sync_spec.py index 71366b8..4cc25cf 100644 --- a/flightctl/models/resource_sync_spec.py +++ b/flightctl/models/resource_sync_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,11 +25,11 @@ class ResourceSyncSpec(BaseModel): """ - ResourceSyncSpec + ResourceSyncSpec describes the file(s) to sync from a repository. """ # noqa: E501 - repository: StrictStr = Field(description="The name of the repository resource to use as the sync source ") - target_revision: StrictStr = Field(description="The desired revision in the repository", alias="targetRevision") - path: StrictStr = Field(description="The path of a file or directory in the repository. If a directory, the directory should contain only resource definitions with no subdirectories. Each file should contain the definition of one or more resources. ") + repository: StrictStr = Field(description="The name of the repository resource to use as the sync source.") + target_revision: StrictStr = Field(description="The desired revision in the repository.", alias="targetRevision") + path: StrictStr = Field(description="The path of a file or directory in the repository. If a directory, the directory should contain only resource definitions with no subdirectories. Each file should contain the definition of one or more resources.") __properties: ClassVar[List[str]] = ["repository", "targetRevision", "path"] model_config = ConfigDict( diff --git a/flightctl/models/resource_sync_status.py b/flightctl/models/resource_sync_status.py index ecc7200..7c4ee76 100644 --- a/flightctl/models/resource_sync_status.py +++ b/flightctl/models/resource_sync_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -25,10 +26,10 @@ class ResourceSyncStatus(BaseModel): """ - ResourceSyncStatus represents information about the status of a resourcesync + ResourceSyncStatus represents information about the status of a ResourceSync. """ # noqa: E501 - observed_commit: Optional[StrictStr] = Field(default=None, description="The last commit hash that was synced ", alias="observedCommit") - observed_generation: Optional[StrictInt] = Field(default=None, description="The last generation that was synced ", alias="observedGeneration") + observed_commit: Optional[StrictStr] = Field(default=None, description="The last commit hash that was synced.", alias="observedCommit") + observed_generation: Optional[StrictInt] = Field(default=None, description="The last generation that was synced.", alias="observedGeneration") conditions: List[Condition] = Field(description="Current state of a resourcesync.") __properties: ClassVar[List[str]] = ["observedCommit", "observedGeneration", "conditions"] diff --git a/flightctl/models/rollout_device_selection.py b/flightctl/models/rollout_device_selection.py index 1633dc6..685f359 100644 --- a/flightctl/models/rollout_device_selection.py +++ b/flightctl/models/rollout_device_selection.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -26,7 +27,7 @@ class RolloutDeviceSelection(BaseModel): """ - RolloutDeviceSelection + Describes how to select devices for rollout. """ # data type: BatchSequence oneof_schema_1_validator: Optional[BatchSequence] = None diff --git a/flightctl/models/rollout_policy.py b/flightctl/models/rollout_policy.py index 4a9faa4..3349445 100644 --- a/flightctl/models/rollout_policy.py +++ b/flightctl/models/rollout_policy.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -32,7 +33,7 @@ class RolloutPolicy(BaseModel): disruption_allowance: Optional[DisruptionAllowance] = Field(default=None, alias="disruptionAllowance") device_selection: Optional[RolloutDeviceSelection] = Field(default=None, alias="deviceSelection") success_threshold: Optional[StrictStr] = Field(default=None, description="Percentage is the string format representing percentage string.", alias="successThreshold") - default_update_timeout: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: - 's' for seconds - 'm' for minutes - 'h' for hours - 'd' for days ", alias="defaultUpdateTimeout") + default_update_timeout: Optional[Annotated[str, Field(strict=True)]] = Field(default='0s', description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.", alias="defaultUpdateTimeout") __properties: ClassVar[List[str]] = ["disruptionAllowance", "deviceSelection", "successThreshold", "defaultUpdateTimeout"] @field_validator('default_update_timeout') @@ -41,8 +42,8 @@ def default_update_timeout_validate_regular_expression(cls, value): if value is None: return value - if not re.match(r"^[1-9]\d*[smhd]$", value): - raise ValueError(r"must validate the regular expression /^[1-9]\d*[smhd]$/") + if not re.match(r"^(?:[1-9]\d*)?\d[smh]$", value): + raise ValueError(r"must validate the regular expression /^(?:[1-9]\d*)?\d[smh]$/") return value model_config = ConfigDict( @@ -105,7 +106,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "disruptionAllowance": DisruptionAllowance.from_dict(obj["disruptionAllowance"]) if obj.get("disruptionAllowance") is not None else None, "deviceSelection": RolloutDeviceSelection.from_dict(obj["deviceSelection"]) if obj.get("deviceSelection") is not None else None, "successThreshold": obj.get("successThreshold"), - "defaultUpdateTimeout": obj.get("defaultUpdateTimeout") + "defaultUpdateTimeout": obj.get("defaultUpdateTimeout") if obj.get("defaultUpdateTimeout") is not None else '0s' }) return _obj diff --git a/flightctl/models/ssh_config.py b/flightctl/models/ssh_config.py index eeb7a1b..4be9414 100644 --- a/flightctl/models/ssh_config.py +++ b/flightctl/models/ssh_config.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,11 +25,11 @@ class SshConfig(BaseModel): """ - SshConfig + Configuration for SSH transport. """ # noqa: E501 - ssh_private_key: Optional[SecretStr] = Field(default=None, description="Base64 encoded private SSH key", alias="sshPrivateKey") - private_key_passphrase: Optional[SecretStr] = Field(default=None, description="The passphrase for sshPrivateKey", alias="privateKeyPassphrase") - skip_server_verification: Optional[StrictBool] = Field(default=None, description="Skip remote server verification", alias="skipServerVerification") + ssh_private_key: Optional[SecretStr] = Field(default=None, description="Base64 encoded private SSH key.", alias="sshPrivateKey") + private_key_passphrase: Optional[SecretStr] = Field(default=None, description="The passphrase for sshPrivateKey.", alias="privateKeyPassphrase") + skip_server_verification: Optional[StrictBool] = Field(default=None, description="Skip remote server verification.", alias="skipServerVerification") __properties: ClassVar[List[str]] = ["sshPrivateKey", "privateKeyPassphrase", "skipServerVerification"] model_config = ConfigDict( diff --git a/flightctl/models/ssh_repo_spec.py b/flightctl/models/ssh_repo_spec.py index 4b7cbd2..2ca7201 100644 --- a/flightctl/models/ssh_repo_spec.py +++ b/flightctl/models/ssh_repo_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class SshRepoSpec(BaseModel): """ SshRepoSpec """ # noqa: E501 - url: StrictStr = Field(description="The SSH Git repository URL to clone from") + url: StrictStr = Field(description="The SSH Git repository URL to clone from.") type: RepoSpecType ssh_config: SshConfig = Field(alias="sshConfig") __properties: ClassVar[List[str]] = ["url", "type", "sshConfig"] diff --git a/flightctl/models/status.py b/flightctl/models/status.py index f907731..81302e0 100644 --- a/flightctl/models/status.py +++ b/flightctl/models/status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,7 +29,7 @@ class Status(BaseModel): """ # noqa: E501 message: Optional[StrictStr] = Field(default=None, description="A human-readable description of the status of this operation.") reason: Optional[StrictStr] = Field(default=None, description="A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.") - status: Optional[StrictStr] = Field(default=None, description="Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status") + status: Optional[StrictStr] = Field(default=None, description="Status of the operation. One of: \"Success\" or \"Failure\". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.") __properties: ClassVar[List[str]] = ["message", "reason", "status"] model_config = ConfigDict( diff --git a/flightctl/models/template_version.py b/flightctl/models/template_version.py index a26a648..c41e799 100644 --- a/flightctl/models/template_version.py +++ b/flightctl/models/template_version.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -29,8 +30,8 @@ class TemplateVersion(BaseModel): """ TemplateVersion represents a version of a template. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ObjectMeta spec: TemplateVersionSpec status: Optional[TemplateVersionStatus] = None diff --git a/flightctl/models/template_version_list.py b/flightctl/models/template_version_list.py index b58b85b..e4ec1bc 100644 --- a/flightctl/models/template_version_list.py +++ b/flightctl/models/template_version_list.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -28,8 +29,8 @@ class TemplateVersionList(BaseModel): """ TemplateVersionList is a list of TemplateVersions. """ # noqa: E501 - api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", alias="apiVersion") - kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds") + api_version: StrictStr = Field(description="APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.", alias="apiVersion") + kind: StrictStr = Field(description="Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.") metadata: ListMeta items: List[TemplateVersion] = Field(description="List of TemplateVersions.") __properties: ClassVar[List[str]] = ["apiVersion", "kind", "metadata", "items"] diff --git a/flightctl/models/template_version_spec.py b/flightctl/models/template_version_spec.py index 46a2f3b..a869562 100644 --- a/flightctl/models/template_version_spec.py +++ b/flightctl/models/template_version_spec.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -24,7 +25,7 @@ class TemplateVersionSpec(BaseModel): """ - TemplateVersionSpec + TemplateVersionSpec describes a version of a device template. """ # noqa: E501 fleet: StrictStr = Field(description="The fleet whose template this refers to.") __properties: ClassVar[List[str]] = ["fleet"] diff --git a/flightctl/models/template_version_status.py b/flightctl/models/template_version_status.py index da1ca4c..f2cf2be 100644 --- a/flightctl/models/template_version_status.py +++ b/flightctl/models/template_version_status.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -23,26 +24,26 @@ from flightctl.models.application_spec import ApplicationSpec from flightctl.models.condition import Condition from flightctl.models.config_provider_spec import ConfigProviderSpec -from flightctl.models.device_hooks_spec import DeviceHooksSpec from flightctl.models.device_os_spec import DeviceOSSpec from flightctl.models.device_spec_systemd import DeviceSpecSystemd +from flightctl.models.device_update_policy_spec import DeviceUpdatePolicySpec from flightctl.models.resource_monitor import ResourceMonitor from typing import Optional, Set from typing_extensions import Self class TemplateVersionStatus(BaseModel): """ - TemplateVersionStatus + TemplateVersionStatus represents information about the status of a template version. """ # noqa: E501 + update_policy: Optional[DeviceUpdatePolicySpec] = Field(default=None, alias="updatePolicy") os: Optional[DeviceOSSpec] = None config: Optional[List[ConfigProviderSpec]] = Field(default=None, description="List of config providers.") - hooks: Optional[DeviceHooksSpec] = None applications: Optional[List[ApplicationSpec]] = Field(default=None, description="List of applications.") systemd: Optional[DeviceSpecSystemd] = None resources: Optional[List[ResourceMonitor]] = Field(default=None, description="Array of resource monitor configurations.") - updated_at: Optional[datetime] = Field(default=None, alias="updatedAt") - conditions: Optional[List[Condition]] = Field(default=None, description="Current state of the device.") - __properties: ClassVar[List[str]] = ["os", "config", "hooks", "applications", "systemd", "resources", "updatedAt", "conditions"] + updated_at: Optional[datetime] = Field(default=None, description="The time at which the template was last updated.", alias="updatedAt") + conditions: List[Condition] = Field(description="Current state of the device.") + __properties: ClassVar[List[str]] = ["updatePolicy", "os", "config", "applications", "systemd", "resources", "updatedAt", "conditions"] model_config = ConfigDict( populate_by_name=True, @@ -83,6 +84,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of update_policy + if self.update_policy: + _dict['updatePolicy'] = self.update_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of os if self.os: _dict['os'] = self.os.to_dict() @@ -93,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_config: _items.append(_item_config.to_dict()) _dict['config'] = _items - # override the default output from pydantic by calling `to_dict()` of hooks - if self.hooks: - _dict['hooks'] = self.hooks.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in applications (list) _items = [] if self.applications: @@ -132,9 +133,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "updatePolicy": DeviceUpdatePolicySpec.from_dict(obj["updatePolicy"]) if obj.get("updatePolicy") is not None else None, "os": DeviceOSSpec.from_dict(obj["os"]) if obj.get("os") is not None else None, "config": [ConfigProviderSpec.from_dict(_item) for _item in obj["config"]] if obj.get("config") is not None else None, - "hooks": DeviceHooksSpec.from_dict(obj["hooks"]) if obj.get("hooks") is not None else None, "applications": [ApplicationSpec.from_dict(_item) for _item in obj["applications"]] if obj.get("applications") is not None else None, "systemd": DeviceSpecSystemd.from_dict(obj["systemd"]) if obj.get("systemd") is not None else None, "resources": [ResourceMonitor.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None, diff --git a/flightctl/models/update_schedule.py b/flightctl/models/update_schedule.py new file mode 100644 index 0000000..90a0f13 --- /dev/null +++ b/flightctl/models/update_schedule.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class UpdateSchedule(BaseModel): + """ + Defines the schedule for automatic updates, including timing and optional timeout. + """ # noqa: E501 + time_zone: Optional[StrictStr] = Field(default='Local', description="Time zone identifiers follow the IANA format AREA/LOCATION, where AREA represents a continent or ocean, and LOCATION specifies a particular site within that area, for example America/New_York, Europe/Paris. Only unambiguous 3-character time zones are supported (\"GMT\", \"UTC\").", alias="timeZone") + at: StrictStr = Field(description="Cron expression format for scheduling times. The format is `* * * * *`: - Minutes: `*` matches 0-59. - Hours: `*` matches 0-23. - Day of Month: `*` matches 1-31. - Month: `*` matches 1-12. - Day of Week: `*` matches 0-6. Supported operators: - `*`: Matches any value (e.g., `*` in hours matches every hour). - `-`: Range (e.g., `0-8` for 12 AM to 8 AM). - `,`: List (e.g., `1,12` for 1st and 12th minute). - `/`: Step (e.g., `*/12` for every 12th minute). - Single value (e.g., `8` matches the 8th minute). Example: `* 0-8,16-23 * * *`.") + start_grace_duration: Optional[Annotated[str, Field(strict=True)]] = Field(default='0s', description="The maximum duration allowed for the action to complete. The duration should be specified as a positive integer followed by a time unit. Supported time units are: `s` for seconds, `m` for minutes, `h` for hours.", alias="startGraceDuration") + __properties: ClassVar[List[str]] = ["timeZone", "at", "startGraceDuration"] + + @field_validator('start_grace_duration') + def start_grace_duration_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^(?:[1-9]\d*)?\d[smh]$", value): + raise ValueError(r"must validate the regular expression /^(?:[1-9]\d*)?\d[smh]$/") + return value + + 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 UpdateSchedule 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 UpdateSchedule from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "timeZone": obj.get("timeZone") if obj.get("timeZone") is not None else 'Local', + "at": obj.get("at"), + "startGraceDuration": obj.get("startGraceDuration") if obj.get("startGraceDuration") is not None else '0s' + }) + return _obj + + diff --git a/flightctl/rest.py b/flightctl/rest.py index c3f8418..dd7bb28 100644 --- a/flightctl/rest.py +++ b/flightctl/rest.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. diff --git a/pyproject.toml b/pyproject.toml index ed67c3c..03b6afa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [tool.poetry] name = "flightctl" version = "1.0.0" -description = "Open Device Management API" -authors = ["OpenAPI Generator Community "] +description = "Flight Control API" +authors = ["The Flight Control Team "] license = "Apache 2.0" readme = "README.md" repository = "https://github.com/flightctl/python-client" -keywords = ["OpenAPI", "OpenAPI-Generator", "Open Device Management API"] +keywords = ["OpenAPI", "OpenAPI-Generator", "Flight Control API"] include = ["flightctl/py.typed"] [tool.poetry.dependencies] diff --git a/setup.py b/setup.py index cd6b374..692ec74 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,12 @@ # coding: utf-8 """ - Open Device Management API + Flight Control API - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. - The version of the OpenAPI document: undefined + 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. @@ -33,18 +34,18 @@ setup( name=NAME, version=VERSION, - description="Open Device Management API", - author="OpenAPI Generator community", - author_email="team@openapitools.org", + description="Flight Control API", + author="The Flight Control Team", + author_email="team@flightctl.io", url="", - keywords=["OpenAPI", "OpenAPI-Generator", "Open Device Management API"], + keywords=["OpenAPI", "OpenAPI-Generator", "Flight Control API"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="Apache 2.0", long_description_content_type='text/markdown', long_description="""\ - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + [Flight Control](https://github.com/flightctl/flightctl) is a service for declarative management of fleets of edge devices and their workloads. """, # noqa: E501 package_data={"flightctl": ["py.typed"]}, ) diff --git a/test/test_authentication_api.py b/test/test_authentication_api.py new file mode 100644 index 0000000..d9c1eb9 --- /dev/null +++ b/test/test_authentication_api.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.api.authentication_api import AuthenticationApi + + +class TestAuthenticationApi(unittest.TestCase): + """AuthenticationApi unit test stubs""" + + def setUp(self) -> None: + self.api = AuthenticationApi() + + def tearDown(self) -> None: + pass + + def test_auth_config(self) -> None: + """Test case for auth_config + + """ + pass + + def test_auth_validate(self) -> None: + """Test case for auth_validate + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_decommission.py b/test/test_device_decommission.py new file mode 100644 index 0000000..d8d874e --- /dev/null +++ b/test/test_device_decommission.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_decommission import DeviceDecommission + +class TestDeviceDecommission(unittest.TestCase): + """DeviceDecommission unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceDecommission: + """Test DeviceDecommission + 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 `DeviceDecommission` + """ + model = DeviceDecommission() + if include_optional: + return DeviceDecommission( + target = 'Unenroll' + ) + else: + return DeviceDecommission( + target = 'Unenroll', + ) + """ + + def testDeviceDecommission(self): + """Test DeviceDecommission""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_decommission_target_type.py b/test/test_device_decommission_target_type.py new file mode 100644 index 0000000..acda28a --- /dev/null +++ b/test/test_device_decommission_target_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_decommission_target_type import DeviceDecommissionTargetType + +class TestDeviceDecommissionTargetType(unittest.TestCase): + """DeviceDecommissionTargetType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeviceDecommissionTargetType(self): + """Test DeviceDecommissionTargetType""" + # inst = DeviceDecommissionTargetType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_lifecycle_hook_type.py b/test/test_device_lifecycle_hook_type.py new file mode 100644 index 0000000..24c9f0e --- /dev/null +++ b/test/test_device_lifecycle_hook_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_lifecycle_hook_type import DeviceLifecycleHookType + +class TestDeviceLifecycleHookType(unittest.TestCase): + """DeviceLifecycleHookType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeviceLifecycleHookType(self): + """Test DeviceLifecycleHookType""" + # inst = DeviceLifecycleHookType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_lifecycle_status.py b/test/test_device_lifecycle_status.py new file mode 100644 index 0000000..6b5bec4 --- /dev/null +++ b/test/test_device_lifecycle_status.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_lifecycle_status import DeviceLifecycleStatus + +class TestDeviceLifecycleStatus(unittest.TestCase): + """DeviceLifecycleStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceLifecycleStatus: + """Test DeviceLifecycleStatus + 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 `DeviceLifecycleStatus` + """ + model = DeviceLifecycleStatus() + if include_optional: + return DeviceLifecycleStatus( + status = 'Unknown', + info = '' + ) + else: + return DeviceLifecycleStatus( + status = 'Unknown', + ) + """ + + def testDeviceLifecycleStatus(self): + """Test DeviceLifecycleStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_lifecycle_status_type.py b/test/test_device_lifecycle_status_type.py new file mode 100644 index 0000000..cfa1491 --- /dev/null +++ b/test/test_device_lifecycle_status_type.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_lifecycle_status_type import DeviceLifecycleStatusType + +class TestDeviceLifecycleStatusType(unittest.TestCase): + """DeviceLifecycleStatusType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDeviceLifecycleStatusType(self): + """Test DeviceLifecycleStatusType""" + # inst = DeviceLifecycleStatusType() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_device_update_policy_spec.py b/test/test_device_update_policy_spec.py new file mode 100644 index 0000000..5f82dc3 --- /dev/null +++ b/test/test_device_update_policy_spec.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.device_update_policy_spec import DeviceUpdatePolicySpec + +class TestDeviceUpdatePolicySpec(unittest.TestCase): + """DeviceUpdatePolicySpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeviceUpdatePolicySpec: + """Test DeviceUpdatePolicySpec + 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 `DeviceUpdatePolicySpec` + """ + model = DeviceUpdatePolicySpec() + if include_optional: + return DeviceUpdatePolicySpec( + download_schedule = flightctl.models.update_schedule.UpdateSchedule( + time_zone = 'Local', + at = '', + start_grace_duration = '0s', ), + update_schedule = flightctl.models.update_schedule.UpdateSchedule( + time_zone = 'Local', + at = '', + start_grace_duration = '0s', ) + ) + else: + return DeviceUpdatePolicySpec( + ) + """ + + def testDeviceUpdatePolicySpec(self): + """Test DeviceUpdatePolicySpec""" + # 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_hook_action_run.py b/test/test_hook_action_run.py new file mode 100644 index 0000000..112e12d --- /dev/null +++ b/test/test_hook_action_run.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.hook_action_run import HookActionRun + +class TestHookActionRun(unittest.TestCase): + """HookActionRun unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HookActionRun: + """Test HookActionRun + 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 `HookActionRun` + """ + model = HookActionRun() + if include_optional: + return HookActionRun( + run = '', + env_vars = { + 'key' : '' + }, + work_dir = '' + ) + else: + return HookActionRun( + run = '', + ) + """ + + def testHookActionRun(self): + """Test HookActionRun""" + # 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_hook_condition.py b/test/test_hook_condition.py new file mode 100644 index 0000000..fbf8089 --- /dev/null +++ b/test/test_hook_condition.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.hook_condition import HookCondition + +class TestHookCondition(unittest.TestCase): + """HookCondition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HookCondition: + """Test HookCondition + 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 `HookCondition` + """ + model = HookCondition() + if include_optional: + return HookCondition( + path = '', + op = [ + 'created' + ] + ) + else: + return HookCondition( + path = '', + op = [ + 'created' + ], + ) + """ + + def testHookCondition(self): + """Test HookCondition""" + # 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_hook_condition_path_op.py b/test/test_hook_condition_path_op.py new file mode 100644 index 0000000..fb90091 --- /dev/null +++ b/test/test_hook_condition_path_op.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.hook_condition_path_op import HookConditionPathOp + +class TestHookConditionPathOp(unittest.TestCase): + """HookConditionPathOp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> HookConditionPathOp: + """Test HookConditionPathOp + 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 `HookConditionPathOp` + """ + model = HookConditionPathOp() + if include_optional: + return HookConditionPathOp( + path = '', + op = [ + 'created' + ] + ) + else: + return HookConditionPathOp( + path = '', + op = [ + 'created' + ], + ) + """ + + def testHookConditionPathOp(self): + """Test HookConditionPathOp""" + # 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_update_schedule.py b/test/test_update_schedule.py new file mode 100644 index 0000000..49020ea --- /dev/null +++ b/test/test_update_schedule.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Flight Control API + + [Flight Control](https://github.com/flightctl/flightctl) 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.update_schedule import UpdateSchedule + +class TestUpdateSchedule(unittest.TestCase): + """UpdateSchedule unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateSchedule: + """Test UpdateSchedule + 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 `UpdateSchedule` + """ + model = UpdateSchedule() + if include_optional: + return UpdateSchedule( + time_zone = 'Local', + at = '', + start_grace_duration = '0s' + ) + else: + return UpdateSchedule( + at = '', + ) + """ + + def testUpdateSchedule(self): + """Test UpdateSchedule""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()