================== Cloud Abstraction ================== Eyrie uses a provider-agnostic abstraction layer so that clusters, DNS, and object storage can be managed through a uniform interface regardless of the underlying cloud vendor. Cloud Provider Model ==================== ``eyrie.cloud.provider`` stores credentials and metadata for a single cloud account. Key fields: - **name** — human label. - **cloud_type** — selection field (e.g. ``linode``, ``cloudflare``, ``none`` for manual). - **credentials_ok** — set to ``True`` after a successful credential verification. - **project_id** — if set, the provider is scoped to a single project. If empty, it is a global provider available to all projects. Cloud Provided Mixin ==================== ``eyrie.cloud.provided.mixin`` is an abstract model inherited by any record that represents a cloud-managed resource (clusters, DNS zones, etc.). It provides: - **cloud_type** — mirrors the provider's type. - **cloud_external_id** — the vendor-specific identifier (e.g. a Linode cluster ID or Cloudflare zone ID). Type-Specific Method Dispatch ============================== Eyrie uses a naming convention for cloud operations:: method = getattr(self, '%s_%s' % (self.cloud_type, method_base)) For example, calling ``cloud_provider_call('check_credentials', ...)`` on a Linode provider invokes ``linode_check_credentials()``. This convention lets each cloud module (``eyrie_cloud_linode``, ``eyrie_cloud_cloudflare``, etc.) add methods without modifying the base model. The ``cloud_provider_call`` wrapper on the mixin handles success/failure notifications and logging uniformly. Linode Integration ================== The ``eyrie_cloud_linode`` module implements: - **LKE Clusters** — create, delete, upgrade, and manage Kubernetes clusters on Linode Kubernetes Engine. - **Node Pools** — add, resize, and recycle node pools. - **Object Storage (S3-like)** — provision buckets for backups via ``atomic_create_s3_bucket``. - **Node Types & Availability Zones** — sync available instance sizes and regions. Cloudflare Integration ====================== The ``eyrie_cloud_cloudflare`` module implements: - **DNS Zones** — sync zones from a Cloudflare account. - **DNS Records** — create, update, and delete A/CNAME/TXT records for deployment subdomains and custom domains. Extensibility ============= To add a new cloud provider type: 1. Create a new Odoo module (e.g. ``eyrie_cloud_aws``). 2. Extend the ``cloud_type`` selection on ``eyrie.cloud.provider`` and ``eyrie.cloud.provided.mixin``. 3. Implement type-prefixed methods on the provider model (e.g. ``aws_check_credentials``, ``aws_sync_node_types``). 4. Implement type-prefixed methods on any resource model that needs cloud-specific behavior (e.g. ``aws_create_cluster`` on ``eyrie.cluster``). No changes to the base ``eyrie`` module are required — the method-dispatch convention handles routing automatically.