Skip to content
Permalink
Browse files

Fortify the ccfg class against 'name' kwarg passed

The name and namespace kwargs are forced to respectively "cluster"
and None. We already cared about dropping the namespace kwarg from
passed kwargs, but forgot to care about name.

This patch fixes the get_keywords api handlers, which passes
name="dummy".
  • Loading branch information...
cvaroqui committed Aug 9, 2019
1 parent f5f2705 commit 27b8f13b2d9ed742128678b4268540067b8a1559
Showing with 5 additions and 4 deletions.
  1. +5 −4 lib/cluster.py
@@ -8,10 +8,11 @@ class ClusterSvc(BaseSvc):
kind = "ccfg"

def __init__(self, *args, **kwargs):
try:
del kwargs["namespace"]
except KeyError:
pass
for kwarg in ("name", "namespace"):
try:
del kwargs[kwarg]
except KeyError:
pass
BaseSvc.__init__(self, name="cluster", namespace=None, **kwargs)

@lazy

0 comments on commit 27b8f13

Please sign in to comment.
You can’t perform that action at this time.