pydo icon indicating copy to clipboard operation
pydo copied to clipboard

client.kubernetes.create_cluster does not implement registry_enabled as advertised

Open reinvantveer opened this issue 10 months ago • 3 comments

It appears that 0.10.0 (and earlier) does not correctly pick up the registry_enabled flag as documented in https://pydo.readthedocs.io/en/latest/pydo.aio.operations.html#pydo.aio.operations.KubernetesOperations.create_cluster

To test:

Create a cluster using

def test_create_cluster_with_registry_integration() -> None:
    cluster = client.kubernetes.create_cluster({
        'name': 'registry_enabled_test',
        'region': 'ams3',
        'version': '1.32',
        'registry_enabled': True,
    })

    assert cluster['kubernetes_cluster']['registry_enabled'], 'Expected registry to be enabled'

However, you will find that this assertion fails. Would you please be so kind as to fix this and adopt this test in your test suite?

Workaround

def test_create_cluster_with_registry_integration() -> None:
    cluster = client.kubernetes.create_cluster({
        'name': 'registry_enabled_test',
        'region': 'ams3',
        'version': '1.32',
        'registry_enabled': True,
    })

    client.kubernetes.add_registry({'cluster_uuids': [cluster['id'] for cluster in clusters['kubernetes_clusters']]})

    assert cluster['kubernetes_cluster']['registry_enabled'], 'Expected registry to be enabled'

Thank you, Rein

reinvantveer avatar Mar 26 '25 11:03 reinvantveer

Hii, would want to work on this . Please assign it to me @reinvantveer

ProgrammingPirates avatar Oct 08 '25 08:10 ProgrammingPirates

@ProgrammingPirates sorry I don't have the rights to assign you

reinvantveer avatar Oct 16 '25 13:10 reinvantveer

@ProgrammingPirates But I think you can open a pull request that resolves the issue, adding Resolves #433 to the PR body text, and the maintainers will probably pick it up

reinvantveer avatar Oct 16 '25 13:10 reinvantveer