Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.1.1 #95

Merged
merged 4 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adcm_aio_client/config/_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def deactivate(self: Self) -> Self:
class ActivatableParameterGroup(_Activatable, ParameterGroup): ...


class ActivatableParameterGroupHG(_Desyncable, _Activatable, ParameterGroup):
class ActivatableParameterGroupHG(_Desyncable, _Activatable, ParameterGroupHG):
def activate(self: Self) -> Self:
super().activate()
self.desync()
Expand Down
2 changes: 1 addition & 1 deletion adcm_aio_client/objects/_cm.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ async def create(self: Self, bundle: Bundle, name: str, description: str = "") -
return HostProvider(requester=self._requester, data=response.as_dict())


class Host(Deletable, WithActions, WithStatus, WithMaintenanceMode, RootInteractiveObject):
class Host(Deletable, WithActions, WithConfig, WithStatus, WithMaintenanceMode, RootInteractiveObject):
PATH_PREFIX = "hosts"

@property
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ homepage = "https://github.com/arenadata/adcm-aio-client"
repository = "https://github.com/arenadata/adcm-aio-client"

[tool.poetry]
version = "0.1.0"
version = "0.1.1"
classifiers = [
"Development Status :: 3 - Alpha",
"Topic :: Software Development :: Build Tools",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

---
- type: cluster
name: cluster_bound
version: 1.0

- type: service
name: first_service
flag_autogeneration:
enable_outdated_config: True
version: 1.5

components:
first_component:
flag_autogeneration:
enable_outdated_config: True
second_component:
flag_autogeneration:
enable_outdated_config: False

- type: service
name: second_service
flag_autogeneration:
enable_outdated_config: False
version: 1.2
components:
first_component:
bound_to:
service: first_service
component: first_component
flag_autogeneration:
enable_outdated_config: False
second_component:
flag_autogeneration:
enable_outdated_config: False

51 changes: 51 additions & 0 deletions tests/integration/bundles/cluster_requires_service/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

---
- type: cluster
name: cluster_dep
version: 1.0

config: &config
- name: string_param
type: string
default: some_default_value

- name: int_param
type: integer
display_name: Some Int
default: 12

- type: service
name: first_service
flag_autogeneration:
enable_outdated_config: True
version: 1.5
config: *config

components:
first_component:
flag_autogeneration:
enable_outdated_config: True
config: *config
second_component:
flag_autogeneration:
enable_outdated_config: False
config: *config

- type: service
name: second_service
requires:
- service: first_service
component: first_component
flag_autogeneration:
enable_outdated_config: False
version: 1.2
config: *config
components:
first_component:
flag_autogeneration:
enable_outdated_config: False
config: *config
second_component:
flag_autogeneration:
enable_outdated_config: False
config: *config
16 changes: 16 additions & 0 deletions tests/integration/bundles/complex_cluster/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,16 @@
type: float
required: true

- name: int_field
display_name: Integer Field
type: integer
required: false

- name: int_field2
display_name: Integer Field 2
type: integer
required: false

- name: cant_find
type: string
default: "cantCme"
Expand Down Expand Up @@ -302,13 +312,19 @@
- name: justhere
type: integer
required: false
- name: field2
type: integer
required: false
- name: more
type: group
subs:
- name: strange
type: json
default: []

components:
component1:


- type: service
name: with_host_actions
Expand Down
18 changes: 18 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,24 @@ async def adcm_client(
yield client


@pytest_asyncio.fixture(scope="function")
async def second_adcm_client(
request: pytest.FixtureRequest, adcm: ADCMContainer, ssl_certs_dir: Path
) -> AsyncGenerator[ADCMClient, None]:
credentials = Credentials(username="admin", password="admin") # noqa: S106
url = adcm.ssl_url
extra_kwargs = getattr(request, "param", {})

kwargs: dict = {
"verify": str(ssl_certs_dir / "cert.pem"),
"timeout": 10,
"retry_interval": 1,
"retry_attempts": 1,
} | extra_kwargs
async with ADCMSession(url=url, credentials=credentials, **kwargs) as client:
yield client


@pytest_asyncio.fixture()
async def httpx_client(adcm: ADCMContainer) -> AsyncGenerator[AsyncClient, None]:
client = AsyncClient(base_url=urljoin(adcm.url, "api/v2/"))
Expand Down
Loading