Skip to content

Commit

Permalink
fix mypy and update implementation coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
YHallouard committed May 12, 2024
1 parent a7e559e commit e4f0cc3
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 53 deletions.
31 changes: 8 additions & 23 deletions IMPLEMENTATION_COVERAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@

## budgets
<details>
<summary>26% implemented</summary>
<summary>30% implemented</summary>

- [X] create_budget
- [ ] create_budget_action
Expand All @@ -809,9 +809,6 @@
- [X] describe_notifications_for_budget
- [ ] describe_subscribers_for_notification
- [ ] execute_budget_action
- [ ] list_tags_for_resource
- [ ] tag_resource
- [ ] untag_resource
- [ ] update_budget
- [ ] update_budget_action
- [ ] update_notification
Expand Down Expand Up @@ -1347,7 +1344,6 @@
- [ ] put_webhook
- [ ] register_webhook_with_third_party
- [ ] retry_stage_execution
- [ ] rollback_stage
- [ ] start_pipeline_execution
- [ ] stop_pipeline_execution
- [X] tag_resource
Expand Down Expand Up @@ -2568,7 +2564,6 @@
- [ ] get_host_reservation_purchase_preview
- [ ] get_image_block_public_access_state
- [ ] get_instance_metadata_defaults
- [ ] get_instance_tpm_ek_pub
- [ ] get_instance_types_from_instance_requirements
- [ ] get_instance_uefi_data
- [ ] get_ipam_address_history
Expand Down Expand Up @@ -3272,26 +3267,23 @@

## emr-containers
<details>
<summary>34% implemented</summary>
<summary>40% implemented</summary>

- [X] cancel_job_run
- [ ] create_job_template
- [ ] create_managed_endpoint
- [ ] create_security_configuration
- [X] create_virtual_cluster
- [ ] delete_job_template
- [ ] delete_managed_endpoint
- [X] delete_virtual_cluster
- [X] describe_job_run
- [ ] describe_job_template
- [ ] describe_managed_endpoint
- [ ] describe_security_configuration
- [X] describe_virtual_cluster
- [ ] get_managed_endpoint_session_credentials
- [X] list_job_runs
- [ ] list_job_templates
- [ ] list_managed_endpoints
- [ ] list_security_configurations
- [ ] list_tags_for_resource
- [X] list_virtual_clusters
- [X] start_job_run
Expand Down Expand Up @@ -5460,17 +5452,17 @@

## panorama
<details>
<summary>23% implemented</summary>
<summary>32% implemented</summary>

- [ ] create_application_instance
- [X] create_application_instance
- [ ] create_job_for_devices
- [X] create_node_from_template_job
- [ ] create_package
- [ ] create_package_import_job
- [X] delete_device
- [ ] delete_package
- [ ] deregister_package_version
- [ ] describe_application_instance
- [X] describe_application_instance
- [ ] describe_application_instance_details
- [X] describe_device
- [ ] describe_device_job
Expand All @@ -5481,7 +5473,7 @@
- [ ] describe_package_version
- [ ] list_application_instance_dependencies
- [ ] list_application_instance_node_instances
- [ ] list_application_instances
- [X] list_application_instances
- [X] list_devices
- [ ] list_devices_jobs
- [ ] list_node_from_template_jobs
Expand All @@ -5505,7 +5497,6 @@
- [ ] create_batch_inference_job
- [ ] create_batch_segment_job
- [ ] create_campaign
- [ ] create_data_deletion_job
- [ ] create_dataset
- [ ] create_dataset_export_job
- [ ] create_dataset_group
Expand All @@ -5530,7 +5521,6 @@
- [ ] describe_batch_inference_job
- [ ] describe_batch_segment_job
- [ ] describe_campaign
- [ ] describe_data_deletion_job
- [ ] describe_dataset
- [ ] describe_dataset_export_job
- [ ] describe_dataset_group
Expand All @@ -5548,7 +5538,6 @@
- [ ] list_batch_inference_jobs
- [ ] list_batch_segment_jobs
- [ ] list_campaigns
- [ ] list_data_deletion_jobs
- [ ] list_dataset_export_jobs
- [ ] list_dataset_groups
- [ ] list_dataset_import_jobs
Expand Down Expand Up @@ -5881,7 +5870,6 @@
- [ ] update_public_sharing_settings
- [ ] update_refresh_schedule
- [ ] update_role_custom_permission
- [ ] update_spice_capacity_configuration
- [ ] update_template
- [ ] update_template_alias
- [ ] update_template_permissions
Expand Down Expand Up @@ -6353,7 +6341,7 @@

