ansible-collection-hetzner-.../plugins/module_utils/vendor/hcloud/datacenters/domain.py
Jonas L 8a6157e8b2
feat: vendor hcloud python dependency (#244)
* chore: ignore venv directories

* chore: ignore integration test generated inventory

* feat: vendor hcloud package

* import https://github.com/hetznercloud/hcloud-python

* use vendored hcloud in modules

* update integration test requirements

* make vendor script self contained

* chore: add  check-hcloud-vendor pre-commit hook

* pin hcloud version to v.1.24.0

* move vendored __version__.py file to _version.py

* update comment about galaxy-importer filename lint
2023-07-11 11:15:08 +02:00

42 lines
1.6 KiB
Python

from ..core.domain import BaseDomain, DomainIdentityMixin
class Datacenter(BaseDomain, DomainIdentityMixin):
"""Datacenter Domain
:param id: int ID of Datacenter
:param name: str Name of Datacenter
:param description: str Description of Datacenter
:param location: :class:`BoundLocation <hcloud.locations.client.BoundLocation>`
:param server_types: :class:`DatacenterServerTypes <hcloud.datacenters.domain.DatacenterServerTypes>`
"""
__slots__ = ("id", "name", "description", "location", "server_types")
def __init__(
self, id=None, name=None, description=None, location=None, server_types=None
):
self.id = id
self.name = name
self.description = description
self.location = location
self.server_types = server_types
class DatacenterServerTypes:
"""DatacenterServerTypes Domain
:param available: List[:class:`BoundServerTypes <hcloud.server_types.client.BoundServerTypes>`]
All available server types for this datacenter
:param supported: List[:class:`BoundServerTypes <hcloud.server_types.client.BoundServerTypes>`]
All supported server types for this datacenter
:param available_for_migration: List[:class:`BoundServerTypes <hcloud.server_types.client.BoundServerTypes>`]
All available for migration (change type) server types for this datacenter
"""
__slots__ = ("available", "supported", "available_for_migration")
def __init__(self, available, supported, available_for_migration):
self.available = available
self.supported = supported
self.available_for_migration = available_for_migration