forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[svcat] Adding a filter to get plan. (openshift#1758)
* Adding a filter idea to get plan. Looking for feedback. * Reworked based on feedback. Class is a bool flag. * use caps for help. * Fix the unit test. * Add unit test for new plans for class case. * Kibbles convinced me to turn back --class into a string arg and make it an alt way to do class/plan get. * Adding another class to UPS. Tests filtering now. * Add doc on FilterOptions.
- Loading branch information
1 parent
70afb56
commit cc02f0e
Showing
11 changed files
with
218 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
NAME DESCRIPTION UUID | ||
+-----------------------+-------------------------+--------------------------------------+ | ||
user-provided-service A user provided service 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468 | ||
NAME DESCRIPTION UUID | ||
+--------------------------+--------------------------+--------------------------------------+ | ||
user-provided-service A user provided service 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468 | ||
another-provided-service Another provided service f1a80068-e366-494e-92d6-a0782337945b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
NAME CLASS DESCRIPTION UUID | ||
+---------+-----------------------+-------------------------+--------------------------------------+ | ||
default user-provided-service Sample plan description 86064792-7ea2-467b-af93-ac9694d96d52 | ||
premium user-provided-service Premium plan cc0d7529-18e8-416d-8946-6f7456acd589 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
NAME CLASS DESCRIPTION UUID | ||
+---------+-----------------------+-------------------------+--------------------------------------+ | ||
default user-provided-service Sample plan description 86064792-7ea2-467b-af93-ac9694d96d52 | ||
premium user-provided-service Premium plan cc0d7529-18e8-416d-8946-6f7456acd589 | ||
NAME CLASS DESCRIPTION UUID | ||
+---------+--------------------------+--------------------------------+--------------------------------------+ | ||
default user-provided-service Sample plan description 86064792-7ea2-467b-af93-ac9694d96d52 | ||
premium user-provided-service Premium plan cc0d7529-18e8-416d-8946-6f7456acd589 | ||
default another-provided-service Another sample plan 25b9b299-b0b3-4e14-aa1a-242eeb788aca | ||
description | ||
premium another-provided-service Another premium plan c1dbdafe-f987-4d36-8c9b-2aaaff740d4a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
cmd/svcat/testdata/responses/clusterserviceclasses/f1a80068-e366-494e-92d6-a0782337945b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"kind": "ClusterServiceClass", | ||
"apiVersion": "servicecatalog.k8s.io/v1beta1", | ||
"metadata": { | ||
"name": "f1a80068-e366-494e-92d6-a0782337945b", | ||
"selfLink": "/apis/servicecatalog.k8s.io/v1beta1/clusterserviceclasses/f1a80068-e366-494e-92d6-a0782337945b", | ||
"uid": "7b3c2fe0-f711-11e7-aa44-0242ac110005", | ||
"resourceVersion": "3", | ||
"creationTimestamp": "2018-01-11T20:53:31Z" | ||
}, | ||
"spec": { | ||
"clusterServiceBrokerName": "ups-broker", | ||
"externalName": "another-provided-service", | ||
"externalID": "5be743ff-06bc-4d49-b762-c8b1470916c4", | ||
"description": "Another provided service", | ||
"bindable": true, | ||
"bindingRetrievable": false, | ||
"planUpdatable": true | ||
}, | ||
"status": { | ||
"removedFromBrokerCatalog": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
Copyright 2018 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package servicecatalog | ||
|
||
// FilterOptions allows for optional filtering fields to be passed to `Retrieve` methods. | ||
type FilterOptions struct { | ||
ClassID string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters