Skip to content

Commit

Permalink
Merge pull request #126 from sebastienc/work
Browse files Browse the repository at this point in the history
Making sure node list accepts labels
  • Loading branch information
sebastienc committed Jul 23, 2018
2 parents 73d5ab7 + c2f8dd0 commit 550f90b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions kubernetes/K8sNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def update(self):
self.get()
return self

def list(self, pattern=None):
ls = super(K8sNode, self).list()
def list(self, pattern=None, labels=None):
ls = super(K8sNode, self).list(labels=labels)
nodes = list(map(lambda x: Node(x), ls))
if pattern is not None:
nodes = list(filter(lambda x: pattern in x.name, nodes))
Expand Down Expand Up @@ -162,7 +162,7 @@ def get_by_labels(config=None, labels=None):
'K8sNode.get_by_labels() labels: [ {0} ] is invalid.'.format(labels))

node_list = list()
nodes = K8sObject(config=config, name='whatever').list(labels=labels)
nodes = K8sNode(config=config, name='whatever').list(labels=labels)

for n in nodes:
try:
Expand Down
2 changes: 1 addition & 1 deletion version.meta
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.10.0.1
1.10.0.2

0 comments on commit 550f90b

Please sign in to comment.