pyvider 2024-11-27
Renamed tfplugin6 to tfprotov6 with provider operation submodules and schema overhaul
57 files · 3,539+ · 1,551-

Renamed tfplugin6 package to tfprotov6 to match Go conventions

5 files changed
  • __init__.py New tfprotov6 package root replacing tfplugin6
  • __init__.py Proto files moved into tfprotov6/proto/
  • tfplugin6.proto Protobuf definition at new location
  • tfplugin6_pb2.py Generated protobuf Python code
  • tfplugin6_pb2_grpc.py Generated gRPC service stubs
  • Renamed entire pyvider/tfplugin6/ package to pyvider/tfprotov6/ to align with Go terraform-plugin-go naming conventions decouple behavioral
    2 files
    • __init__.py
    • proto
  • Removed old schema, types, and standalone test files from previous naming deprecate internal
    2 files
    • schema.py
    • types.py

Added provider operation submodules

6 files changed
  • __init__.py Provider operations package with module exports
  • configure_provider.py ConfigureProvider operation handler
  • get_metadata.py GetMetadata operation handler
  • get_provider_schema.py GetProviderSchema operation handler
  • stop_provider.py StopProvider operation handler
  • validate_provider_config.py ValidateProviderConfig operation handler
  • Created provider/ package with operation-specific modules for configure, get_metadata, get_provider_schema, stop, and validate_provider_config instantiate behavioral
    5 files
    • configure_provider.py
    • get_metadata.py
    • get_provider_schema.py
    • stop_provider.py
    • validate_provider_config.py

Rebuilt schema with full validation and diagnostic system

3 files changed
  • schema.py Rebuilt schema with SchemaAttribute, SchemaNestedBlock, SchemaBlock, and Schema dataclasses (317 lines)
  • diagnostic.py Diagnostic system with severity levels and summary/detail fields (50 lines)
  • ephemeral_resource.py Ephemeral resource protocol support (85 lines)
  • Rebuilt schema.py with SchemaAttribute, SchemaNestedBlock, SchemaBlock dataclasses including validation for required/optional/computed exclusivity and nested block min/max enforcement instantiate behavioral
    1 file
    • schema.py
  • Added diagnostic.py with severity levels and summary/detail fields for Terraform diagnostic messages instantiate behavioral
    1 file
    • diagnostic.py
  • Created ephemeral_resource.py for Terraform ephemeral resource protocol support instantiate behavioral
    1 file
    • ephemeral_resource.py

Added comprehensive test suite for provider operations and schema

10 files changed
  • test_schema.py Comprehensive schema tests (413+ lines)
  • test_tfprotov6_diagnostic.py Diagnostic tests (157 lines)
  • test_configure_provider.py ConfigureProvider operation tests
  • test_get_metadata.py GetMetadata operation tests
  • test_get_provider_schema.py GetProviderSchema operation tests
  • test_stop_provider.py StopProvider operation tests
  • test_validate_provider_config.py ValidateProviderConfig operation tests
  • test_ephemeral_resource.py Ephemeral resource tests (96 lines)
  • test_main.py Main entry point tests
  • test_invalid_config.py Invalid configuration tests
  • Added comprehensive schema and diagnostic unit tests qualify behavioral
    2 files
    • test_schema.py
    • test_tfprotov6_diagnostic.py
  • Created provider operation tests for configure, get_metadata, get_provider_schema, stop, validate, and invalid config qualify behavioral
    7 files
    • test_configure_provider.py
    • test_get_metadata.py
    • test_get_provider_schema.py
    • test_stop_provider.py
    • test_validate_provider_config.py
    • test_invalid_config.py
    • test_ephemeral_resource.py

Enhanced tftypes with improved attribute path and type modules

6 files changed
  • __init__.py Type registry (25 lines)
  • attribute_path.py Enhanced AttributePath implementation
  • map.py Improved Map type
  • object.py Improved Object type
  • set.py Improved Set type
  • simple.py Improved simple types
  • Enhanced attribute_path.py and type modules (map, object, set, simple) with improved validation streamline internal
    5 files
    • attribute_path.py
    • map.py
    • object.py
    • set.py
    • simple.py
  • Updated gRPC helpers and service utilities streamline internal
    2 files
    • grpc_helpers.py
    • grpc_service.py