## resiliencehub
<details>
<summary>30% implemented</summary>
<summary>31% implemented</summary>

- [ ] add_draft_app_version_resource_mappings
- [ ] batch_update_recommendation_status
Expand Down Expand Up @@ -6381,7 +6369,6 @@
- [X] import_resources_to_draft_app_version
- [ ] list_alarm_recommendations
- [ ] list_app_assessment_compliance_drifts
- [ ] list_app_assessment_resource_drifts
- [X] list_app_assessments
- [ ] list_app_component_compliances
- [ ] list_app_component_recommendations
Expand Down Expand Up @@ -7697,7 +7684,6 @@
- [ ] describe_instance_patch_states
- [ ] describe_instance_patch_states_for_patch_group
- [ ] describe_instance_patches
- [ ] describe_instance_properties
- [ ] describe_inventory_deletions
- [ ] describe_maintenance_window_execution_task_invocations
- [ ] describe_maintenance_window_execution_tasks
Expand Down Expand Up @@ -7875,7 +7861,7 @@

## stepfunctions
<details>
<summary>54% implemented</summary>
<summary>55% implemented</summary>

- [ ] create_activity
- [X] create_state_machine
Expand Down Expand Up @@ -7913,7 +7899,6 @@
- [X] update_map_run
- [X] update_state_machine
- [ ] update_state_machine_alias
- [ ] validate_state_machine_definition
</details>

## sts
Expand Down
3 changes: 0 additions & 3 deletions docs/docs/services/budgets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ budgets

- [ ] describe_subscribers_for_notification
- [ ] execute_budget_action
- [ ] list_tags_for_resource
- [ ] tag_resource
- [ ] untag_resource
- [ ] update_budget
- [ ] update_budget_action
- [ ] update_notification
Expand Down
1 change: 0 additions & 1 deletion docs/docs/services/codepipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ codepipeline
- [ ] put_webhook
- [ ] register_webhook_with_third_party
- [ ] retry_stage_execution
- [ ] rollback_stage
- [ ] start_pipeline_execution
- [ ] stop_pipeline_execution
- [X] tag_resource
Expand Down
1 change: 0 additions & 1 deletion docs/docs/services/ec2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,6 @@ ec2
- [ ] get_host_reservation_purchase_preview
- [ ] get_image_block_public_access_state
- [ ] get_instance_metadata_defaults
- [ ] get_instance_tpm_ek_pub
- [ ] get_instance_types_from_instance_requirements
- [ ] get_instance_uefi_data
- [ ] get_ipam_address_history
Expand Down
3 changes: 0 additions & 3 deletions docs/docs/services/emr-containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,18 @@ emr-containers
- [X] cancel_job_run
- [ ] create_job_template
- [ ] create_managed_endpoint
- [ ] create_security_configuration
- [X] create_virtual_cluster
- [ ] delete_job_template
- [ ] delete_managed_endpoint
- [X] delete_virtual_cluster
- [X] describe_job_run
- [ ] describe_job_template
- [ ] describe_managed_endpoint
- [ ] describe_security_configuration
- [X] describe_virtual_cluster
- [ ] get_managed_endpoint_session_credentials
- [X] list_job_runs
- [ ] list_job_templates
- [ ] list_managed_endpoints
- [ ] list_security_configurations
- [ ] list_tags_for_resource
- [X] list_virtual_clusters
- [X] start_job_run
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/services/panorama.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ panorama

|start-h3| Implemented features for this service |end-h3|

