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

Getting replicasets via the TestClient does not work #213

Open
linkous8 opened this issue Apr 16, 2021 · 0 comments · May be fixed by #214
Open

Getting replicasets via the TestClient does not work #213

linkous8 opened this issue Apr 16, 2021 · 0 comments · May be fixed by #214

Comments

@linkous8
Copy link

Running r_sets = kube.get_replicasets() fails with the following error:

    def __init__(self, *args, **kwargs) -> None:
        super(ReplicaSet, self).__init__(*args, **kwargs)
        self._add_kubetest_labels()
    
>       client.AppsV1Api.read_namespaced_replica_set()
E       TypeError: read_namespaced_replica_set() missing 3 required positional arguments: 'self', 'name', and 'namespace'

When the above is resolved, it hits the subsequent error:

        results = objects.ReplicaSet.preferred_client().list_namespaced_replica_set(
            namespace=namespace,
            **selectors,
        )
    
        replicasets = {}
        for obj in results.items:
            rs = objects.ReplicaSet(obj)
>           replicasets[replicasets.name] = rs
E           AttributeError: 'dict' object has no attribute 'name'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant