diff options
author | Bin Yang <bin.yang@windriver.com> | 2019-07-23 07:31:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-23 07:31:04 +0000 |
commit | bcbedee7c3a086d20d802265db3b2b26c359794d (patch) | |
tree | e2505e71370257c19bfe375b06971495f4185c9a /src/k8splugin/internal | |
parent | 86ecc9397f67092f780c1c178e1305aa4621953b (diff) | |
parent | b8ecedd40b6be727233bf620a0aa5592f98161e7 (diff) |
Merge "Add a listallhandler to definitions api"
Diffstat (limited to 'src/k8splugin/internal')
-rw-r--r-- | src/k8splugin/internal/rb/definition.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/k8splugin/internal/rb/definition.go b/src/k8splugin/internal/rb/definition.go index 6998eedf..65ae8e00 100644 --- a/src/k8splugin/internal/rb/definition.go +++ b/src/k8splugin/internal/rb/definition.go @@ -121,10 +121,13 @@ func (v *DefinitionClient) List(name string) ([]Definition, error) { log.Printf("[Definition] Error Unmarshaling value for: %s", key) continue } + //Select only the definitions that match name provided - if def.RBName == name { + //If name is empty, return all + if def.RBName == name || name == "" { results = append(results, def) } + } } |