mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2025-01-25 02:05:02 +00:00
8a6157e8b2
* 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
54 lines
1.3 KiB
Python
54 lines
1.3 KiB
Python
from ..core.domain import BaseDomain, DomainIdentityMixin
|
|
|
|
|
|
class Location(BaseDomain, DomainIdentityMixin):
|
|
"""Location Domain
|
|
|
|
:param id: int
|
|
ID of location
|
|
:param name: str
|
|
Name of location
|
|
:param description: str
|
|
Description of location
|
|
:param country: str
|
|
ISO 3166-1 alpha-2 code of the country the location resides in
|
|
:param city: str
|
|
City the location is closest to
|
|
:param latitude: float
|
|
Latitude of the city closest to the location
|
|
:param longitude: float
|
|
Longitude of the city closest to the location
|
|
:param network_zone: str
|
|
Name of network zone this location resides in
|
|
"""
|
|
|
|
__slots__ = (
|
|
"id",
|
|
"name",
|
|
"description",
|
|
"country",
|
|
"city",
|
|
"latitude",
|
|
"longitude",
|
|
"network_zone",
|
|
)
|
|
|
|
def __init__(
|
|
self,
|
|
id=None,
|
|
name=None,
|
|
description=None,
|
|
country=None,
|
|
city=None,
|
|
latitude=None,
|
|
longitude=None,
|
|
network_zone=None,
|
|
):
|
|
self.id = id
|
|
self.name = name
|
|
self.description = description
|
|
self.country = country
|
|
self.city = city
|
|
self.latitude = latitude
|
|
self.longitude = longitude
|
|
self.network_zone = network_zone
|