1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00
hetzner.hcloud/plugins/module_utils/vendor/hcloud/isos/domain.py
Jonas L 8c7cd1e8f9 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-13 10:51:56 +02:00

42 lines
1.3 KiB
Python

try:
from dateutil.parser import isoparse
except ImportError:
isoparse = None
from ..core.domain import BaseDomain, DomainIdentityMixin
class Iso(BaseDomain, DomainIdentityMixin):
"""Iso Domain
:param id: int
ID of the ISO
:param name: str, None
Unique identifier of the ISO. Only set for public ISOs
:param description: str
Description of the ISO
:param type: str
Type of the ISO. Choices: `public`, `private`
:param architecture: str, None
CPU Architecture that the ISO is compatible with. None means that the compatibility is unknown. Choices: `x86`, `arm`
:param deprecated: datetime, None
ISO 8601 timestamp of deprecation, None if ISO is still available. After the deprecation time it will no longer be possible to attach the ISO to servers.
"""
__slots__ = ("id", "name", "type", "architecture", "description", "deprecated")
def __init__(
self,
id=None,
name=None,
type=None,
architecture=None,
description=None,
deprecated=None,
):
self.id = id
self.name = name
self.type = type
self.architecture = architecture
self.description = description
self.deprecated = isoparse(deprecated) if deprecated else None