- [ ] create_application_instance
- [X] create_application_instance
- [ ] create_job_for_devices
- [X] create_node_from_template_job
- [ ] create_package
- [ ] create_package_import_job
- [X] delete_device
- [ ] delete_package
- [ ] deregister_package_version
- [ ] describe_application_instance
- [X] describe_application_instance
- [ ] describe_application_instance_details
- [X] describe_device
- [ ] describe_device_job
Expand All @@ -33,7 +33,7 @@ panorama
- [ ] describe_package_version
- [ ] list_application_instance_dependencies
- [ ] list_application_instance_node_instances
- [ ] list_application_instances
- [X] list_application_instances
- [X] list_devices
- [ ] list_devices_jobs
- [ ] list_node_from_template_jobs
Expand Down
3 changes: 0 additions & 3 deletions docs/docs/services/personalize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ personalize
- [ ] create_batch_inference_job
- [ ] create_batch_segment_job
- [ ] create_campaign
- [ ] create_data_deletion_job
- [ ] create_dataset
- [ ] create_dataset_export_job
- [ ] create_dataset_group
Expand All @@ -44,7 +43,6 @@ personalize
- [ ] describe_batch_inference_job
- [ ] describe_batch_segment_job
- [ ] describe_campaign
- [ ] describe_data_deletion_job
- [ ] describe_dataset
- [ ] describe_dataset_export_job
- [ ] describe_dataset_group
Expand All @@ -62,7 +60,6 @@ personalize
- [ ] list_batch_inference_jobs
- [ ] list_batch_segment_jobs
- [ ] list_campaigns
- [ ] list_data_deletion_jobs
- [ ] list_dataset_export_jobs
- [ ] list_dataset_groups
- [ ] list_dataset_import_jobs
Expand Down
1 change: 0 additions & 1 deletion docs/docs/services/quicksight.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ quicksight
- [ ] update_public_sharing_settings
- [ ] update_refresh_schedule
- [ ] update_role_custom_permission
- [ ] update_spice_capacity_configuration
- [ ] update_template
- [ ] update_template_alias
- [ ] update_template_permissions
Expand Down
1 change: 0 additions & 1 deletion docs/docs/services/resiliencehub.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ resiliencehub
- [X] import_resources_to_draft_app_version
- [ ] list_alarm_recommendations
- [ ] list_app_assessment_compliance_drifts
- [ ] list_app_assessment_resource_drifts
- [X] list_app_assessments
- [ ] list_app_component_compliances
- [ ] list_app_component_recommendations
Expand Down
1 change: 0 additions & 1 deletion docs/docs/services/ssm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ ssm
- [ ] describe_instance_patch_states
- [ ] describe_instance_patch_states_for_patch_group
- [ ] describe_instance_patches
- [ ] describe_instance_properties
- [ ] describe_inventory_deletions
- [ ] describe_maintenance_window_execution_task_invocations
- [ ] describe_maintenance_window_execution_tasks
Expand Down
1 change: 0 additions & 1 deletion docs/docs/services/stepfunctions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ stepfunctions
- [X] update_map_run
- [X] update_state_machine
- [ ] update_state_machine_alias
- [ ] validate_state_machine_definition

23 changes: 11 additions & 12 deletions moto/panorama/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
from moto.panorama.utils import (
arn_formatter,
deep_convert_datetime_to_isoformat,
hash_name, generate_package_id,
generate_package_id,
hash_name,
)
from moto.utilities.paginator import paginate

Expand Down Expand Up @@ -348,7 +349,6 @@ def response_describe(self) -> Dict[str, str]:
return response_object



class Node(BaseObject):
def __init__(
self,
Expand Down Expand Up @@ -573,16 +573,15 @@ def list_application_instances(
device_id: Optional[str],
status_filter: Optional[str],
) -> List[ApplicationInstance]:
filtered_application_instances = self.application_instances_memory.values()
if device_id:
filtered_application_instances = filter(
lambda x: x.default_runtime_context_device == device_id,
filtered_application_instances,
)
if status_filter:
filtered_application_instances = filter(
lambda x: x.status == status_filter, filtered_application_instances
)
filtered_application_instances = filter(
lambda x: x.status == status_filter if status_filter else True,
filter(
lambda x: x.default_runtime_context_device == device_id
if device_id
else True,
self.application_instances_memory.values(),
),
)
return list(filtered_application_instances)


Expand Down

0 comments on commit e4f0cc3

Please sign in to comment.